Skip to main content
Skip table of contents

JSON Realtime Decision

A JSON realtime decision allows you to make realtime decisions based on pieces of JSON data persisted in a parameter within a visitor’s profile.

A JSON realtime decision contains the following:

  • Visitor Parameter: this mandatory property represents the visitor profile parameter within which JSON to be used by the realtime decision will be stored.

  • JSON Schema: allows you to provide a piece of JSON, which will be used as the basis for determining the types of decision criteria available at the realtime decision. At its initial display, the following text is shown:

You must supply a JSON schema; a validation error is raised prior its provision.

On clicking the button, the JSON Schema dialog is displayed. It contains the following:

Valid JSON document: you can paste or enter a JSON document in this multi-line field. The example provided will be used as a schema to establish the list of decision criteria types available to the realtime decision. Clicking the OK button removes the dialog from display. If you provided a JSON example the property's text is changed as follows:

On invocation of Add new Decision Criterion, if an invalid JSON schema supplied, a warning is raised.

If a valid JSON schema was supplied, available JSON elements (objects, arrays and attributes) are listed in the Add New Decision Criterion dialog. In addition, standard Custom and Custom JSON decision criteria are available. The latter are covered separately.

You can select an element to use as the basis for creating a new decision criterion. On selection of the same, the new decision criterion is displayed in the realtime decision and is selected automatically.

When displayed in edit mode, a JSON decision criterion appears as follows:

  • Name: of the JSON parameter.

  • Apply Filter: this Yes/No dropdown defaults to ‘No’. When set to ‘Yes’, the Operator and Value fields allows you to specify a filter to limit the decision’s targets.

  • Operator: a dropdown. The values available are type-specific; if the JSON element is numeric, Operator defaults to '=', and if string, to 'contains'.

  • Value: provision of a filter value is mandatory. Data entry is constrained in accordance with the JSON element's data type:

    • Decimal: defaults to '0.0000'; the maximum supported value is '9999999999.9999'

    • Integer: defaults to '0'; the maximum supported value is '9999999999'

    • String: a button is shown. Its label is set initially to 'No values. Click to select'. Clicking the button displays the Specify Values dialog, in which you can specify one or more filter values.

Note that a validation error is raised in the event of adding the same value more than once. Having specified values, you can click the OK button or click off the dialog to close it. The values are displayed as a comma-separated list at the Additional Details panel and are also shown in a tooltip on hover.

  • Aggregate function: a dropdown field, in which available values are presented alphabetically. The following values are always available:

    • Any (the default)

    • Not any

The following additional value is available if the selected JSON element is an array or an attribute of an object in an array:

Count

The following additional values are only available at numeric JSON attributes:

  • Sum

  • Minimum

  • Maximum

  • Average

If a value other than Any or Not Any is selected, the following additional fields are displayed:

  • [Operator]: set using a dropdown; defaults to '='.

  • [Value]: if the selected Aggregate function is Count, an integer field is supplied, otherwise a decimal field is used to specify the value. The property defaults to '0'.

The following are shown when the decision criterion is based on a JSON array:

A read-only JSON criterion appears as per the following examples:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.