Create an API Variable, Config Parameter, or Record Reference for the policy version in the Define Variables section of the Policy Builder.

Before you begin

If you want to create a variable that will apply to all of your policies, then do the following:
  1. Go to the Variable Definition section on the main page.
  2. Select the variable section that you want to create.
  3. Select Add.

When you save the variable, it will show up in the Define Variables section on the Policy Builder of the policy.

Role required: sn_pace.code_editor

Procedure

  1. In the Policy builder tab, select the version of the policy you want to add a new variable to, then the Data sources icon Data source icon.
  2. Select the variable tab that you want to create a variable from then select Add.
    Data source tab.


    Create new API variable window.
    A pop-up window appears titled with the variable you want to create.
  3. On the form, fill in the fields as needed.
    Table 1. Create a new variable form
    Field Description
    Label Label name of the variable.
    Name Name of the variable.
    Type Drop-down list of input types:
    • Basic Date/Time
    • Basic Time
    • Choice
    • Data Array
    • Data Object
    • Decimal
    • Email
    • Integer
    • IP Address
    • JSON
    • Other Date
    • Reference
    • String
    • Sys ID (GUID)
    • True/False

    Depending on the input you choose, the Advanced Options provides different fields for some inputs. For more information, see the Data type descriptions topic.

    Note: The list only shows the most common used data types.
    Mandatory Option to make this variable mandatory.

    When the variable is mandatory, a value must be provided when mapping the policy. Otherwise the policy can’t be executed.

    Description Description of the variable.
    Note: When you add a description for a Config Parameter variable, it will show up under the tool tip icon Tool tip icon. in the Test Parameters tab.
    Default Value Default value for the variable.
    Note: When you create a record reference, select a reference in the Table field, this field enables you to select a dependent document from the reference.
    Function (Optional) Functions to aggregate your condition. Choices are as follows:
    • Average: Average value of the condition.
    • Count: Count of the number of non-null values.
    • Maximum: Largest or maximum value.
    • Minimum: Minimum value.
    • Standard deviation: Population of standard deviation.
    • Sum: Sum of all values.
    Note: This field will only show up in the Record Reference variable form with the qualifier condition fields.
    Match criteria A match criteria for your record reference. Choices are as follows.
    • Select first match
    • Error on multiple

    When you create a Record Reference, it will query multiple answers. The match criteria enables you to filter out the match by selecting the first match or return an error if there are multiple answers.

    Note: This field will only show up in the Record Reference variable form with the qualifier condition fields. For more information about condition fields, see Policy logic condition fields.
  4. Select Save.

Result

You can add your variables into the Policy Builder as needed. Additionally, you can delete a variable by selecting it and selecting the Delete button.