Can a REQ/RITM/SCTASK be automatically scheduled?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 01:59 PM
There's a monthly task that we'd like to associate with a REQ/RITM/SCTASK and have it be automatically created/assigned. Is that possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 10:52 PM
Hi @jmeza
The functionality you are looking for is definitely achievable. Given that the catalog item is already existing in the system and you are looking for a way to create a request for this catalog item every month automatically. The easiest way to do it would be:
1. Create a event "order_catalog_item".
2. Create a script action for the event "order_catalog_item".
3. In the script action script, you can use the script from "CartJS" API to create the service request from the script. Refer to : https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc... to understand how you can order from the script.
4. Create a scheduled job which will run monthly. In the scheduled job you can trigger the event "order_catalog_item".
Please mark the answer helpful and correct if it resolves the issue. Happy scripting
-Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2025 09:38 PM
Hi @jmeza ,
I hope the issue is resolved or are you stuck somewhere with respect to the issue?
-Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2025 07:55 AM
Hi shananu,
i haven't tried the solution yet but i will this week. thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 10:56 PM
yes this is possible
2 ways
1) Create a scheduled monthly flow and then use "Submit Catalog Item Request" flow action to submit the catalog item with your variables
check this link
Submit Catalog Item Request action
OR
2) You can also use monthly scheduled job and script like this and use Cart API
try{
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
//add your requested item to the cart by sys_id of the catalog item
var item = cart.addItem('0336c34407d0d010540bf2508c1ed096', 1);
//fill in the variables on the request item form
cart.setVariable(item, "asset", "00a96c0d3790200044e0bfc8bcbe5dc3");
cart.setVariable(item, "multiple_choice", "Phoenix");
var rc = cart.placeOrder();
gs.info(rc.number);
}
catch(ex){
gs.info(ex);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader