how can I add dynamic variables in email layout?

SheltonT
Tera Expert

We created an email layout to set the email header & footer to keep a consistent design across notifications. 

In the email layout we added the variable  ${notification:body} for the email body placing it between the header & footer.

Is it possible to add other variables? We want to have a dynamic first line on the email layout so the email preview in outlook/gmail/etc. shows something. We tried  ${notification:subject} but when previewing the email notification the body will no longer show upon adding this. 

 

1 ACCEPTED SOLUTION

The subject is not the same across all notifications. We were attempting to use the subject line from the notification email the email layout/template is ultimately used on as the first line of the email body as well for now.

 

I dont want to set the subject line as that is already being driven by the email notification. But we can try adding a mail script to the email layout/template to set the text above the header. 

View solution in original post

5 REPLIES 5

jcmings
Mega Sage

Have you tried to create an email template? You can set up the template with the header and footer and the content will insert within.

Teh email layout is used within the email template. So have that set-up. What i am looking to do is have a dynamic first line on the beginning of the email above the header so it appears in the email preview. I am hoping there is a variable or something we can use to do that similar to how you insert ${notification:body}

What is in red text in the first image below is what I want to add to the email layout/template but make dynamic. This is what shows in the email preview (pointed at in green in the second image)



SheltonT_0-1742422589805.pngSheltonT_1-1742422628148.png

 

 

Thanks for the high-detail screenshots. A+ question asker!

 

You could probably set up something like a mail script to conditionally show different content in the first line.

JohnnySnow
Kilo Sage

@SheltonT Is this subject same across all the notification? If not then create a mail script and try to set the dynamic subject using email.setSubject.

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.