We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to send an approval to diferent people based on different Service Catalog Category?

The Matrix
Tera Contributor

Hi All,

I'm working on a Catalog Item and one of the requirement is to send the RITM for approval to different people based on different  Sevice Catalog Category value. 

Which workflow activity should I use here? 

 

Thanks!

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@The Matrix 

you can use Workflow User Approval Activity and use advanced script

then set the user based on category

answer = [];

var cat = current.cat_item.category.getDisplayValue();

if (cat == 'Office')
    answer.push('userSysId1');
else if (cat == 'Software')
    answer.push('userSysId2');

AnkurBawiskar_0-1769072994039.png

 

If you are using flow designer then you can use scripted approvals and set the approval dynamically

Scripted Approvals in Flow Designer with Flow Variables 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron

Hi @The Matrix 

You can use the Get Catalog Variable and, based on the variable value, condition the approval.

 

https://www.servicenow.com/community/developer-forum/trigger-approval-dynamically-from-a-list-type-f...

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

yashkamde
Kilo Sage

Hello @The Matrix ,

I would recommend you to use the Decision tables for that..

Ankur Bawiskar
Tera Patron

@The Matrix 

you can use Workflow User Approval Activity and use advanced script

then set the user based on category

answer = [];

var cat = current.cat_item.category.getDisplayValue();

if (cat == 'Office')
    answer.push('userSysId1');
else if (cat == 'Software')
    answer.push('userSysId2');

AnkurBawiskar_0-1769072994039.png

 

If you are using flow designer then you can use scripted approvals and set the approval dynamically

Scripted Approvals in Flow Designer with Flow Variables 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Tejas Adhalrao
Kilo Sage

Hi @The Matrix  ,

Use Flow Designer  - Table: Requested Item (sc_req_item)  

                                     - Trigger: When RITM is created 

 

                                      2) use flow action - if -else 

                                           (Inside each condition, add: Ask for Approval)

                                        If Category = Hardware →  send approval to Hardware Approver 

                                       If Category = Software → send approval to Software Approver 

                                       If Category = Access → send approval to Access Team

 

 If you found my solution helpful, please mark it as Helpful or Accepted Solution...!

thanks,

tejas

Email: adhalraotejas1018@gmail.com

LinkedIn: https://www.linkedin.com/in/tejas1018