Create Multiple Catalog items (along with variables) in scheduled basis

Satanik1
Giga Guru

Hello Experts,

My requirement is to run a scheduler to check for new users in every 4 hours and if found, create new joining requests automatically for the user.

Please let me know the feasible procedure for this.

Thanks,

Satanik

1 ACCEPTED SOLUTION

Hi,

Let flow run every 4 hours and check if any new user got created in last 4 hours and if yes then iterate all those and submit the catalog item.

If you want the request to be submitted directly when new user is created then use after insert BR and use Cart API

OR

You can use flow which triggers on User insertion and use 

Submit Catalog Item Request action

Regards
Ankur

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

View solution in original post

8 REPLIES 8

Mohith Devatte
Tera Sage
Tera Sage

hello @Satanik 

So you need to do these things in order to achieve this 

You need to already have a catalog item created for new joining requests with variables where it should have requested for field which stores the new user name for  whom the request is being raised

1) Create a scheduled job which runs on regular interval for every four hours

2) in the condition field write the script in such a way that it goes to user table and check if there are any new records that got created for today and then go to RITM table and check if there is an request already raised for this user as we have requested for field ,check if this user has any RITM with requested for value as this person if found do return else do return true which would satisfy the condition and allow you yo go to script field 

3) Now in the script field you need to use cart API which is used to raise requests through script.

Refer below link on how to use cart API to generate requests .

https://docs.servicenow.com/bundle/sandiego-application-development/page/app-store/dev_portal/API_re...

PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU

Hi Mohith,

Got it. Let me try the solution. I did till #2. But I need to use the cart API now. So Once I submit the cart, it will follow the backend workflow right ?

Thanks in advance.
Satanik

hello satnik yes it will follow the attached workflow to the catalog item

Ankur Bawiskar
Tera Patron
Tera Patron

@Satanik 

No need of scheduled job/script. you can achieve this using Flow designer with no-code/low code solution

Flow will run every 4 hours and check for the new user

Then Flow has "Submit Catalog Item Request" action which you can use to create REQ, RITM

Submit Catalog Item Request action

Like this

find_real_file.png

Regards
Ankur

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