Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Trigger different emails for Connected and DisconnectedApps

sundas7
Regular Contributor II
Regular Contributor II

Hi Experts,

We have few Connected and Disconnected Apps.We would like to trigger separate emails for them( with minor variation in wordings/links in body of the email).

Among the disconnected apps, there is one app which would also require separate email.

So 

1. EmailTemplate1--For all ConnectedApps

2.EmailTemplate2--For all Disconnected Apps except one app

3. EmailTemplate3: For that one exceptional app.

Should we achieve them via if conditions in Email template or should we trigger them via WF?

I tried via if conditions in email template for one app, but it does not seem to work.

<% if((endpoint.toString().contains('App1 Name'){print "${manager?.email},${user.email}"}%>

Thanks

Shyam

4 REPLIES 4

nimitdave
Saviynt Employee
Saviynt Employee

At what point of request you want this email to be triggered.?

If its for task creation then you can have it for each app. 1 template for all connected and 1 for disconnected.

If in wf you can have 2 templated as above and use the same in respective connected and disconnected wfs.

 

dgandhi
All-Star
All-Star

What is the error?

Thanks

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

sundas7
Regular Contributor II
Regular Contributor II

Hi Nimit , 

Thanks for the immediate response.  We are looking to trigger for every ARS based requests for these apps.  We currently see ( in PROD) ,just one WF being attached to 99% of these apps ( Security System:Access Add Workflow & Access Remove Workflow).

Hence, I am trying to test using the same WF in NON Prod.

So should we attach IF-else blocks before "Grant Access" block to check for these endpoint/apps OR setting the conditions in To field in email templates should be a better option? or any other approach be followed?

@dgandhi , thanks Devang,

In Non Prod,I tried to check the logs but could not find anything specific,but after I removed the below from email, I can see email triggered for one app. 

<% if((endpoint.toString().contains('App1 Name'){print "${manager?.email},${user.email}"}%>

Thanks

Shyam

 

nimitdave
Saviynt Employee
Saviynt Employee

Please try as below

<% if ((task?.tasktype == 3) && (task?.endpoint?.endpointname?.equals('Helloword'))) print "${manager.username}"" else print "${user.email}" %>

In the grant access block task is already created so use as above.