Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Custom SOAP response for insert/update SOAP functions - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Custom SOAP response for insert/update SOAP functions
KB0830710

Custom SOAP response for insert/update SOAP functions


2109 Views Last updated : Jan 3, 2025 public Copy Permalink
KB Summary by Now Assist

Summary

ServiceNow provides Out of the box SOAP functionalities to perform CRUD operation on the records.

To retrieve a direct web service WSDL description and XML schema, point to the relative URL <tablename>.do?WSDL

The targeted resource (or table) is defined in the URL by the format https://<instance name>.service-now.com/<table name>.do.

Once the WSDL is imported , insert or update functions can be performed .

Once the insert or update is done, standard response is returned.
For example for insert operation sys_id is returned.
<insertResponse xmlns="http://www.service-now.com">
            <sys_id>6b06494fc611227d00b5f87caf618831</sys_id>
</insertResponse>

If a custom response is required with specific fields , this can achieved using Scripted SOAP web services

Instructions

1) create scripted soap service ,give a name
2) define input and output parameters

Attached screenshots for reference
Sample script below that take 3 inputs (sys_id,caller_id,short_description) , updates the "incident record" and sends 3 response output parameters (number,short_description,description) of the updated incident.
Input parameters are stored in the request object and output parameters are stored in response object

*********************
(function scriptedWebServiceOperation(request, response) {

// Add your code here
var sysid = request.sys_id;
var callerid = request.caller_id;
var shortDescription = request.short_description;
var gr = new GlideRecord("incident");
gr.get(sysid);
gr.caller_id = callerid ;
gr.short_description = shortDescription;
gr.update();
response.number = gr.number;
response.short_description = gr.short_description;
response.description = gr.description;

})(request, response);

*********************

Import the created WSDL and test .


NOTE: This is just a reference example . Scripting is beyond the scope of ServiceNow support . 





The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.