- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 10:46 PM
Hi!
I am trying to run a remote action using ServiceNow Virtual Agent which will return the device health from a third party tool called Nexthink. I have created the required REST Message and HTTP method to invoke the API call. I have also created a topic in Virtual Agent Designer which contains a script to call the REST message and return the response. I will attach the code below. I am able to get correct response through the REST message, but I am not able to parse the response or output through Virtual Agent. Any help would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 11:47 PM
Please try replacing
vaVars.responseBody
with
var responseBody
in both the codes and retry.
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 11:47 PM
Please try replacing
vaVars.responseBody
with
var responseBody
in both the codes and retry.
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:39 AM
I used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2024 06:05 AM
@shishirsapkal , can you please share the final working script which you have parsed in the virtual agent, even I am trying the same and needed help. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 10:49 AM
@shishirsapkal - I'm having trouble writing the parameter in the 'Content' of the POST command. Would you mine sharing the part you have blacked out (replacing sensitive data)? Following Nexthink's documentation, I keep getting {"message":"Invalid number of named parameters","code":103,"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 02:23 AM
The reason is when you trigger a remote action using Nexthink it takes sometime to complete the action ... approx 1min .. for that 1 min you will either get an in progress status or the object "data" will be empty .. so in order to get the execution status we need to leverage some time ... also please check the response body .. generally the api to check the execution status doesnot provide result of executions which are 1 hr before .. please check these filters /conditions in the response body ..