Hello,
I am trying to add a personalization block for a first name field that is not directly in the recipient schema.
In fact the first name I want to capture is in a one to many table (event registration) linked back to the recipient table. When using this ternary javascript statement it is I am just seeing a undefined value in the email I receive (the below block of code is in a try block). This should check if that first name in the registration exists, and if not, use the recipient first name.
The one pecular thing I am noticing is that the '_1toM' gets added when trying to include this variable from the email template. Is it possible to grab a value from a one to many table?
var displayData {};
displayData.firstName = (recipient.EventResponses_1toM.responseName.rspFirstNm; != "") ? recipient.EventResponses_1toM.responseName.rspFirstNm; : recipient.firstName;
Any help here is much appreciated.
Thank you.
Hi,
I believe that you can set audience level in the first query activity node to Event Registration table and pass the first/last names. Later in the workflow, you can change the audience level to recipient table and that will keep the first/last names columns and make them available to the delivery. Limiting the query to new registration events (assuming this is a recurring campaign) and using the dedup activity node (if needed) can help you ensuring a person gets one communication if he/she registered multiple times in a given period.
This approach did work for me in the past.