Hello,
Is it possible to use conditional HTML formatting in a Transactional Email Template based off of an RT event value?
I've been testing with something basic like this:
<% if ( <%= rtEvent.ctx.email.@type %> == 'Order' ) { %>Your Order is en route<% } %><% else { %>Your Order is delayed<% } %>
I'm testing based on proofs with a seed address that has the following two CTX values:
<ctx>
<email location="somewhere" type="Order"/>
</ctx>
When I analyze a proof to send, it shows an error around htmlContent -- so I'm wondering if this is just not available functionality in message center. But maybe (hopefully), I'm just doing something wrong.
What do you think?
Thanks!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @robertc66522596 ,
You can use conditional statement in message center.
Modify your conditional statement as below,
<% if ( rtEvent.ctx.email.@type == 'Order' ) { %>
Your Order is en route
<% } else { %>
Your Order is delayed
<% } %>
Views
Replies
Total Likes
Hi @robertc66522596 ,
You can use conditional statement in message center.
Modify your conditional statement as below,
<% if ( rtEvent.ctx.email.@type == 'Order' ) { %>
Your Order is en route
<% } else { %>
Your Order is delayed
<% } %>
Views
Replies
Total Likes
Thank you ParthaSarathy!
That did the trick. I figured i needed those additional <% to get the RT event marker, good to know I do not.
Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies