How would I prevent the OOB "Approval Request" notification from firing when triggered by my catalog item?

Shant Cancik
Tera Contributor

I've created a custom Approval Request notification for my catalog item. Currently both notifications fire because they have the same event trigger "approval.inserted".

I'd like to create a condition that I can use in both of these notifications where if my catalog item's workflow launches an approval, I want my custom approval notification to fire and not the default one to fire. Anyone have an idea on how I'd do this?

6 REPLIES 6

ccajohnson
Kilo Sage

Ask yourself what the difference is in the record that is to be approved of the custom one versus the OOB one. What table do both records belong to? Then you should be able to change the conditions on both notifications to allow for one and not allow for the other.


Hey Christopher,



My goal is to include the RITM's variables in the approval notification so approvers can actually read the user inputted information before making an approve/reject selection from the email.



My thought process was not to modifty the OOB one to do this. Is there an easier way than what I'm trying to do by creating a separate approval notification and putting variable data in the body of that one?



Thanks,


Shant


I think a better way would be to create a custom event to use with your custom notification. There is a business rule on the Approval table called Approval Events (Task) that you can make a copy of. That way you can edit it and use any logic that distinguishes this record from other records. My guess is that this will be used for every requested item and not just a particular workflow. If you read through that Business rule you will see that they get the table name for different approval types. You should be able to create one for Requested Items [sc_req_item], then leverage the new event you created.


drasamsetti
Kilo Expert

Hi Shant,



I would not recommend to touch/change the OOB approval notification as it is not considered best practice approach from Service Now standard point of view. But if there is no other route for you then..
you can make use of the "Advanced   Condition" to have custom script will check for which item the OOB approval notification should fire.



Note: i will not recommend this approach unless you don't have any other way but to go with custom approval notification.



find_real_file.png



PS: Hit like, Helpful or Correct depending on the impact of the response