1

I have this code in AMPSCript in an Email that is an activity in Journey Builder with a Data Entry source as Salesforce Data Entry Event (Order created).

The Salesforce Object is Order and I want to reference just the OrderNumber; for that I am usign this AMPScript code to reference the value:

set @ordernumber = Order:OrderNumber

When going to Preview Test Mode I am receiving this error:

The error message is:

HTML Version There is an error in your email. Please contact your customer service representative. Error 1: Script SET Statement Invalid An error occurred when attempting to resolve a script expression. See inner exception for detail.

Script Expression: Order:OrderNumber

An unrecognized expression appears in a script block. Script Expression: Order:OrderNumber

Invalid Content: set @ordernumber = Order:OrderNumber

Could you please advise me about what am I doing wrong ? Initially, my understanding is that the way to reference Data Entry values from Salesforce Data is in this way.

Thanks a lot in advance, Enrique

1 Answer 1

2

When you are using Salesforce data (or any data that has field names including characters such as ":") you need wrap your attribute call in brackets. So your variable declaration should be:

set @ordernumber = [Order:OrderNumber]
2
  • It works fine now ! Thanks a lot for your help Jason ! Commented Jun 14, 2019 at 15:16
  • Glad to help! Can you please mark this as answered? Good luck with your journey set up!! Commented Jun 14, 2019 at 15:19

You must log in to answer this question.

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