7. Add Pipelines to Handle CRM EntityΒΆ

Each account entity read from CRM is represented in Sitecore by an item. A pipeline is used to define the logic involved in creating the Sitecore item.

Note

You have not yet configured the pipeline that will read the entities from CRM. The pipeline that handles each entity is used in the pipeline that reads the entities, so the pipeline that handles each entity is configured first.

  1. Navigate to your tenant.
  2. Navigate to Pipelines.
  3. Add the following item:
Template Pipelines Folder
Name CRM Account Pipelines
  1. Navigate to CRM Account Pipelines.
  2. Add the following item:
Template Pipelines
Name CRM Account to Sitecore Account Sync Pipeline
  1. Navigate to CRM Account to Sitecore Account Sync Pipeline.
  2. Add the following item:
Template Resolve Sitecore Item Pipeline Step
Name Resolve Sitecore Item
  1. Set the following field value:
Field Template for new item
Value Templates > Data Exchange > Providers > Sitecore > Entities > External Account
  1. Set the following field value:
Field Value accessor for name for new item
Value Data Access > Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Name
  1. Set the following field value:
Field Endpoint to read data from
Value Sitecore > Sitecore Item Model Repository Endpoint
  1. Set the following field value:
Field Identifier value accessor
Value Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Id
  1. Set the following field value:
Field Identifier object location
Value Pipeline Context Source
  1. Set the following field value:
Field Resolved object location
Value Pipeline Context Target
  1. Set the following field value:
Field Parent for item to resolve
Value sitecore > system > Data Exchange > mycrm > Tenant Settings > Dynamics CRM > Accounts
  1. Set the following field value:
Field Value accessor for Sitecore item field used to match the identifier value
Value Data Access > Value Accessor Sets > Providers > Sitecore > Sitecore Account Item Fields > Account Id
  1. Save the item.
  2. Navigate to your tenant.
  3. Navigate to Pipelines > CRM Account Pipelines > CRM Account to Sitecore Account Sync Pipeline.
  4. Add the following item:
Template Apply Mapping Pipeline Step
Name Apply Mapping
  1. Set the following field value:
Field Mapping set
Value Value Mapping Sets > CRM Account to Sitecore Item
  1. Save the item.
  2. Navigate to CRM Account to Sitecore Account Sync Pipeline.
  3. Add the following item:
Template Update Sitecore Item Pipeline Step
Name Update Sitecore Item
  1. Set the following field value:
Field Endpoint for Sitecore item model repository
Value Sitecore > Sitecore Item Model Repository Endpoint
  1. Save the item.
  2. Navigate to CRM Account to Sitecore Account Sync Pipeline.
  3. Change the order of the child items to the following:
  1. Resolve Sitecore Item
  2. Apply Mapping
  3. Update Sitecore Item