Message Center Conditional Formatting - Campaign V8 | Community
Skip to main content
robertc66522596
Level 4
September 27, 2023
Solved

Message Center Conditional Formatting - Campaign V8

  • September 27, 2023
  • 1 reply
  • 947 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

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 <% } %>

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
September 27, 2023

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 <% } %>
~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
robertc66522596
Level 4
September 27, 2023

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!