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.
- Navigate to your tenant.
- Navigate to Pipelines.
- Add the following item:
Template |
Pipelines Folder |
Name |
CRM Account Pipelines |
- Navigate to CRM Account Pipelines.
- Add the following item:
Template |
Pipelines |
Name |
CRM Account to Sitecore Account Sync Pipeline |
- Navigate to CRM Account to Sitecore Account Sync Pipeline.
- Add the following item:
Template |
Resolve Sitecore Item Pipeline Step |
Name |
Resolve Sitecore Item |
- Set the following field value:
Field |
Template for New Item |
Value |
Templates > Data Exchange > Providers > Sitecore > Entities > External Account |
- Set the following field value:
Field |
Item Name Value Accessor |
Value |
Data Access > Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Name |
- Set the following field value:
Field |
Endpoint From |
Value |
Sitecore > Sitecore Item Model Repository Endpoint |
- Set the following field value:
Field |
Identifier Value Accessor |
Value |
Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Id |
- Set the following field value:
Field |
Identifier Object Location |
Value |
Pipeline Context Source |
- Set the following field value:
Field |
Resolved Object Location |
Value |
Pipeline Context Target |
- Set the following field value:
Field |
Parent for Item |
Value |
sitecore > system > Data Exchange > mycrm > Tenant Settings > Dynamics CRM > Accounts |
- Set the following field value:
Field |
Matching Field Value Accessor |
Value |
Data Access > Value Accessor Sets > Providers > Sitecore > Sitecore Account Item Fields > Account Id |
- Save the item.
- Navigate to your tenant.
- Navigate to Pipelines > CRM Account Pipelines > CRM Account to Sitecore Account Sync Pipeline.
- Add the following item:
Template |
Apply Mapping Pipeline Step |
Name |
Apply Mapping |
- Set the following field value:
Field |
Mapping Set |
Value |
Value Mapping Sets > CRM Account to Sitecore Item |
- Save the item.
- Navigate to CRM Account to Sitecore Account Sync Pipeline.
- Add the following item:
Template |
Update Sitecore Item Pipeline Step |
Name |
Update Sitecore Item |
- Set the following field value:
Field |
Endpoint To |
Value |
Sitecore > Sitecore Item Model Repository Endpoint |
- Save the item.
- Navigate to CRM Account to Sitecore Account Sync Pipeline.
- Change the order of the child items to the following:
- Resolve Sitecore Item
- Apply Mapping
- Update Sitecore Item