How to Create an import set api using SOAP?

VanshAgarwal
Tera Contributor
 
1 ACCEPTED SOLUTION

Akash4
Kilo Sage
Kilo Sage

Hi Vansh,

As a first step you can create a staging table, or use existing table (System Import Sets > Load Data > Create Table > u_soap_staging_table, add any relevant fields of your interest ex: u_name, u_email, u_phone)

Secondly, create a SOAP Message (in System Web Services), Give a name and an Endpoint URL* - something like https://<instance>.service-now.com/u_soap_staging_table.do?SOAP

Create child within SOAP Message > SOAP Action > New. Add an XML sample data (shown below), this will create a record in staging table.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:urn="urn:u_soap_staging_table">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:insert>
         <u_name>Vansh Agarwal</u_name>
         <u_email>vansh.agar@example.com</u_email>
         <u_phone>12121212</u_phone>
      </urn:insert>
   </soapenv:Body>
</soapenv:Envelope>

Finally, validate your testing using external tool like - Postman using Endpoint and an XML data like above.

Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.

View solution in original post

1 REPLY 1

Akash4
Kilo Sage
Kilo Sage

Hi Vansh,

As a first step you can create a staging table, or use existing table (System Import Sets > Load Data > Create Table > u_soap_staging_table, add any relevant fields of your interest ex: u_name, u_email, u_phone)

Secondly, create a SOAP Message (in System Web Services), Give a name and an Endpoint URL* - something like https://<instance>.service-now.com/u_soap_staging_table.do?SOAP

Create child within SOAP Message > SOAP Action > New. Add an XML sample data (shown below), this will create a record in staging table.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:urn="urn:u_soap_staging_table">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:insert>
         <u_name>Vansh Agarwal</u_name>
         <u_email>vansh.agar@example.com</u_email>
         <u_phone>12121212</u_phone>
      </urn:insert>
   </soapenv:Body>
</soapenv:Envelope>

Finally, validate your testing using external tool like - Postman using Endpoint and an XML data like above.

Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.