Websockets (ServiceNow instance as the server)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 10:20 AM
Hello all,
A colleague is building a web portal, outside of ServiceNow, which will be displaying some data that resides in our ServiceNow instance (and some data that resides elsewhere) to our end customers.
One use case is that the end customer may request some quotes. An API call will be made to our ServiceNow instance, from where a number of further calls will be made to partner APIs. There will be some additional processing and calculations made based on the results of those partner API calls. A number of 'quote' records will be created in ServiceNow.
My initial idea was that the call from the web potral should not wait for all the responses and calculations etc, but that instead the ServiceNow instance would return an acknowledgement and create a record representing the request, and then later (within a minute) make a number of outbound calls to an end point on the web portal side, as the quotes are generated (i.e. completely asynchronously).
However, my colleague has asked if instead we could use a websocket connection. I've seen a few other posts on this topic but I don't think they're asking about quite the same thing. In this use case, ServiceNow would be the server and the web portal would be the client, initiating the connection. So I was envisaging something similar to a scripted REST API. Is it possible to implement an endpoint using the Websocket protocol in this way?
Thank you
Jamie