How to create SCTASK for each RITM in flow

mania
Tera Contributor

Hi,

 

I have created a flow for creating three RITM's on one request and mapped to the respective groups but here i want to create one SCTASK for each RITM that means one RITM under one SCTASK and 2nd RITM under one SCTASK and 3rd RITM under one TASK.

I have tried to add create catalog task after 4th step and 6th step but it is generating multiple duplicate RITM's.

Can anyone please help on this, it will be usefull.

 

mania_0-1729093396533.png

mania_1-1729093724134.png

 

Thanks!

6 REPLIES 6

Hemanth M1
Giga Sage
Giga Sage

Hi @mania ,

 

When you use Service catalog as trigger, Flow automatically generates RITM>REQ, why are you generating RITMs again??

 

"Create Requested Item Record" is your custom action?? if yes, its not best way to create RITMs.

 

If you need mutliple taks for each group create mutiple sc tasks and assign it to each group instead RITMs.

 

If you would like to create multiple RITMs, I would do :

1)Copy code snippet from this flow (removing your custom action and just have one task creation logic), have a BR on submit of this request form the UI form, Call the script twice so that on submit of catalog item you got 3 RITMS, 3 Tasks

OR

2) Use cart api to create RITMs in bulk using the above logic.

 

Hope this helps!!!

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

mania
Tera Contributor

@Hemanth M1 

Thanks you for your responeded!

Here can you please help the below.

Once i submit a request three RITM's should be generated one RITM for X group, 2nd RITM for Y group and 3rd RITM for Z group so We have created a, b and c fields on RITM form and also i have a field called "Category" under we have Software and Hardware choices in catalog item in portal so once i select the Software option and submit the catalog item form from the portal and "a" field should be visible on first RITM (X group) b and c field should be hide, "b" fields should visible on second RITM (Y group) a and c should be hide and "c" field should be visible on third RITM (Z group) a and b field should be hide on RITM form.
If i select the Hardware option and submit the catalog item form from the portal and "a" field should be visible on first RITM (X group) b and c field should be hide, "b" fields should visible on second RITM (Y group) a and c should be hide and "c" field should be visible on third RITM (Z group) a and b field should be hide on RITM form.

Can yoiu please help on this, It will be useful.

 

Thanks!

This is not the recommended way to accomplish this.  You should simply use one RITM with 3 Tasks, each task is assigned to the group to work it.  Fulfillers work on tasks, not RITMs.  Once all 3 tasks are completed the RITM will complete and the Request.

mania
Tera Contributor

@Aoife 

Can you please tell me. I have explained the above just tell me instead of RITMS, SCTASK should be there then how can we display fields in SCTASK based on Category field choices from catalog item form.

Can you please suggest, it will be helpful.

 

Thanks!