Custom Events
CDP4S can publish Salesforce platform events the first time it sees configured types of Sitecore session event. This allows custom functionality such as Flows to perform special tasks when these events occur.
Configure event types
In Settings, specify the type(s) of Sitecore event you want CDP4S to publish in Salesforce, in the Monitor Custom Events field.
Flows
Create Platform Event-Triggered Flows that trigger on the CDP4S Custom Event.
The event has the following fields:
EventChannel__c: WEB, MOBILE_WEB, MOBILE_APP, EMAIL
EventType__c: the event type
EventData__c: raw JSON data for all properties from Sitecore CDP
SessionRef__c: the unique Sitecore CDP ref value
The event data may vary. To extract a field value, use the GetEventData Apex Action provided by CDP4S. Supply the EventData__c field value to the Input eventJson, and the field accessor (nested objects use colon separators). If the field is found the value will be returned as a string, otherwise it will be null.
To relate the visit record, use the SessionRef__c fields on the event and the CDP4S Visit records.
The CDP4S Visit record has a master-detail relationship to CDP4S Guest, which in turn is related to a master object (if any) via the lookup field configured in settings.