How to call third party web services from service now ?

soumya_c
Kilo Explorer

I am new to this and I have the follwoing integration to complete - Can any one please guide me how to proceed ?

 

On Incident create/edit/resolve - I need to trigger a call to 3rd Party WCF and update the incident details (Number, Short Desc, Opened, Assigned to, Priority) to the vendors application.

 

Need help :

1. How to get the events on Incident - Submit/ load/ update etc - Is that can be done from "Client Scripts " section.   May I do something like

function onSubmit() {

// My wcf service call goes here: Not sure how to call.

}

 

2. How to call SOAP web services from Service Now. Say I need to call this method -   PutProject

This also requires Basic Authentication. (UserName , password ) . If there is a way to pass cookie information , that 'll be good.

 

3. How to set some custom field values of Incident from a third party application - Say I want to add a Id to incident (which is retried from third party product.)Rob Woodbyrne Eric SchrederFred LuddyJeff HollingerBill Collins

 


9 REPLIES 9

What I understood is I need to add 'sysparam_' prefixed to each param in this case. But I could not get where to define this 'MySOAPCallAjax' ? In my case I have added a out bound soap message called 'Replicon_ProjectService1' which have a method called 'PutProject'. May I use the same ? Or how can I use it ? Sorry for the ignorance, if I sound stupid, but I am learning ! mguy!


marcguy
ServiceNow Employee
ServiceNow Employee

MySOAPCallAjax would be a client callable script include.



what I would do for now though is just get this working in a business rule which runs server-side rather than implemting client side yet, when it's proven, you can then think about whether you really need it client side. to get it running in a BR put the code in the BR.



thanks,


Marc


Hi,



I think you should try this script on Business rule.


In our case, for each company, all the SOAP processes are in a Script Include


For each form (Incident, RITM, CTASK) we have a business rule which if triggered calls the script include and passes the relevant values and "functions" across


the script include performs the post, retrieves the 3rd parties reference number and then returns that



the Business rule then reads the return and updates the ticket as needed



I felt this was easier as the SOAP code is in one place for all forms - so cannot forget to update the code for the RITM if you have updated the code for Incident



SOAP functions are different per company so best tailored as needed and less chance of impacting another companies bonding


marcguy
ServiceNow Employee
ServiceNow Employee

agree with julian poyntz there, once you have it working move it into a script include or just do it initially in there and then in the future you can call it from elsewhere and even make it client callable if necessary.



http://wiki.servicenow.com/index.php?title=Script_Includes


Marc