Expand my Community achievements bar.

SOLVED

Dynamic content in Email template - personalize customer specific fields

Avatar

Level 2

Hi Team,

I need to display dynamic content based on product/account type in the email template section. To achieve this, we created a schema and form to store content variation data based on product/account type. The workflow links dynamic content tables to target data based on products and maps dynamic content within the delivery.

Amit_Shinde1_2-1697680160458.png

 

Amit_Shinde1_1-1697679850039.png

 

The issue I am facing is that I want to personalize the title/body of a dynamic section based on customer data (e.g. product upgrade status). I tried adding targetData.fieldname or <%= targetData.fieldname %> to the schema with the following syntax, but when I link the dynamic content data in the workflow, the module 1 title retrieving as a string "You can upgrade to <%= targetData.upProduct  %>" and the column value 'upProduct' in the workflow transition table/delivery template in module 1 title is not getting personalized.

Amit_Shinde1_2-1697680160458.png

 

Please help me to resolve the scenario.   

 

Regards,

Amit

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Amit_Shinde1 ,

you need to add another = and then it will be handled as variable, that will be personalized, after you print it 

 

 

 

 

 

<%== targertData.upProduct%>

 

 

 

EDIT:

Hello @Amit_Shinde1 ,

i have tested this and seems like the "<%==" is used for another context in JSSP. I hoped it is similar to what SFDC has.


You can for now do a bit manual workaround, maybe later create function that would automatically replace all placeholders for delivery context variable.

 

 

Marcel_Szimonisz_0-1697785942046.png

 

 

 

 

<%= targetData.hello.toString().replace('{recipient.firstName}',recipient.firstName)%> 

 

 

 

Also better option might be to save the contents in the personalization block as is and import it to delivery and it should work. This would need to add some synchronization on demand between your schema and personalization script

 

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

Hello @Amit_Shinde1 ,

you need to add another = and then it will be handled as variable, that will be personalized, after you print it 

 

 

 

 

 

<%== targertData.upProduct%>

 

 

 

EDIT:

Hello @Amit_Shinde1 ,

i have tested this and seems like the "<%==" is used for another context in JSSP. I hoped it is similar to what SFDC has.


You can for now do a bit manual workaround, maybe later create function that would automatically replace all placeholders for delivery context variable.

 

 

Marcel_Szimonisz_0-1697785942046.png

 

 

 

 

<%= targetData.hello.toString().replace('{recipient.firstName}',recipient.firstName)%> 

 

 

 

Also better option might be to save the contents in the personalization block as is and import it to delivery and it should work. This would need to add some synchronization on demand between your schema and personalization script

 

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

Avatar

Level 2

Hey Marcel,

 

Thank you for your response. But I am still not getting the personalization in Email. tried below.

Amit_Shinde1_0-1697698756175.png

 

Amit_Shinde1_2-1697698066880.png

 

 

Avatar

Community Advisor

Hello @Amit_Shinde1 ,

why it is censored.. from here it looks like it worked is there product name printed under the yellow stripe? Is it empty? do you have that targetData.upProduct available in target data?

 

Also links used as above are not receommended due to:

  • security reason
  • cannot be tracked

Marcel Szimonisz

Avatar

Level 2

Hi @Marcel_Szimonisz 

The personalization value didn't printed in template. targetData.upProduct field has a value present in target data.

Also, above link is test link added for testing only.  

Amit_Shinde1_0-1697700927746.png

 

Avatar

Community Advisor

But you can see it worked.. just the variable seems to be not present or empty.. if it did not you would see the syntax. right?

 

Marcel

Avatar

Level 2

Yes I am not seeing the syntax in email but when I am opening the mirror page I am getting the syntax as well.

Amit_Shinde1_0-1697754552095.png

Mirror page below

Amit_Shinde1_1-1697754622085.png

 

Avatar

Community Advisor

Hello @Amit_Shinde1 ,

I have edited my original reply

It seems like the <%== is used for something else in JSSP

In the meantime you can use a bit of manual workaround described above

Marcel