need help in flow

nameisnani
Mega Sage
We have a catalog item with the following fields:
 
  • Related Category (Mandatory) – Choice field with values:
    • Collaboration and Communication
    • Cyber Security Services
    • Hardware
    • Infrastructure
    • Software
  • Application Name – Reference field to the Business Application table

nameisnani_0-1781863978651.png

 

 Current Behavior

When both fields are selected:
Example:
  • Related Category = Hardware
  • Application Name = ServiceNow Production
Flow:
  1. Line Manager Approval
  2. Hardware Group Owner Approval
  3. Application Support Group Approval (based on Application Name)
  4. Catalog Task is created for ServiceNow Production Support Group
This is working as expected.

nameisnani_1-1781863978653.png

 

 New Requirement

If:
  • Related Category is selected
  • Application Name is NOT selected (empty)
Then after:
  1. Line Manager Approval
  2. Category-based Group Owner Approval
The request should route to default fulfillment groups based on category, as below:
 
 
Related Category Default Fulfillment Group
Collaboration and CommunicationInfrastructure-SUP
Cyber Security ServicesCyberSecurity_Tools-SUP
HardwareTechHub-SUP
InfrastructureTechHub-SUP
SoftwareSUP
nameisnani_2-1781863979454.png

 

nameisnani_3-1781863979460.png

 

 

 

can anyone please help me in scrp

 

 @Ehab Pilloor  need your help here

Ehab Pilloor
Mega Sage
 
z
 
 
 
2 REPLIES 2

Sanjay191
Kilo Patron

Hi @nameisnani 

Please find the below steps for this , i hope this will help you. 

 

current scenario that you build( already build)

Your existing flow works like this:

  1. User selects Application Name.
  2. User selects Related Category.
  3. Flow uses the Application Name to determine:
    • Fulfillment Group
    • Approval Group
    • Other routing logic
  4. Ticket gets assigned and approved correctly.

 

new scenario to handle

Now you want to support cases where:

Application Name Related Category Result
Selected Selected Existing flow works
Not Selected Selected New logic required

For example:

Application Name Related Category
Empty Database
Empty Network
Empty Security

In these cases, the system should still know which group should handle the request.


Proposed Solution

Step 1: Add a New Condition in Flow Designer

Add a condition:

 

 
Application Name is Empty
AND
Related Category is Not Empty

When this condition is met:

 
Call Subflow

instead of continuing with the same flow.


Step 2: Create a Subflow

Example:

 

 
Subflow Name:
Determine Fulfillment Group by Category

Inputs:

Current Record
Related Category

Outputs:

Fulfillment Group
Approval Group

Step 3: Create a Decision Table(Very Helpful)

Create a Decision Table like(Example):

Related Category Fulfillment Group Approval Group
Collaboration and Communication Infrastructure-SUP DBA Manager
Cyber Security Services CyberSecurity_Tools-SUP Network Manager
Hardware TechHub-SUP Security Manager
Infrastructure TechHub-SUP Support Manager

Input:

Related Category

Outputs:

Fulfillment Group
Approval Group

Step 4: Use Decision Table in Subflow

In the Subflow:

 

 
Input Category

Decision Table

Return Fulfillment Group
Return Approval Group

Example:

Category = Collaboration and Communication

Decision Table returns:

Fulfillment Group =Infrastructure-SUP
Approval Group = DBA Manager

Step 5: Update the Request

In the Subflow:

Then trigger approval using:

 

Approval Group
Current.assigned_to_group = Fulfillment Group

or

 
Current.assignment_group = Fulfillment Group

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You

Tanushree Maiti
Tera Patron

Hi @nameisnani 

 

If new requirement (validation) needs to do  post 2nd approval completed , 

Add another If loop with the following condition

  • Related Category is not empty AND
  • Application Name empty

Then generate catalog task  with fulfillment group based on selected Related category

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti