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 Item Name Value Accessor
Value Data Access > Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Name
  1. Set the following field value:
Field Endpoint 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
Value sitecore > system > Data Exchange > mycrm > Tenant Settings > Dynamics CRM > Accounts
  1. Set the following field value:
Field Matching Field Value Accessor
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 To
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