RITM notification - Request approval assigned

Priya V M
Tera Contributor

Hi All,
Need your help in configuring one notification for sysapproval_approver table
When to send condition - 

An Approval, targeting the sc_req_item table, is assigned to a user

Who will receive - approver
one more condition added is that item.catalog contains service catalog 
how to configure this notification?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya V M 

if you are saying approval email needs to be sent on RITM only if RITM->Catalog Item->Service Catalog

Then do this in OOTB email in advanced notification condition

if (current.source_table == 'sc_req_item') {
    var ritmSysId = current.sysapproval;
    var ritmRec = new GlideRecord('sc_req_item');
    ritmRec.addEncodedQuery('cat_item.sc_catalogsLIKEe0d08b13c3330100c8b837659bba8fb4');
    ritmRec.addQuery('sys_id', ritmSysId);
    ritmRec.query();
    answer = !ritmRec.hasNext();

} else {
    answer = true; // don't check if the approval is not for RITM
}

AnkurBawiskar_0-1752587009472.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

J Siva
Tera Sage

Hi @Priya V M 

You can achieve this using event registry and buisness rule with required condition.

Create after business rule and trigger notification using the event.

Let us know where you stuck..

Regards,

Siva

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya V M 

there is already OOTB approval email which goes when approval is raised for RITM

why you want to create another one?

This is the OOTB email notification

AnkurBawiskar_0-1752586441269.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Priya V M 

if you are saying approval email needs to be sent on RITM only if RITM->Catalog Item->Service Catalog

Then do this in OOTB email in advanced notification condition

if (current.source_table == 'sc_req_item') {
    var ritmSysId = current.sysapproval;
    var ritmRec = new GlideRecord('sc_req_item');
    ritmRec.addEncodedQuery('cat_item.sc_catalogsLIKEe0d08b13c3330100c8b837659bba8fb4');
    ritmRec.addQuery('sys_id', ritmSysId);
    ritmRec.query();
    answer = !ritmRec.hasNext();

} else {
    answer = true; // don't check if the approval is not for RITM
}

AnkurBawiskar_0-1752587009472.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader