Data types
AEL (Expression language) was created to process data and turn it into presentable responses that will be valuable to the bot's users. This data can be obtained in different ways: it can be a result of NLU recognition (an intent or a variable), a response from an API integration, or a value previously stored in Memory.
Each piece of such data has its own type.
Each type of data has its own purpose and its own methods that can be used to process it. For example, any plain text will have a data type of string
so you can perform operations relevant to texts (like joining them together), and any number will have a data type of number
so you can, for example, perform arithmetical operations on them.
List of data types in AEL
Data type | Example | Short description | More info and methods |
---|---|---|---|
String | "Hello, I'm SentiBot." | Plain text/any sequence of characters. | Strings page |
Number | 23 | Any sequence of digits and decimal points representing a number. | Numbers page |
Array | ["Jim", "Dwight", "Michael"] | An ordered list of elements. An element can be of any data type. | Arrays page |
Object | {"name": "Jim", "age": 33} | A set of one or multiple key-value pairs called "properties". | Objects page |
DateTime | 2023-05-18T12:00 | A value respresenting date and time. | DateTime API page |
Boolean | true or false | Always one of the two truth values: true or false . | - |
Null | null | An intentional absence of a value or an undefined value. | - |
Updated over 1 year ago