Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Multi Import Set API not populating values in the staging table

Priyam Sharma
Tera Contributor

I had used Import Set API for importing a incident table data. First the data goes to "incident staging table" then after transformation, it will go to main "incident" table.

I tried from postman, 

POST https://dev185338.service-now.com/api/now/import/u_incident_staging_table

 with a payload, 

{
    "u_number": "EXT001", (coelasce)
    "u_caller": "Priyam Sharma",
    "u_short_description": "this is test",
    "u_description": "this is test2",
    "u_urgency": "2",
    "u_impact": "2"
}
and its working fine as expected and successfully data inserted into incident.
But, when i am hitting this api from postman, 
POST https://dev185338.service-now.com/api/now/import/u_incident_staging_table/insertMultiple
with payload, 
{
    "records": [
        {
            "u_number": "EXT002",
            "u_caller": "Abel Tuter",
            "u_short_description": "2nd short description",
            "u_description": "2nd description",
            "u_urgency": "1",
            "u_impact": "3"
        },
        {
            "u_number": "EXT003",
            "u_caller": "Abraham Lincoln",
            "u_short_description": "3rd short description",
            "u_description": "3rd description",
            "u_urgency": "3",
            "u_impact": "1"
        },
        {
            "u_number": "EXT004",
            "u_caller": "Arron Ubhi",
            "u_short_description": "4th short description",
            "u_description": "4th description",
            "u_urgency": "3",
            "u_impact": "3"
        }
    ]
}

it is responding me with 201 created response and also with a multi_import_sys_id also. but, when i am checking the incident staging table, the records are getting created but no values are populating inside the records. 
PriyamSharma_1-1783329356499.png

 


PriyamSharma_0-1783329309332.png

 

PriyamSharma_2-1783329397959.pngPriyamSharma_3-1783329497272.png

 

PriyamSharma_4-1783329553644.png

 

I don't know, what's wrong? Is there any other role is required to give for multi import set request or payload must be different for this type of requests. i had already checked all ACLs, still no solution i am getting.

Regards
Priyam Sharma
Servicenow Developer
1 ACCEPTED SOLUTION

Vikram Reddy
Tera Guru

Hi @Priyam Sharma ,

 

This is a known gap with insertMultiple, not something wrong with your ACLs or roles. The single-record POST and insertMultiple actually go through different code paths, and insertMultiple needs an extra configuration step that isn't obvious from the standard docs.

By default, insertMultiple checks the Rest Insert Multiples table (sys_rest_insert_multiple) to decide how to map the keys in your records array to columns on the staging table. If there is no record configured there for your staging table, the platform falls back to matching incoming keys against field labels instead of field names. Your payload uses column names like u_number and u_caller, not labels like "Number" and "Caller", so nothing binds and the row is created with every field left blank. That matches your screenshots exactly: rows exist, values don't.

To fix it:

  1. Go to System Definition > Rest Insert Multiples (table sys_rest_insert_multiple).
  2. Create a new record with Table set to your staging table, u_incident_staging_table.
  3. Set Column mapping to Column name (the out of box default is Label).
  4. Open the related list on that record and add a Column mapping entry for each field you're posting: u_number, u_caller, u_short_description, u_description, u_urgency, u_impact. Without an explicit mapping row per column, the JSON keys still won't bind to the staging table fields even after step 3.
  5. Set Transform to synchronous if you want the transform map to run in the same transaction as the insert. Asynchronous works too, it just runs off the scheduler afterward.

One more thing that catches people out: make sure there is only one active record in sys_rest_insert_multiple for that staging table. If a duplicate or leftover record exists, the platform can't determine which mapping to apply and you'll get the same blank-row behavior even after doing everything above.

Once that's configured, re-run your insertMultiple call and check Transform History (sys_import_set_run), filtering where Set equals the import_set_id your API call returned. That confirms the transform actually ran, and sys_import_set_row_error will show row-level errors if anything else is off.

The official reference and a community thread where someone hit this exact symptom are here: Inserting multiple records using insertMultiple and Blank fields imported with Import Set insertMultiple.

 

Thank you,
Vikram Karety
Octigo Solutions INC

View solution in original post

1 REPLY 1

Vikram Reddy
Tera Guru

Hi @Priyam Sharma ,

 

This is a known gap with insertMultiple, not something wrong with your ACLs or roles. The single-record POST and insertMultiple actually go through different code paths, and insertMultiple needs an extra configuration step that isn't obvious from the standard docs.

By default, insertMultiple checks the Rest Insert Multiples table (sys_rest_insert_multiple) to decide how to map the keys in your records array to columns on the staging table. If there is no record configured there for your staging table, the platform falls back to matching incoming keys against field labels instead of field names. Your payload uses column names like u_number and u_caller, not labels like "Number" and "Caller", so nothing binds and the row is created with every field left blank. That matches your screenshots exactly: rows exist, values don't.

To fix it:

  1. Go to System Definition > Rest Insert Multiples (table sys_rest_insert_multiple).
  2. Create a new record with Table set to your staging table, u_incident_staging_table.
  3. Set Column mapping to Column name (the out of box default is Label).
  4. Open the related list on that record and add a Column mapping entry for each field you're posting: u_number, u_caller, u_short_description, u_description, u_urgency, u_impact. Without an explicit mapping row per column, the JSON keys still won't bind to the staging table fields even after step 3.
  5. Set Transform to synchronous if you want the transform map to run in the same transaction as the insert. Asynchronous works too, it just runs off the scheduler afterward.

One more thing that catches people out: make sure there is only one active record in sys_rest_insert_multiple for that staging table. If a duplicate or leftover record exists, the platform can't determine which mapping to apply and you'll get the same blank-row behavior even after doing everything above.

Once that's configured, re-run your insertMultiple call and check Transform History (sys_import_set_run), filtering where Set equals the import_set_id your API call returned. That confirms the transform actually ran, and sys_import_set_row_error will show row-level errors if anything else is off.

The official reference and a community thread where someone hit this exact symptom are here: Inserting multiple records using insertMultiple and Blank fields imported with Import Set insertMultiple.

 

Thank you,
Vikram Karety
Octigo Solutions INC