The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Request Level Approval for Order Guide

Reddy
Kilo Sage

My catalog workflow has a manager approval, now I want to move it to the request level instead of request item level. So if a user has multiple request items in one request, the manager just receives one approval email. Any idea of how to implement this?

 

Thanks.

3 REPLIES 3

Manish Vinayak1
Tera Guru

Hi Rama,

You can add the manager approval activity to the request table (sc_request). But, if you do that, it will generate line manager approvals for all generated requests, as all catalog items generate REQ, RITM as part of the core set-up. 

If you want to make it dynamic, i.e., generate line manager approvals only for some specific catalog items, one approach that I can think of is:

  • Create a checkbox (true / false) field on catalog item record called "Manager Approval Required".
  • Create a workflow on sc_request table
  • In that workflow, check if that REQ record has any RITMs associated which require manager approval ( you will need to refer to the catalog item linked with those RITMs) - This will need a run-script activity to check if there are such RITMs.
  • If there are RITMs which require manager approval, generate the manager approval, and proceed the workflow based on approval / rejection.

 

This approach would let you generate single approval for multiple RITMs under one REQ, and will also make sure that it doesn't generate the manager approval for all catalog items. You will have that configurable check-box on your catalog item record.

(Note: That approach moves the manager approval to REQ level, even if the request is not generated using order guide / has multiple RITMS. If you only want it to work for order guides, you will need to add conditions to make it work only for order guides).

Just a suggestion.

Hope this helps!

Cheers,

Manish

Allen Andreas
Administrator
Administrator

Now you want it to work that way? Or is there a requirement from the business? This should really be determined by a process owner and not something a Sys Admin/Dev thinks to do as there is significant impact by doing that on the request level. Not all catalog items may need manager approval and the manager may want to approval only 1 thing...instead...having it at Req now controls the entire request if it gets approved or not.

Not ideal at all.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Bishnu Prasad
Kilo Explorer

It’s a workaround instead of configuring approval on Request level.

Lets say we have 2 RITMs under an Order guide, you want to run the approvals/not to set approvals of 2nd RITM based on first RITM.

Create a business rule to query the current request number in requested item table, condition =   after update.

Sample  :

 

var item1 = current.cat_item.getDisplayValue();

                if (item == 'First item name where you want to put approval’)

                                {

                                                var REQ = current.request.sys_id;

                                                var stage = current.stage;

                                               

                                                if(stage == 'fulfillment')

                                                                {

                                                                                var item2 = new GlideRecord('sc_req_item');

                                                item2.addQuery('request',REQ);

                                                item2.addQuery('short_description','2nd item name, where ');

                                                item2.query();

                                                if(item2.next())

                                                                {

                                                           var number = item2.number;

                                                        item2.state = '168'; // it will set the 2nd RITM’s state into In progress

                                                              item2.update();

                                                            }

                                                            }

 Now in 2nd RITM’s workflow, put a timer of your choice, and check for the condition (if state == ‘In progress), so once the first RITM will be approved, it will set the 2nd RITM state into In progress and hence your tasks will be triggered without asking for any approval.

 

 find_real_file.png

 

So, in short you will have to approve your One RITM , and for rest of RITMs you can directly create catalog tasks.