- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 12:09 PM
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
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 12:48 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 12:26 PM
hello
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 .
PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 08:08 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2022 12:28 AM
hello satnik yes it will follow the attached workflow to the catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 09:06 PM
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
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader