Trying to show personalization strings from
CampaignMember object when doing a send to Salesforce Campaign via Marketing Cloud and later also pass these on to a Cloud Page.
Based on this discussion, it seems there is the root DE created with some basic attributes for personalization.
So it seems there are 2 options to go by, either using Synchronised Data Extension to
CampaignMember_Salesforce data extension, or using
RetrieveSalesforceObjects ampscript to retrieve the data directly from Salesforce during send time.
Right now I'm trying to retrieve it directly from Salesforce to start with, but none of the strings are getting any data after Email send, despite the AMPscript resolving without errors.
%%[ var @subscriberRows set @subscriberRows = RetrieveSalesforceObjects( "CampaignMember", "CampaignId, ContactId, FirstName, Id, RSVP_Comment__c", "ContactId", "==", _subscriberKey) if RowCount(@subscriberRows) == 1 then /* there should only be one row */ var @subscriberRow, @firstName, @Id, @ContactId set @subscriberRow = Row(@subscriberRows, 1) set @firstName = Field(@subscriberRow, "FirstName") set @Id = Field(@subscriberRow, "Id") set @ContactId = Field(@subscriberRow, "ContactId") endif ]%%
The following is not giving anything on Email:
First Name: %%=v(@firstName)=%% ID: %%=v(@Id)=%% ContactId: %%=v(@ContactId)=%%