EmailTemplate - Variable for email signature

Which IIQ version are you inquiring about?

Version 8.2

Share all details related to your problem, including any error messages you may have received.

hello all
I’m working on email templates.

I would like the emails to all have the same signature, something like
“Thank you, best regards”

but I have several different templates and the signature may change.

I would like to have the signature in a variable on a specific location and I wanted all emails to get this signature. Is it possible? to add this in a variable and put that variable in the emails ?

Thank you all

Hi @RIsidoro,

If it is fixed text that you want to place as signature, then you can place in some property file and then with variable substitution you can populate in all templates with change in details of property file.

But if the use case is about dynamic insertion of some HTML content, then it has been discontinued by SailPoint for security reason.

Let me know if further input/help is needed.

Thanks

Hello @ashutosh08
It was supposed to be both cases, but if I could at least do it flor plain text, that would be very good.

How Can I do it ? put the text in variable in a property file and then use in email template

Thank you

Hi @RIsidoro,

In simplest way you can use your build process for variable substitution. Please check below link which have SSB deployment steps and in this you will get you variable substitution example also.

https://community.sailpoint.com/t5/Services-Standard-Deployment/Services-Standard-Build-User-Guide-SSB/ta-p/73434

Let me know if you have further question.

Thanks

Is it possible do something like this

#set(Custom mappingObj = context.getObjectByName(Custom.class, "Custom_signature")

and then some how use mappingObj to get the value of some key ?

Yes but this code need to be added to all the Template , but here good thing is you need to modify only in custom object in case you need to update signature .

Yes, you can use velocity for details insertion from custom, but HTML tag you will not be able to do.

Please use below sample code that contain a string in custom. Let me know if further help needed.

#set($ctx = $spTools.class.forName("sailpoint.api.SailPointFactory").getMethod("getFactory", null).invoke(null,null).getCurrentContext())
    
    
#set($customClass = $spTools.class.forName("sailpoint.object.Custom"))

#set($mappingObj = $ctx.getObjectByName($customClass, "Custom_Mail"))

$mappingObj.attributes.Email_Template_Text

Sample Custom

<Custom name="Custom_Mail">
  <Attributes>
    <Map>
      <entry key="Email_Template_Text" value="Value that should be inserted."/>
    </Map>
  </Attributes>
</Custom>

Thanks

@RIsidoro

One more option you can try,
a. Create a MessageTemplate named “Signature Message Template” that contains your signature text with HTML syntax

b. In your email template you can use by below line

at the top of body

#set($spctx = $spTools.class.forName("sailpoint.api.SailPointFactory").getMethod("getFactory", null).invoke(null,null).getCurrentContext())

At the location where you want to add Signature

$spctx.getObjectByName($spTools.class.forName("sailpoint.object.MessageTemplate"), "Signature Message Template").getText();

Hello Thank you all for your help
With your code spinets I was able to do it

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