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 |
Value accessor for name for new item |
Value |
Data Access > Value Accessor Sets > Providers > Dynamics CRM > CRM Account Attributes > Account Name |
- Set the following field value:
Field |
Endpoint to read data 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 to resolve |
Value |
sitecore > system > Data Exchange > mycrm > Tenant Settings > Dynamics CRM > Accounts |
- 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 |
- 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 for Sitecore item model repository |
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