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
simply ask the end user to add attachment on that item using paper-clip icon
then that file gets attached to RITM record which is generated
From there you can handle the BR logic
links I already shared about excel parsing and cart JS
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
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
Ahh, maybe there is a confusion on my requirement.
The excel file contains rows that should be mapped to RITMs in the system.
This means that I don't have end users to add attachments.
It's only one excel file that should be imported by an admin into the system, and each of the rows should be mapped to an automatically created RITM. Therefore, I am not sure that the after BR approach is in line with my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
that's what the approach I shared will do
-> admin attaches excel to the item and submits
what dos each row of that Excel represent?
-> does it say to create catalog item
OR
-> does it hold variables associated to particular catalog item and for each row a new RITM, REQ should get created with the respective variable data from excel?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
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
That's the correct scenario:
'it hold variables associated to particular catalog item and for each row a new RITM, REQ should get created with the respective variable data from excel'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
then links I shared should help to achieve
GlideExcelParser - Scoped, Global
Parsing the Excel Sheet data & Use the data In automation via Request Item(Catalog Item)
Understanding sn_sc.CartJS() in ServiceNow: Its Importance and Use Cases
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader