Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to get the Status code from Flow action

AnilM99
Tera Expert

Hi Team,

 

I am using Rest message in flow action and getting external site responses to show in virtual agent successfully.

The challenge here is the https status code is showing in virtual agent. please find the below screenshots.

1.

AnilM99_0-1711538740174.png

2.

AnilM99_1-1711538838896.png

3.

AnilM99_2-1711538868169.png

4. In Virtual agent topic:

AnilM99_3-1711538907412.png

5. Response in VA:

AnilM99_4-1711538969490.png

 

Thanks

Anil!

 

3 REPLIES 3

Not applicable

Hi @AnilM99 ,

 

use the below code :

 

var httpStatus = response.getStatusCode();
outputs.status_code = httpStatus.toString();

AnilM99
Tera Expert

Hi @sohail thanks for the quick response

I tried the same but not working.

 

Thanks

AnilM99
Tera Expert

Hi team, 

finally it's working, the issue is my Flow action is failed, i created new action and add my script it's working now

Thanks!