OOB email template in IdentityNow

Hi team ,

I’m trying to put some condition in OOB email template which is lifecycle state change template, However condition is not allowing the body section and It is getting disappearing immediately.

REF :
#if($workerStatus==“Terminated” || $workerStatus==“Retired”)

${managerName},

$Subject

Thank you,

#else #stop #end

If and else disappearing.

Any suggestions on this ?

And do we have character limit in email template body?

I added subject with Script and now not able to open the template, Any suggestions on this ?

Hi @saikumarS,

Have you tried using straight quotes (" ") instead of curly quotes (“ ”)? sometimes those get copied incorrectly.
I think I read somewhere that the limit is approximately 450,000 characters for the entire template. Don’t quote me on this one.
Hope this helps!

Hi @saikumarS welcome to Community,

  1. Try to update the email template body via source code edit.

    You will be basically putting your HTML here, it will render and get evaluated in normal page.
  2. The behaviour of disappearing #if else conditions from template page is common, but once you trigger the email template, it should give you the email based on the evaluation of email template with the respective #if else conditions.
  3. Also, i ma not sure if it will like you have pasted the if condition, but this is how i am using: #if($identity.endDate)...... #{else}$identity.terminationDate

Hope this helps :slight_smile:

Hey @saikumarS,

I tried your code in the email template and it worked for me.

Code I used: :point_down: ( Same as your code with some modifications )

#if(${workerStatus}=="Terminated" || ${workerStatus}=="Retired")
<p>${managerName}, ${subject} Thank you,</p>
#else #stop #end

Just make sure any variable you are trying to access is in the format ${variableName}. Also, I had to manually add double quotes as copying it from here and pasting in IDN was not working.

Make sure you Save the template first and then and use Test Email functionality to verify your changes.

HTH.

@zeel_sinojia can you try the below and check
#if($workerStatus.equals(‘Terminated’) || $workerStatus.equals(‘Retired’))

${managerName}, ${subject} Thank you,

#else #stop #end

Also please check if the workeStatus is a searchable attribute

I don’t think equals operation works as it was giving me error while sending a test email. I might be wrong.

I modified the code as below and it worked for me. Which is similar to the one I posted earlier.

#if(${workerStatus} == "Terminated" || ${workerStatus} == "Retired")
<p>${managerName}, ${subject} Thank you,</p>
#else #stop #end

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.