Work with Custom Facet in Sitecore 9
In this blog, you can find details about how to set, fetch and update custom facet models to XDB. To know about how to create a custom facet model please find my previous blog here . Facet will be saved with respect to the Contact, whether it is new or existing contact. If contact does not exist, then create a new contact and add it to XDB if it exists then get that contact first. I am starting this blog by setting new custom facet properties, later fetching the existing facet and updating the properties, and saving it to XDB. You need to use client.SetFacet() method to set or update facet. Add a new custom facet: In this following example, I am adding the CustomFacetInformation facet on contact. This contact does yet not have the CustomFacetInformation facet. You need to create a new object of facet then assign properties and set it to contact. u...