Choice v2

The Choice v2 tool performs a flow deviation within an integration based on the status code, the body or both.

This step is part of the general tools, that help to organize the integration flows.

Now, learn how to add it to the canvas, how to configure its form and check its required settings.

Add Choice v2 to the canvas

  1. Click the wrench icon with a plus sign icon from the editing menu on the left.

  2. Select the Choice v2 to add it to the canvas. You can use the search bar search steps icon to find it.

    You can add Choice v2 as many times as you need. In this case, each time you add this tool, a number is added next to its name (Choice v2 1, Choice v2 2, Choice v2 3).
  3. Connect Choice v2 to the flow steps. This tool can be connected to a previous step and to one or more subsequent steps.

To delete Choice v2 from the canvas, select it and click the trash can icon button.

Configure the form

  1. Select Choice v2 tool on the canvas.

  2. Click the pencil icon editing icon.

    When you connect Choice v2 to the subsequent step, its configuration form will open automatically.
  3. Fill in the following fields of the form:

    In the section INFORMATION:

    • Name: enter a unique name for the step. By default, you will see it as "Choice v2". Alphanumeric field with a limit of 20 characters.

    • Input Data: select the step that will provide the input data to apply the condition. You will see the request and response data from the previous step.

      You have to select input data in the field Input Data to enable editing the steps in the CONFIGURATION section.

      The section CONFIGURATION will show all the steps that have an output connection with Choice v2 in the canvas.

      To see the configurations of a step in Choice v2, click the down arrow on the right side of the screen.

      To edit the configurations, click the editing icon next to the trash can.

      To change the order in which the steps appear on the screen, click the icon icon with three parallel horizontal lines on the corresponding line and drag and drop in the position you prefer.

      To remove a step from the section CONFIGURATION, click the trash icon next to the name of the step, on the right.

      The alert icon next to the steps will disappear after configuring the form’s mandatory fields.
      choice v2
  4. Open the form of each step individually, by clicking the pencil icon on the right of the name of the step. Fill in the following validation conditions:

    • Label: enter a name that identifies the flow deviation. Alphanumeric field with a limit of 50 characters.

    • Type: select one option:

      • WHEN: defines a condition that deviates your integration flow to a specific execution line. If there is more than one step of the WHEN type, the conditions will be executed according to the order of the steps on the screen and you can define the execution order. The option WHEN is selected by default.

      • OTHERWISE: it is executed when none of the WHEN conditions are met. This field doesn’t allow conditions or status code validation. The step of the OTHERWISE type will be the last item of the list. When you choose it, you only have to click CONFIRM.

    • Field Condition: enter the condition that will determine the flow deviation. You can choose between:

      • Status Code: to add conditions based on the HTTP status codes returned by external API calls.

      • Body: to add conditions based on the body.

      • Status Code and Body: to combine both previous options.

        The options Status Code and Status Code and Body will only be enabled for selection if you select a response in the field Input Data. Otherwise, the field Condition will only present the option Body.

        According to the condition that you choose in the Field Condition field, you must fill in the specific fields that follow:

        Status Code

    • Operation Status Code: select the option IN or NOT IN.

    • Status Code: add specific codes: 200, 404,500 etc. or the code families: 1XX,2XX,3XX,4XX and 5XX. You can add more than one code or family code and you can add them alternatively.

      status code

      Body

    • Condition: add the condition to be applied in the step. Use JSONPath format. Alphanumeric field that allows special characters and blank spaces, with a limit of 1024 characters.

      body

      Status Code and Body

    • Operation Status Code: select the option IN or NOT IN.

    • Status Code: add specific codes: 200, 404,500 etc. or the code families: 1XX,2XX,3XX,4XX and 5XX. You can add more than one code or family code and you can add them alternatively.

    • Operation Condition: select the option AND or OR.

    • Condition: add the condition to be applied in the step. Use JSONPath format. Alphanumeric field that allows special characters and blank spaces, with a limit of 1024 characters.

      status code and body
      To create a condition, access the page Creating a condition in JSONPath.
  5. After you finish configuring the form, click CONFIRM, and to cancel, click CANCEL.

  6. Return to the Choice v2 screen and when you finish configuring all the forms, click SAVE.

Required settings

The alert icon alert icon will only disappear if there are:

  • The input connection, on the left;

  • At least one output connection, on the right;

  • A WHEN condition;

  • A OTHERWISE condition.

When removing a WHEN connection between Choice v2 and a step on the canvas, the Choice v2 configuration form will open automatically, allowing you to reconfigure or remove the disconnected condition.
Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]