Sitecore 9 Dynamic CRM Connector: Sync CRM field with Sitecore custom facets (Part 7)
In previous blog, we have discussed how to sync Sitecore custom facets to CRM.Dynamic CRM Connector comes with out of box functionality to sync CRM with Default facets, but we are going to discuss how we can sync CRM with Sitecore custom facets.
Step 1: Specify how to read from the Dynamics contact
- Navigate to this location “/sitecore/system/Data Exchange/XXX/Data Access/Value Accessor Sets/Providers/Dynamics/Dynamics Contact”
- Add the following item:
- Template: Entity Attribute Value Accessor
- Item Name: GraduateYear on Dynamics Contact
- Set the following field values:
- Attribute Name: CRM Field Name
- Value Type: Option Set Value (If dropdown, if checkbox select Formatted Value otherwise blank for single line)
Step 2: Specify how to write to the Contact facet
- Navigate to this location “/sitecore/system/Data Exchange/XXX/Data Access/Value Accessor Sets/Providers/xConnect”
- Add the following item:
- Template: xConnect Entity Facet Value Accessor Set
- Item Name: xConnect Contact Custom Information Facet
- Select the new item.
- Add the following item:
- Template: xConnect Entity Facet Property Value Accessor
- Item Name: Graduate Year on xConnect Graduate Year
- Set the following field values:
- Facet Property: Collection Models > Custom Models > YourCustomModel > Facets > Contact > FacetKey > GraduateYear
- Save the item.
Step 3: Map Dynamics data to the contact facet
- Navigate to this location /sitecore/system/Data Exchange/XXX/Value Mapping Sets/Dynamics to xConnect Contact Mappings”
- Add the following item:
- Template: Value Mapping Set
- Item Name: Dynamics Contact to xConnect Contact Custom Facets
- Add the following item
- Template: Value Mapping
- Item Name: Graduate Year
- Set the following field values:
- Source Accessor: /sitecore/system/Data Exchange/XXX/Data Access/Value Accessor Sets/Providers/Dynamics/Dynamics Contact/GraduateYear on Dynamics Contact
- Target Accessor: Data Access/Value Accessor Sets/Providers/xConnect/xConnect ; Contact Custom Information Facet/Graduate Year on xConnect Graduate Year
Step 4: Set xConnect Entity Facet Value
- Navigate to this location /sitecore/system/Data Exchange/XXX/Data Access/Value Accessor Sets/Providers/xConnect/xConnect Contact
- Add the following item:
- Template: xConnect Entity Facet Value Accessor
- Item Name: Custom Facet on xConnect Contact
- Set the following field values
- Facet Definition: Collection Models/<YourModel>/Facets/Contact/<Name>
- Mapping Set: /sitecore/system/Data Exchange/XXX/Value Mapping Sets/Dynamics to xConnect Contact Mappings/Dynamics Contact to xConnect Contact Custom Facets/
Step 5: Dynamics CRM sync with Sitecore Custom facet
- Move to this location “/sitecore/system/Data Exchange/XXX /Pipeline Batches/Dynamics Contacts to xConnect Sync” and click on “Run Pipeline Batch”
Comments