How to import records into the sc_req_item table using an Excel file and the ServiceCatalog API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I have the following requirement that I am trying to implement.
1. I have created a simple catalog item that looks like this:
Variables:
Requested for (requested_for)
Request summary (request_summary)
Detailed description (detailed_description)
2. I have an Excel file where each row represents a distinct requested item. Three columns in the file store the values for each of the variables defined in the catalog item above (see Step 1).
Requirement: I want to implement a logic where an Excel file is imported, and RITMs are automatically created. Each row in the Excel file represents one RITM. The values in the row’s columns should be mapped to the corresponding variables of the catalog item.
For example, when the first row of the Excel file is imported, it should result in the creation of a RITM (e.g. RITMXXXXXX) with the following variable values:
- Requested for: Abel Tuter
- Request summary: First request
- Detailed description: This is a dummy first request
3. I created a data source, like the following:
4. Then, I created a transform map, as shown below.
But starting from here, I am confused. I put as target the sc_request table, but not sure if this is correct.
What the target table should be?
How can I invoke the ServiceCatalog API, Order Now, for each of the rows?
Thank you in advance,
Smith.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Just a quick follow-up—were you able to review the links above and try the suggested approach?
Please let me know if you need any assistance.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Using following steps, you can create bulk catalog item requests in ServiceNow using an Excel file.
Option 1: Using Data Source ,Transform map script(onBefore) .
Refer: Create a RITM From transform map scripting
Step 1: Create the Excel File
Prepare an Excel spreadsheet with columns that match the catalog item fields below:
- Requested for (Reference)
- Request Summary (Single Line Text)
- Detailed Description (Multi Line Text)
Example format:
Requested_for | Request Summary | Detailed Description |
user1 | Sample summary | Sample description |
user2 | Another summary | Another description |
Step 2: Import the Excel File into ServiceNow
- Sign in to ServiceNow with the appropriate access rights.
- Navigate to System Import Sets → Load Data.
- Click New to create a new data source.
- Set the Type field to File.
- Upload the Excel spreadsheet.
- Complete any additional required fields and save the record.
- After saving, select Load All Records to import the spreadsheet data into the import set table.
Step 3: Transform the Imported Data into the Target Table
- Navigate to System Import Sets → Administration → Transform Maps.
- Click New to create a transform map.
- Choose the import set table as the Source Table.
- Select the destination table, typically sc_req_item or the relevant catalog item table, as the Target Table.
- Add an onBefore Script: Use the following code template in the Transform Scripts related list.
Step 4: Validate the Imported Records
- Open the target table (for example, sc_req_item).
- Review the newly created records.
- Confirm that all field values have been imported correctly.
(Optional)
Step 5: Automate the Import Process
For recurring imports, you can configure automation:
- Go to System Import Sets → Administration → Scheduled Data Import.
- Create a scheduled import job.
- Select the appropriate data source.
- Define the execution schedule based on your requirements.
Option 2: it is using data source, transform map & BR
Automate Data import from Excel File Attachment via Catalog item & Import Sets
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti