Part 5: Sitecore Dynamic CRM Connector: Sync Custom Facets(Checkbox Field)
In this blog, we are going to sync custom facets from Sitecore to CRM. The custom facets document is available here so I am assuming that you have already created custom facets.
- Go to this location "/sitecore/system/Settings/Data Exchange/Providers/xConnect/Collection Models" and create a new "Collection Model Folder".
- Inside this folder create a "Compiled Collection Model" and type the namespace and assembly name of your custom facet model in the "Collection Model Type" field.
- Go to this location "/sitecore/system/Data Exchange/<Tenant Name>/Endpoints/Providers/xConnect/xConnect Client Endpoint" and in the Collection Model field select the custom model which you have created in the previous step.
- Go to this location "/sitecore/system/Data Exchange/<Tenant Name>/Pipelines/xConnect Contacts to Dynamics Sync Pipelines/Read Contacts from xConnect Pipeline/Read Contacts from xConnect" and in "Contact Facets To Read" field select your custom facets.
- Go to this location "/sitecore/system/Data Exchange/<Tenant Name>/Data Access/Value Accessor Sets/Providers/Dynamics/Dynamics Contact" and create a new item using the "Entity Attribute Value Accessor" and enter the CRM field name in the Attribute Name field.
- Go to this location "/sitecore/system/Data Exchange/<Tenant Name>/Data Access/Accessor Sets/Providers/xConnect" and create a new item using "xConnect Entity Facet Value Accessor Set" template.
- Inside this folder create the below item:
- Template: /sitecore/templates/Data Exchange/Providers/xConnect/Data Access/Value Accessors/xConnect Entity Facet Property Value Accessor
- Name: IsSubscriber on Custom Facet in XConnect Contact
- Now set "Facet Property".
- Move to this location now "/sitecore/system/Data Exchange/<Tenant Name>/Value Mapping Sets/xConnect Contact to Dynamics Contact Mappings/Contact Model to Dynamics Contact" and create a new Value Mapping item. Now select Source Accessor and Target Accessor.
- In the last step, go to this location "/sitecore/system/Data Exchange/<Tenant Name>/Pipeline Batches/xConnect Contacts to Dynamics Sync" and run the pipeline.
You can go to CRM and verify checkbox must be synced.
Enjoyyyyyyyy!!!!!!!!!
Comments