AI Rule Engine Docs
Go to App

Data Types & Values

Every value the engine handles is typed. Typing tells the engine how to compare, transform, and serialize data, and it underpins the structured JSON and XML builders.

Data values

A data value pairs a data type with the underlying value. It can also be marked secret so the value is masked in the UI and logs. A value may be a single scalar or an array of values of the same type. When a value is authored as a constant, you choose its type and enter the value in the data-value editor.

Value data types

The value data types are:

TypeHolds
StringText of any length.
NumberAny numeric value, whole or fractional, stored with high decimal precision.
BooleanTrue or false.
DateTimeA date and time.
BlobBinary or large content such as files or documents.
UrlText the engine recognizes as a web address (for example, it can be URL-encoded when used in a request path).
One Number type

Earlier releases offered separate numeric types (Byte, Short, Integer, Long, Decimal, Float, and Double). These are now a single Number type. Anything saved with one of the old numeric types is read as a Number automatically, and any numeric entry is valid.

Pick the type first When you author a constant, you choose its data type and then enter the value. The editor interprets what you type according to that type, so set the type before filling in the value.

Value inputs and outputs

A value input is how an author points at a value to read: a constant, a context key, a variable, or an expression. A value output describes where an action's result is written. Outputs support these destinations:

OutputDestination
ContextStored back into the run context under a key.
BlobStored as large or binary content, keyed from a value in the context.
VariableSaved as an environment variable.
IgnoreThe result is discarded.

JSON structures

The engine can assemble JSON payloads from context values. A JSON payload is built from a root that is either an object or an array:

  • JSON root — the top of the document; an object or an array.
  • JSON object — a set of properties.
  • JSON property — a name paired with a value (a scalar input, a nested object, or a nested array).
  • JSON array — an ordered list of items, each of which can itself be a scalar, object, or array.

Scalar leaves carry a JSON data type, which is one of String, Number, Boolean, or Null. Each scalar pulls its value from a value input, so the structure is fixed while the data is resolved at run time.

XML structures

An XML payload is a tree of elements rooted at a single element. The building blocks are:

  • XML root / element — has a name, optional namespace prefix, attributes, and either text content or child elements (not both).
  • XML attribute — a name/value pair, optionally namespace-prefixed.
  • XML namespace — a declaration of a namespace URI, with an optional prefix; child elements inherit declared namespaces.

As with JSON, element names, attribute values, text, and namespace URIs are all value inputs, so the document shape is authored once and filled from context at run time. JSON and XML are produced by the create actions covered in Data & Transform Actions, which write the result to an output context key.