Skip to main content
Solved

Conversational Process - Decision Policy - Adjust bot response based on status code error

  • November 14, 2025
  • 1 reply
  • 45 views

Forum|alt.badge.img+1

Is there a way to customize the bot response or use the decision policy to route the response based on error status code received from an API call? 

Example:
I have an action that submits an email. If the email is valid the API returns the required data if not valid it returns Status Code 400 error. 

Status Code: 400
Response:
{
"code": "error",
"message": "Email not valid."
}

Email not found in the system means their account doesn’t exist and the bot should relay access request information. 

I’ve attempted using the decision policy using if data is valid or not but with no luck.

Best answer by Kevin Mok

Hey ​@sgrimes - you will need to use a compound action and put your HTTP action in there and wrap it in a try-catch

This way you can catch the status code and perform a different action or return different information to your conversation process

1 reply

Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • Answer
  • November 14, 2025

Hey ​@sgrimes - you will need to use a compound action and put your HTTP action in there and wrap it in a try-catch

This way you can catch the status code and perform a different action or return different information to your conversation process