Synchronize Dynamics 365 Accounts or Contacts with Salesforce Accounts or Contacts > Introduction to Synchronize Dynamics 365 Accounts or Contacts with Salesforce Accounts or Contacts recipe > Prerequisites
  

Prerequisites

To synchronize Dynamics 365 accounts or contacts with Salesforce accounts or contacts, the following prerequisites must be met:

Creating a custom field in the Salesforce account and contact entities

To create a custom field in the Salesforce account and contact entities, perform the following steps:
  1. 1Log in to the Salesforce organization.
  2. 2Go to Setup > Build > Customize > Accounts > Fields, and then click New.
  3. The following image shows the New button on the Accounts Fields page:
  4. The image shows the New button on the Accounts Fields page.
  5. 3In the Field Label and Field Name fields, enter the Dynamics_ID value and save the custom field.
  6. You must create a custom field with Text data type.
    The following image shows the New Custom Field page:
    The image shows the New Custom Field page.
  7. 4Follow the same steps for the Contact entity.

Creating a custom field in the Dynamics 365 account and contact entities

To create a custom field in the Dynamics 365 account and contact entities, perform the following steps::
  1. 1Log in to the Dynamics 365 organization.
  2. 2Go to Settings > Advanced Settings.
  3. The following image shows the Advanced Settings option on the Dynamics 365 page:
    The image shows the Advanced Settings option on the Dynamics 365 page.
  4. 3On the Settings page, click Customizations.
  5. The following image shows the Customizations option on the Settings page:
    The image shows the Customizations option on the Settings page.
  6. 4Click Customize the System.
  7. The following image shows the Customize the System option on the Customization page:
    The image shows the Customize the System on the Customization page.
  8. 5Go to Components > Entities > Account > Fields, and then click New.
  9. The following image shows the New button on the Account Fields page:
    The image shows the New button on the Account Fields page.
  10. 6In the Display Name field, enter the salesforceid value and click Save and Close.
  11. The value in the Name field will get automatically set to new_salesforceid.
    The following image shows the New for Account page:
    The image shows the New for Account page.
  12. 7Follow the same steps for the Contact entity.

Creating webhooks in Dynamics 365

Use the Plug-in Registration Tool to register a webhook. To get the Plug-in Registration Tool, see Dataverse development tools.
To create a webhook in Dynamics 365, perform the following steps:
  1. 1Open the Plug-in Registration Tool and log in to your organization.
  2. 2Click CREATE NEW CONNECTION on the Plugin Registration Tool page.
  3. The following image shows the CREATE NEW CONNECTION button on the Plugin Registration Tool page:
    The image shows the CREATE NEW CONNECTION button on the Plugin Registration Tool page.
  4. 3Go to Register and select Register New Web Hook.
  5. The following image shows the Register New Web Hook option on the Register menu:
    The image shows the Register New Web Hook option on the Register menu.
  6. 4Enter the webhook name, Service URL in the Endpoint URL field, and the authentication method in the Authentication field.
  7. You must specify some key string.
    The following image shows the WebHook Registration dialog box:
    The image shows the WebHook Registration dialog box.
  8. 5Go to WebHook and select Register New Step.
  9. The following image shows the Register New Step option:
    The image shows the Register New Step option.
  10. 6In the Update Existing Step page, enter the value as Create in the Message field, account in the Primary Entity field, and select Asynchronous in the Execution Mode field.
  11. The following image shows the Update Existing Step page:
    The image shows the Update Existing Step page.
  12. 7In the Select Attributes dialog box, clear the Salesforce ID custom field to prevent the webhook from triggering when this field is updated.
  13. The following image shows the Salesforce ID custom field attribute in the Select Attributes dialog box:
    The image shows the Salesforce ID custom field attribute in the Select Attributes dialog box.
    Note: Currently, preventing the webhook from triggering when the Salesforce ID custom field is updated is not supported in Dynamics 365. The process ends when it receives a webhook with data indicating that this field has been updated.
  14. 8Follow steps 5, 6, and 7, that is, Register New Step steps for registering the update account entity and create or update contact entity.