I have an email in Marketing Cloud in which I want to get the contact owner's name to show up at the bottom in the signature. First I used the Lookup function and when I verify and test the email it works fine, but when I add it to the journey, I get a cancellation triggered send with error.

So I've used AMPscript in the email which Ive added to the journey. With this code in place, it always goes into the else loop and return the 'Fallbackvalue' instead of the COntact Owner name.

I tried adding in a delay of an hour and also tried using an old contact that had its retention owner a few days ago. In the preview and test for the email if I choose that contact the values populate correctly. What do you think could be causing the issue?

Code for the amp script is as follows:


  VAR @rs, @row, @value, @ro

  set @ro = AttributeValue("Retention_Owner__c")
  SET @rs = RetrieveSalesforceObjects('User','Id,Name', 'Id', '=', @ro)

  IF RowCount(@rs) == 1 THEN
    SET @row = Row(@rs, 1)
    SET @value = Field(@row, 'Name')
    SET @value = 'Fallbackvalue'



Has anyone faced any similar issues? If so, what should I do in this instance?

enter image description here


Output the @ro variable and double check its output in your journey setup, not email studio.

Probably @ro is empty in your Journey data extension but filled in your test DE, which could explain the behaviour.

A typical root cause could be that the Journey Entry Source fieldname is different from "Retention_Owner__c", which you assume in your code. The Journey might by default use a different naming convention, something like "Contact:Retention_Owner__c" if it's based on an SF trigger.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.