Bulk Catalog item creation from Excel sheet

Pooja P
Tera Contributor

Hi Team,

 

We have requirement to create bulk catalog items from excel sheet . anyone already implemented we are looking for valid template on same.

Any leads will be appreciated.

 

Thanks

5 REPLIES 5

Tanushree Maiti
Mega Patron

Hi @Pooja P 

 

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 (sample- update it as per your requirement)

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: sample

Requested_for

Request Summary

Detailed Description

user1

Sample summary

Sample description

user2

Another summary

Another description

 

Step 2: Import the Excel File into ServiceNow

  1. Sign in to ServiceNow with the appropriate access rights.
  2. Navigate to System Import Sets → Load Data.
  3. Click New to create a new data source.
  4. Set the Type field to File.
  5. Upload the Excel spreadsheet.
  6. Complete any additional required fields and save the record.
  7. 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

  1. Navigate to System Import Sets → Administration → Transform Maps.
  2. Click New to create a transform map.
  3. Choose the import set table as the Source Table.
  4. Select the destination table, typically sc_req_item or the relevant catalog item table, as the Target Table.
  5. Add an onBefore Script: Use the following code template in the Transform Scripts related list. 
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
 
    var cartId = GlideGuid.generate(null); 
    var cart = new Cart(cartId);
    var item = cart.addItem('<YOUR_CATALOG_ITEM_SYS_ID>'); 
 
    cart.setVariable(item, 'requested_for', source.requested_for);
    cart.setVariable(item, 'short_description', source.requested_summary);
cart.setVariable(item, 'description', source.detailed_description);
    var rc = cart.placeOrder(); 
    ignore = true; // Prevents the transform map from creating a duplicate record
 
})(source, map, log, target);
 

Step 4: Validate the Imported Records

  1. Open the target table (for example, sc_req_item).
  2. Review the newly created records.
  3. Confirm that all field values have been imported correctly.

 

(Optional)

Step 5: Automate the Import Process

For recurring imports, you can configure automation:

  1. Go to System Import Sets → Administration → Scheduled Data Import.
  2. Create a scheduled import job.
  3. Select the appropriate data source.
  4. 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

 

 

refer : https://www.servicenow.com/community/guided-learning-itsm/automated-bulk-data-import-from-excel-usin...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: