JSON data type

  • Release version: Washingtondc
  • Updated May 2, 2024
  • 1 minute to read
  • Store JSON formatted text values. JSON values can be generated by integration steps or by scripts.

    Basic options

    Option Description
    Label Displays the label used to identify the data variable in the Flow Designer interface. The label can consist of any text.
    Name Displays the name used to identify the data variable in script calls. The name can only consist of alphanumeric and underscore characters. The system automatically converts the label into a valid name by removing or replacing any special characters.
    Type Indicates the type of data stored by the data variable.
    Mandatory Indicates whether the data variable must contain a value when configured in an action.

    Advanced options for JSON variables

    Option Description
    Hint Provides guidance to flow or action designers on how to configure the data.
    Default value Specifies the value used when a flow or action designer does not provide a value.

    Choice list items as a JSON array

    This example shows storing three choices of a choice list field as JSON formatted text. In this example, the data attribute has an array of three objects as its value. Each object in the array has label and name attributes.
    {
        data: [
            {
                label: "Choice Option 1",
                name: "choice_option_1"
                
            }, 
            {
                label: "Choice Option 2",
                name: "choice_option_2"
            }, 
            {	
                label: "Choice Option 3",
                name: "choice_option_3"
            }
        ]
    }