Understanding Status Codes in Guided Workflow

Updated 

Overview

Status codes in Guided Workflow are essential for tracking the success or failure of API calls. This guide explains how to retrieve, display, and store these status codes effectively within your workflow.

Retrieving Status Codes

To access the status code of an API node, use the predefined process variable:

  • Process Variable: STATUS_CODE

    This variable automatically holds the status code of the most recently executed API node.

Displaying Status Codes in the UI

To show the status code on the workflow screen:

  1. Add a Description Text Component after the API node (on either the Success or Failure path).

  2. Set the content of the component to:

    ${STATUS_CODE}

Example:

If the API response is 200, it indicates Success. Any other status code is treated as Failure in Guided Workflow.

Handling Multiple API Nodes

When your workflow includes multiple API nodes, you can store their individual status codes using:

  • Variables – For temporary storage during the workflow.

  • Multi-Text Custom Fields – For persistent storage across sessions.

Example: Using Variables

  1. Create a new process variable (e.g., API1_STATUS_CODE).

  2. Assign the current status code to it right after the API node runs:

    API1_STATUS_CODE = ${STATUS_CODE}
  3. Repeat for each API node with separate variables:

    API1_STATUS_CODE = ${STATUS_CODE}

Example: Using Multi-Text Custom Fields

Use a text-based multi-value custom field (e.g., GW Text Multi CF) to store multiple status codes for future reference.

Additional Utilities:

Device Type & IP AddressGuided Workflows also support dynamic detection of the end user’s device and IP address using special process variables:

  • ${USER_AGENT_UTILS.getOSDeviceType()}

Returns the device type (e.g., Desktop, Mobile, Tablet)

  • ${USER_AGENT_UTILS.getIpAddress()}

Returns the IP address of the user

Note: These variables are not available in the resource selector and must be manually added where needed.