You are here:
Personalize with Custom Objects
Use custom objects and AMPscript to personalize your messages in Marketing Cloud Connect for Marketing Cloud Engagement.
Use custom objects associated to a contact or lead for personalization in triggered sends from the Sales and Service Clouds. Use AMPscript with custom objects for more personalization.
For example, instead of sending generic replies such as, “Susan, your case has been closed,” use custom objects to personalize the reply as “Susan, your Case ABC123XYZ, ‘Unable to Send’ was closed at 11:29PM by John Smith.”
Sample:
%%[
Set @mySObject = SObject
Set @myRecordId = RecordId
set @Case = RetrieveSalesforceObjects(SObject,"Subject,Status","Id", "=", RecordId)
Set @CaseRow = Row(@Case, 1)
Set @Subject = FIELD(@CaseRow, "Subject")
Set @Status = FIELD(@CaseRow, "Status")
]%%
<br><br>
SObject From API Call: %%=v(@mySObject)=%% <br>
RecordId From API Call: %%=v(@myRecordId)=%% <br>
Subject From RetrieveSalesforceObjects: %%=v(@Subject)=%% <br>
Status From RetrieveSalesforceObjects: %%=v(@Status)=%% <br>

