Importset API issue

sathishkesavara
Tera Contributor

Hi,

I'm trying to insert cost center details into ServiceNow from third party application. I have created web service table (i.e. staging table), fields, transform map, basic authentication.

 

Endpoint given to customer: https://dev123.service-now.com/api/now/import/sn_hr_core_cost_center

Http method: POST

Application: Human resource: core

Note: Customer sending the request in XML format

 

I encounter following issues while using import set API. Tested using Postman tool.

1.Import is successful i.e. getting status code as 201, but unable to see response body with import details

2.Though import is successful, empty records were created in Staging table which in turn create empty records in target table

 

Not sure if I miss anything. I believe for the given scenario import set API approach is correct. let me know if different approach should be taken.

Kindly let me know if anyone have faced similar issues or any insights on this will be much appreciated.

 

Thanks

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@sathishkesavara 

did you create transform map, field map for it?

Are they sending the JSON request body in correct format?

The body should look like this

{

"importSetStagingFieldName1":"u_test1",

"importSetStagingFieldName2":"u_test2",

}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

sathishkesavara
Tera Contributor

Hi Ankur,

Yes, transform map and field mapping is created. if the issue is on the Target table then we can take a look at the Transform map. But here my issue is with Staging table itself.
Please note Other application is sending the data in XML format.

 

Attached screenshots for reference.

@sathishkesavara 

so it's soap based web service.

Did you check data is getting inserted into staging table?

Did you test this with SOAP UI before sharing the details to 3rd party?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes, on each import run a new record got inserted in Staging table but the values (i.e. xml input fields) is empty.

I tested with Postman and REST API Explorer. Both return the same result.