Search…
SDK and Frameworks
Supported Data Types

Data types in Decision Tables

All data in a data table are stored as string values and are automatically casted when needed. Therefore, you don't need to specify any data format for your **** input and output models. The automatic casting of conditions and results is described in the following sections.
The decimal separator is always a dot - "."

Condition Data Types

The conditions can be made using the following scalar data types:
  • Number
  • Boolean
  • String
  • Date

Conditions

Solver Request Data

1
// 2.31
2
{
3
"inputData": 2.31 OR "2.31"
4
}
5
6
// true
7
{
8
"inputData": true
9
}
10
11
//false
12
{
13
"inputData": false
14
}
15
16
// hello world
17
{
18
"inputData": "hello world"
19
}
20
21
// 17/13/2021 13:17 GMT:-9:00
22
{
23
"inputData": {"date":"2021-03-17","time":"13:17","timezone":"-09:00"}
24
}
25
// DATE TIME INPUT AS ISO-8601
26
{
27
"inputData": "2021-03-17T13:17-09:00"
28
}
29
// OR ANY PARSEABLE DATE STRING
30
{
31
"inputData": "2021-03-17, 13:17 -09:00"
32
}
33
// <empty>
34
{}
35
OR
36
{
37
"inputData": ""
38
}
Copied!

Examples:

Condition [value in decision table]
Solver Request Value [value send on API]
Result
2.32
2.32
Equal
2.32
"2.32"
Equal
true
true
Equal
false
false
Equal
true
1
Equal
false
0
Equal
true
2
Not Equal
true
"true"
Not Equal
hello world
"hello world"
Equal
"date": "2021-03-17", "time": "13:17", "timezone": "-09:00"
"date": "2021-03-17", "time": "13:17", "timezone": "-09:00"
Equal
"date": "2021-03-17", "time": "13:17", "timezone": "-09:00"
"2021-03-17T13:17-09:00"
Equal
"2021-03-17T13:17-09:00"
"2021-03-17T13:17-09:00"
Equal
<empty>
""
Equal
<empty>
Value not presented in input JSON
Equal

Result Data Types

Calling Solver API returns an array of results according to the decision table setup. Response values are automatically cast to:
  • Boolean
  • Number OR Float
  • String
  • Date
  • JSON Object
  • JSON Arrays

Casting examples:

Decision Table Result Value
Solver Response Value
true
true
false
false
"true"
\"true\"
25
25
25.0
25
25.01
25.01
<empty>`` OR ``empty string
Node is omitted in reponse
hello world
"hello world"
"date": "2021-03-17", "time": "13:17", "timezone": "-09:00"
"date": "2021-03-17", "time": "13:17", "timezone": "-09:00"
{}
{}
{"data":123 }
{"data":123 }
{"data": "123" }
{"data": "123" }
[12,36,"542"]
[12,36,"542"]
[12,36,"542"
"[12,36,\"542\""
[12, 36, "542", [1,2] ]
[12, 36, "542", [1,2] ]