Distributed Marketing includes a standard set of fields used to populate the associated journey's entry source data extension. You can add fields to the standard set to include data from contact or lead objects. When a campaign member is approved through Distributed Marketing or when a Quick Send message is sent, the values of the additional data fields for the underlying contact or lead are added to the entry source data extension in Marketing Cloud Engagement. Use this data for Marketing Cloud Engagement journey decisions, content personalization, and more.
Supported objects include Contact, Lead, Account (Person Account), Campaign, Case, Opportunity, and Quick Send (API name for quick send mcdm_15__QuickSendJourney__c) related to the send, and Add Campaign Member.
For example, you can personalize messages with a custom phone number from the underlying lead or contact. Add the custom field to the Distributed Marketing payload by following these steps for each object.
- In Salesforce, navigate to Setup.
- Open Developer Console.
- Click Debug.
- Click Open Execute Anonymous Window.
-
Copy and paste the following Apex code. For
mcdm_15__DestinationName__c, enter the name of the new data extension
column as it appears in Marketing Cloud Engagement. For
mcdm_15__ObjectName__c, enter the name of the underlying object
containing the data. For mcdm_15__SourceName__c, enter the API name of
the object field you'd like to add to your data extension.
mcdm_15__PersonalizationFieldMap__c personalizationFieldMap = new mcdm_15__PersonalizationFieldMap__c ( mcdm_15__DestinationName__c='[Custom DE Column]', mcdm_15__ObjectName__c='[Lead or Contact]', mcdm_15__SourceName__c='[API Name of Field on Lead or Contact]' ); insert personalizationFieldMap; - Execute the code.
- In Marketing Cloud Engagement Contact Builder, locate the entry source data extension for the journey.
-
Add corresponding fields to the entry source data extension.
You can use the data in Marketing Cloud Engagement.
For example, to include a custom phone number field companyContactPhone__c in the standard injection payload, this code is executed in the Developer Console and companyContactPhone__c is added to the entry source data extension.
mcdm_15__PersonalizationFieldMap__c companyPhoneToDeColumnMapping = new mcdm_15__PersonalizationFieldMap__c (
mcdm_15__DestinationName__c='companyPhoneNumber',
mcdm_15__ObjectName__c='Contact',
mcdm_15__SourceName__c='companyContactPhone__c'
);
insert companyPhoneToDeColumnMapping;
A column companyPhoneNumber is added to the default Distributed Marketing personalization table, which is used to generate the payload. When a campaign member is approved for receiving messages, the underlying contact’s corresponding companyContactPhone__c is included in the Distributed Marketing payload and added to the data extension in Marketing Cloud Engagement.