Simple variable types

Simple variables created in Mix.dialog are of a specified type. When you send a variable, whether in the StartRequest payload or in a data access action, you must make sure to send the data in the right format so that it can be used by the dialog application.

This table lists the types of simple variables and describes how to send them to the dialog application.

Variable type Description
String String of characters
Alphanumeric String of alphanumeric characters (a-z, A-Z, 0-9)
Digits String of digits (0-9)
Boolean Boolean (true, false)
Integer Whole number
Decimal Decimal-point number
Amount Amount, including currency. Specify the amount in an object with the following elements:
  • unit: Unit of currency, such as USD
  • number: Number of units
The currency is dependent on the grammar. For example, if the en-US grammar is used, the only currency accepted is USD.
Date Date (YYYYMMDD)
Time Time. Specify as a string using the format HHMMx, where x is one of the following:
  • a: for AM
  • p: for PM
Distance Distance, including unit and modifier. Specify the distance in an object with the following elements:
  • modifier: Modifier such as LT for “less than”
  • unit: Unit of distance, such as km
  • number: Number of units
See the nuance_DISTANCE schema for the unit and modifier values supported.
Temperature Temperature, including unit. Specify the temperature in an object with the following elements:
  • unit: Unit of temperature, such as C
  • number: Number of units
See the nuance_TEMPERATURE schema for the unit values supported.

This example shows how to pass this type of data in a data access action:

    "selector": {
        "channel": "default",
        "language": "en-US",
        "library": "default"
    "payload": {
        "requested_data": {
            "id": "DataAccess",
            "data": {
                "returnCode": "0",
                "sampleString": "This is a sample string",
                "sampleAlphanumeric": "1-2 This is an alphanumeric string.",
                "sampleDigits": "12",
                "sampleBoolean": "true",
                "sampleInt": 27,
                "sampleDecimal": 12.34,
                "sampleAmount": {
                    "unit": "USD",
                    "number": 10.5
                "sampleDate": "202001014",
                "sampleTime": "1212a",
                "sampleDistance": {
                    "modifier": "LE",
                    "unit": "km",
                    "number": 10
                "sampleTemperature": {
                    "unit": "C",
                    "number": 32

For more information, see Variable types in the Mix.dialog documentation.