I am facing some error when adding contextual field in function while trying to do some personalization in email with in a journey.
Any idea on what could be the resolution for this ?
Views
Replies
Total Likes
Kindly use back ticks for the event Id
Example -> context.journey.events.`1792665356`........
Views
Replies
Total Likes
don't think that is correct syntax.
Views
Replies
Total Likes
It's a different error now and the function signature is not being matched. You are using an array object where as the function expects a string. You can validate it on the following lines
Example
{{#each context.journey.events.`eventId`._tenant.npoEvent.traject as |s|}}
{%= replaceAll(s.discountedPrice,"([0-9]+\\.[0-9]{2}).*","$1") %}
{{/each}}
Views
Replies
Total Likes
Views
Replies
Total Likes
Use it on the following lines as mentioned previously as traject is an array object and it needs to be iterated over. eventId needs to have backticks.
Example
{{#each context.journey.events.`eventId`._tenant.npoEvent.traject as |s|}}
{%= replaceAll(s.discountedPrice,"([0-9]+\\.[0-9]{2}).*","$1") %}
{{/each}}
Views
Replies
Total Likes
Can you Reference contextual fields directly?
{{context.journey.events.923737463.LEAD_88_8_05.discountedPrice}}
Views
Replies
Total Likes