Skip to content
ProcessIQ

Integrations and API calls

API call steps: retries, call log and failure branches

How an API call step behaves: what counts as success, which failures are retried, how to keep response values and how to route failures.

Last updated

An API call step sends one request to a system your administrator has connected, waits for the answer and moves the workflow on. This article covers settings, retries and what to do when a call fails. First, an administrator must add the system. See connect an external system.

Settings on the step

SettingWhat it does
IntegrationThe name of the connection. It must be active.
Method and PathThe request line. The path starts with / and is joined to the integration's base address.
Body (JSON)Sent for POST, PUT and PATCH. May include {{form.field}} placeholders.
Extra headersOptional. Credentials come from the integration, so you cannot set authorisation headers here.
Keep from the answerSaves parts of the response as vars.<name>, using a path such as data.id or items.0.name.
Timeout (s)How long to wait for one attempt, from 1 to 30 seconds. The default is 15.
AttemptsHow many tries in total, from 1 to 5. The default is 3.

What counts as success

A call succeeds when the other system answers with a 2xx status. A redirect (3xx) counts as a failure, because redirects are not followed. If you listed values under Keep from the answer, each one must be found in the response. A missing field counts as a failure and is not retried. Saved values can then be used in later conditions as vars.<name>. See the expressions reference.

Retries

  • A call is tried again when there is no answer, the attempt times out, or the system answers 429 or a 5xx error.
  • The wait between attempts grows each time, up to a few minutes.
  • Other answers, such as 400, 401, 404 or a redirect, fail straight away. Retrying would not help.
  • Every call carries an Idempotency-Key header, which stays the same across retries, so the receiving system can recognise and ignore a repeat.

Add a failure branch

  1. Draw the connection for the normal route and select it. Set Taken when the call to Succeeds.
  2. Draw a second connection, select it and set Taken when the call to Fails (after all attempts).
  3. Send the failure route to something useful, such as a Task for someone to enter the data by hand, or a Notification.

An API call step needs exactly one success connection and can have at most one failure connection.

See what happened

  • The request timeline shows when the call was queued and whether it succeeded or failed.
  • An administrator opens Integrations and chooses Calls to see each attempt: time, method and path, status code, duration and attempt number. Failed attempts include the error.

Simulation assumes API calls succeed, so test the failure route by making a real call fail in a test setting. Learn more in validate and simulate. The API calls and integrations module page gives an overview, and conditions and branching shows how to act on saved values.

Try ProcessIQ yourself

Start a free trial or open the shared demo organisation with a test account for every role.