Approvals on your Multi request takes to long?
I have the root cause and for now your solution.
If you have a request with multiple items behind it, then you might have encountered that approving your requested item takes longer then normal.
Depending of how many requested items you have under the same request, will effect your approval time.
This is caused by an OOB business rule 'Reduce request price - approval change' in 'sysapproval_approver' table.
This business rules runs after every approval, and unfortunately in the script it points to an black box script 'SNC.request' so we can't see what is happening there.
But based on my testing it will recalculate the remaining price of your request based on the items approved or rejected.
This means everytime you approve an item this business rule is tirggered, and at our end it takes between 2 and 4 seconds before it comes back with a result. Since the business rule is on after this means it will held up the session of end user before it will let you continue.
So if you have a request with 10 items behind it, you can calculate an approval on one of the items will take between 20 to 40 seconds, and so you can imagine if more items how much longer it will take, and how unhappy your end users are/will be.
Now you might wonder why this needs to run, if the price of an item is 0?
Exaclty my thought and also the solution, by adding a condition to the script condition '&& current.approval_for.price>0' will exclude all the items that don' have any price.
One thing to add is to set also the business rule to async, so you won't held back the session and give it back to the user, while the price calculations are happening on the background.
we have raised a case to ServiceNow, and initial reaction of the support was this is OOB so expected behavior. We pushed and they are looking at it with their dev team.
ServiceNow off course we don't want to do customizations to solve issues!
Special thanks to Mriganka Kalita
Female Founder & CEO | Leading AI for Social Commerce at Influence Next | 30 years of experience in Retail Technology | Thought Leader in AI, Social Commerce and Revenue Growth.
1moGood stuff Jon… you going to come to London for Influence Next? It will be like Fashion Digital, only better and talking about AI stuff we couldn’t have imagined 10 years ago…