Hi,
I have a script in an email template which I want to populate with the name and email of the recipient. How may I do that? See the script below where I have tried to add the personalization field but I am not sure of the format. Now it will just be formatted as text.
<script type="application/json+trustpilot">
{
"recipientName": "<span class="acr-field nl-dce-field" data-nl-expr="/context/targetData/name" data-nl-type="string" contenteditable="false">Name (name)</span>",
"recipientEmail": "<span class="acr-field nl-dce-field" data-nl-expr="/context/targetData/email" data-nl-type="string" contenteditable="false">Email (email)</span>"
}
</script>
Br
Filip
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Filip,
The notation you used is generally just for email content, you may want to call the variables using this format instead:
Where firstname: <%= context.targetDate.name%> .
In the script that would be:
<script type="application/json+trustpilot">
{
"recipientName": "<%= context.targetDate.name%>",
"recipientEmail": "<%= context.targetDate.email%>"}
</script>
This is the way variables are called in Campaign Classic, and I've used it with success in Standard too.
Please let me know how it goes.
Cheers,
Jamal
Views
Replies
Total Likes
Hi Filip,
The notation you used is generally just for email content, you may want to call the variables using this format instead:
Where firstname: <%= context.targetDate.name%> .
In the script that would be:
<script type="application/json+trustpilot">
{
"recipientName": "<%= context.targetDate.name%>",
"recipientEmail": "<%= context.targetDate.email%>"}
</script>
This is the way variables are called in Campaign Classic, and I've used it with success in Standard too.
Please let me know how it goes.
Cheers,
Jamal
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies