I would like to update a custom salesforce object when a marketing cloud email is sent. I have a transaction object and once the email is sent, I would like to update the description field to “Acknowledged”.
To use ampscript code UpdateSingleSalesforceObject I need the transaction Id in my data extension however I already have the contact ID (for email sending) in my data extension so I’m stuck on how to pull in a second ID in the query.
Is there a way to rename the transaction Id before pulling it into my data extensions?
I was also wondering do I need to create 2 separate data extensions in Contact builder? I have never used Contact builder so I’m not sure how I would link the data extensions together.
Will this even work putting the below code at the beginning of an email? %%[ var @result set @result = UpdateSingleSalesforceObject(‘AQB__Transaction__c’,’TransId’,’AQB__Description__c’,’Acknowledged’) ]%%
Appreciate any guidance, I'm getting above my skill set but I really want this to work.