05/18/2023 04:38 AM
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
05/18/2023 06:15 AM
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.
05/18/2023 06:18 AM
What is the error?
Thanks
05/18/2023 06:30 AM
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
06/09/2023 07:09 AM
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.