0

I want to create an email that contains a personalized URL based on an email address. I am using the Journey Builder and the entry source is Salesforce data.

I can see that the email adress and name of the contacted person are part of the entry source:

Data entry source for journey

However, when I try to use the email value in the email that is the next node in the journey, the previous StackExchange answers don't work. I've tried [Contact:Email], and AttributeValue("Contact:Email").

The first option [Contact:Email] throws an error in validation:

There is an error in your email. Please contact your customer service representative. Fehler 1: Script SET Statement Invalid<br>An error occurred when attempting to resolve a script expression. See inner exception for detail. Script Expression: [Contact:Email] MemberID: XXXX JobID: 0 An unrecognized expression appears in a script block. Script Expression: [Contact:Email] MemberID: XXXX JobID: 0 <br>Ungültiger Inhalt: <br>SET @email2 = [Contact:Email]).

The second version using AttributeValue doesn't throw an error, but the value is not populated in the email that is sent out.

I set the variable like this in the email:

%%[set @email = AttributeValue("Contact:Email")]%%

 Guten Tag %%=v(@email)=%%,

and the email arrives like this:

Guten Tag without email value populated

The email value was not retrieved. How can I retrieve the email value?

The field name in the journey data extension is also seemingly called Contact:Email: Journey data extension

2
  • 2
    what is the field called in the DE?
    – EazyE
    Commented Aug 4, 2023 at 17:35
  • It is also apparently called Contact:Email. I added a screenshot of the data extension.
    – Kora K
    Commented Aug 7, 2023 at 7:26

1 Answer 1

1

Given that Contact is your root, and you're attempting to retrieve the email address field from that object, the easiest method for retrieving this would be:

%%[
 set @email = emailaddr
]%%

This will populate the variable email with the email address that you are deploying the email to. Additionally, you could use the bracket syntax (i.e. [Contract:Email]) if you'd prefer an alternative and want to retrieve this directly from the source DE.

3
  • Thank you for your answer! Unfortunately, the email is not filled out, neither with AttributeValue('emailaddr') nor with AttributeValue('Contact:Email')
    – Kora K
    Commented Aug 7, 2023 at 7:26
  • It's not possible to send an email and not have access to the emailaddr personalization string. Commented Aug 8, 2023 at 16:28
  • You are right. The error was fully on my side. I had set the variable in a "Text" field in Salesforce, which didn't work. When I put it in an HTML field, it worked. Duh. Thanks for your help.
    – Kora K
    Commented Aug 9, 2023 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .