Add Excel Attachment to create Multiple RITM with One Request ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2014 10:32 AM
Hi Everyone,
Currently new to Service-now and were trying to implement bulk creation on service catalog. As we have some users that are requesting for access for like 50 users and up and Add to Cart function is not okay for them.
1. The requirement is for the users to attach an excel sheet on a catalog item
2. Service-now will then have to process the attachment and create multiple requested items per row on the attached sheet
3. This should be one REQUEST generated with MULTIPLE RITM based on the rows on the attachment.
Not much of an expert on scripting as well...
Has anyone implemented same process?
Thank you in advance,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2014 05:56 AM
I've done something like this, but it was fairly complex. My process was:
1. Create a data source with your template spreadsheet.
2. Create a transform map that creates a new item for each row in the spreadsheet.
3. Create a scheduled import for that data source. The scheduled import will allow you to call it from a script and will automatically run the transform when called.
4. Create a UI Action or flag/business rule on the request that copies your attachment to the data source, then kicks off the scheduled import.
This is a very simplified version of this and each step is going to require some scripting, but it is possible.
All that being said, I would do everything possible to pushing people to using the Service Catalog UI to create requests and items. With the spreadsheet you're going to have to do a lot of manual data validation, and you may be setting yourself up for creating more processes like this in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2014 10:29 AM
Thanks Brad, I tried something similar as well based on your advised, What i used is an inbound action that copies the attachment to the data source and calls the scheduled import i created.
But there are some issues that I'm getting:
1. When i used the sc_req_item table as the target table for the transform map, it does creates an RITM for each row however, there is no associated request id created for each RITM.
2. If i used sc_cart table with an onBefore transform script to add the cart, it creates each row but with different Request ID instead of one.
Do you have any advise on this one as well?
Thank you in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2014 10:48 AM
I would do the following with the transform map scripts.
onStart script that creates the cart. - This runs once at the start of the import
onBefore script that adds each row as an item and then sets ignore = false - This runs once for every row
onComplete script to submit the order. - This runs once at the end of the import
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2014 11:08 AM
Thanks Brad.
But is it okay to share some sample scripts on how to do this?
Thank you again in advance,