By default, a successful request is determined by the response HTTP Code being in the info (1xx) or success (2xx) ranges and anything outside of these is treated as a request failure.
Sometimes, an API will return a response that needs to be treated differently to how it would normally be handled. For example, an API might return a 400 error to indicate a part of the request contains invalid data. We can use a response action to catch that error and do something about it.
The Response Action executes the following steps:
Run retry logic. Retry logic takes precedence and will cancel the Response Action if possible. If no more retries can be made (or no retry is required), the Response Action is executed.
If no retry error has occurred, the request and transaction states are updated according to the Response Action.
Notify the user by adding an integration note. A note will only be added according to the notification script on the Integration.
If a script is specified, execute the script.
The Details fields that can be configured for the Response Action record are as follows:
The quick reference name of this Response Action.
An explanation of what the response action is intended to do.
The Integration this action applies to.
(Visible when Integration is populated). Only run this Response action for this message.
The status code to match on the request.
The type of response according to the code.
Application containing this record.
The Settings fields that can be configured for the Response Action record are as follows:
Retry the request to the limit specified by the Integration before running this response action.
Add a note to the Bond and, if the Integration permits, the target record.
Override the Transaction State on the Transaction.
Override the Process State on the Transaction.
Override the Request State on the HTTP Request.
The script to run when this action is executed.
The Active field can be configured for the Response Action record as follows:
Enable/Disable this action.