Dynamics Publishing

Empower supports publishing datasets to Dynamics 365 CE and FO deployments.

Prerequisites

  1. Data in your Empower delta lake to publish.
  2. Advanced Options is toggled on for your account.
  3. A Dynamics deployment and its credentials. See how to do so below.

Obtain Dynamics Credentials via Azure AD Application

Your Empower deployment must be authenticated with your Dynamics deployment in order to publish data. The recommended strategy to authenticate to the Dynamics environment is to use an Azure AD application. The Azure Tenant ID, Application ID, and Client Secret are required for creating a connection string.

📘

Tip: This works for both CE and FO

The same Azure application can be used to authenticate to both F&O and CRM environments if within the same tenant.

The application needs to have API permissions for Dynamics ERP. From the Azure Portal that hosts your AD application:

  1. "API Permissions" > "Add" > "Delegated Permissions"
  2. "Required Permissions" > "Add"
  3. Under "Select an API" choose "Dynamics ERP"
  4. Finally, choose "Delegated Permissions for OAuthGrantType = CODE"

Steps

Add Dynamics CE or FO as a Data Source in your Empower Environment

  1. Navigate to your Empower deployment's Data Sources tab in the UI.
  2. Click + to add a new data source, navigate to Dynamics CE or Dynamics FO or use the search bar.
  3. Fill in the required fields.
  4. Click save and connect to save the new Dynamics CE or FO data source.

Configure DatabaseToStepCommand

  1. Navigate to the Advanced Options tab on the left side of the screen.
  2. Add a new record to the DatabaseToStepCommand table.
  3. Use the Dynamics data source in the Database ID field.
  4. Configure this record to be a PUBLISH phase.
  5. Select a new load group number if you want this to run independently OR add to an existing loadgroup to have it run with the rest of that load group.
  6. Write 1 for the Execution Order field if this is the only command to be executed; otherwise configure to be in whatever order you wish.
  7. You can leave the Source Schema Suffix and Target Schema Suffix fields as they are defaulted.
  8. You can leave the Item Name to Execute field set to None.

Configure Publish Entity Table

  1. Identify the entities (tables) you want to publish to the Dyamics deployment.
  2. Create a new record for each table you wish to publish in the Publish Entity Table.
  3. Ensure each new Publish Entity entry includes at least the following columns:
    1. Load Group: matches DatabaseToStepCommand entry’s LoadGroup.
    2. Target Entity: this will be name of the entity you will be writing to in the Dynamics deployment.
    3. Source Catalog: the source table’s Unity Catalog.
    4. Source Schema: the source table’s schema.
    5. Source Entity Name: the source table’s name.
    6. Source Entity Filter: this adds an optional where condition parameter to the (ex: account_type=”Debit”).
      1. Keep in mind that this filter must be valid SQL (everything that could be part of a SQL WHERE clause, just without the preceding WHERE in the statement).
      2. For proper behavior, make sure to use fields that are contained within the table you are specifying.
    7. Target ID: The DatabaseListID of the Dynamics deployment (this should be the same as the DatabaseToStepCommand’s DatabaseID).
    8. Is Active: only active entities are published, must be set to true for this entity to be enabled.