How to setup Conditions on the sysapproval_approver email notification for certain Request Items

Peter Williams
Kilo Sage

Hello everyone,

 

i need some advise. 

i have created a few catalog items using the sc_req_items that has approvals added to them.

I was able to make a email script to read the request items variables and have them displayed on the approval email

======================================
${mail_script:exp_full_approval_v2} (this is the custom script for the ritm variables )
 

${mail_script:email.button.approve.insert }     ${mail_script:email.button.reject.insert } 

Approval Activity:
${mail_script:approval_activity}

Click here to view ${sysapproval.sys_class_name}: ${sysapproval.URI}

${mail_script:attachments}
 
====================
 
What i need is to add in conditions into the notification so that it will only send out this notification base on the catalog item that was being filled out, in this case an expense report.
 
i tried using this: (questions is a dot walk from Approver for.Questions
PeterWilliams_0-1697823733255.png

 

however, wheneven i update or save this, the conditions returns to blank.
PeterWilliams_1-1697823806961.png

 

 

what can i do to have this to work?

 
9 REPLIES 9

Hello @Peter Williams ,

How the notification event is called/fired?

We can add the some script like this over there.

it gets called when a approval request is inserted into the sysapproval_approver table via a BR rule called approval.inserted

this is an OOB setup

 

 

Prince Arora
Tera Sage
Tera Sage

@Peter Williams 

 

I wanted to check one thing, from where you are firing event?

If its a business rule you can add condition there only before firing the event

 

OR 

 

you can mention the condition in advance section of Notification

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

yes i would like to know how to do it in the advance section of the notification

But How do i put in a advance condition for the catalog Item name if the notification is coming from the sysapproval_approver table?

@Peter Williams 

 

You can do something like this 

As sysapproval field contains the sys_id of record for which approval has requested 

 

current.sysapproval.cat_item.name == "Name_of_item"

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.