/
Custom Objects

Custom Objects

CDP4S supports relating a Sitecore Guest to a Lead or Contact out of the box. Simply set the Master Lookup Field setting to use the ‘FuseIT_CDP4S__Lead__c’ or ‘FuseIT_CDP4S__Contact__c’ field on the Sitecore_CDP_Guest__c object.

The Settings App automatically displays available master objects by name based on the Lookup fields present.

Other standard or custom objects can also be configured as below.

Lookup field

Add a custom field to the Sitecore_CDP_Guest__c object. This should be a Lookup reference to the object type desired, e.g. Opportunity.

Set the Master Lookup Field setting to the API name of this field, e.g. ‘Opportunity__c’.

Trigger

To handle analytics deletion and personalization updates, create a custom trigger on your selected object type. For example:

/** * Perform required Personalization and Analytics from associated Opportunity changes. */ trigger CDP4SOpportunityTrigger on Opportunity (before delete, after insert, after update) { if (trigger.isDelete) { // Delete related Guest data if settings allow. FuseIT_CDP4S.GuestHelper.DeleteGuestsIfCascadeEnabled(Trigger.oldMap.keySet()); } else { // Update Sitecore with mapped data when it changes on an Opportunity. FuseIT_CDP4S.PersonalizationHelper.UpdatePersonalizationFromTrigger(trigger.new, Trigger.oldMap); } }

Related content

Lightning Web Component
Lightning Web Component
Read with this
Related objects
Related objects
Read with this
Sitecore configuration
Sitecore configuration
Read with this
Configure mappings
Configure mappings
Read with this
Settings
Read with this
Configure API site
Configure API site
Read with this