SpringboardThis topic is related to Springboard. | Form Builder | 23.10This feature was updated in 23.10
The core logic engine behind the Decision Framework is a Groovy implementation of JsonLogic. All operations supported by JsonLogic are supported by default in the Decision Engine.
There are many examples of using JsonLogic operations in the JsonLogic documentation. The examples below focus on configurations that are likely to be used in the Decision Framework.
JsonLogic uses the var operator to retrieve data at runtime, using dot notation to access properties. The specific data available to your rules is governed by the data passed into the Decision Framework. To learn more, see Decision Framework: Data.
{
"var": [ "txn.propertyMap.hardFail" ]
}
{
"var": [ "txn.propertyMap.FisQualiFile\\.PrimaryApplicant\\.accountActionTxt1" ]
}
{
"var": [ "txn.propertyMap.FisQualiFile\\.PrimaryApplicant\\.accountAcceptanceTxt" ]
}
{
"var": [ "data.application.documentSigningURL" ]
}
{
"var": [ "params.decisionType" ]
}
{
"id": "Signature Document Generated",
"destination": "approved",
"condition": {
"and" : [
{
"!=": [ { "var": [ "data.application.documentSigningURL" ] }, "unavailable" ]
},
{
"==": [ { "var": [ "params.decisionType" ] }, "esign" ]
}
]
}
}
JsonLogic uses logic operators to return a result. The logic needs to result in true
or false
.
Following are some example statements in plain English, and JsonLogic that implements them.
{
"and" : [
{
"!=": [
{ "var": ["data.application.documentSigningURL"] }, // Contains LMS URL, returned when ready
"unavailable"
]
},
{
"==": [
{ "var": ["params.decisionType"] }, // Decision service call includes "decisionType" parameter
"esign"
]
}
]
}
{
"if" : [
{
"<": [
{ "var": "txn.propertyMap.creditScore" }, // user's credit score
800
]
}
]
}
{
"and": [
{
">": [ { "var": "txn.propertyMap.creditScore" }, 700 ]
}
{
"<": [ { "var": "txn.propertyMap.creditScore" }, 800 ]
}
]
}
This example builds on the previous rule. The "and"
operator is used to combine the two rules. If both of the logic operations inside "and"
are true, then "and"
is true. If either of the logic operations inside "and"
are false, then "and"
is false.
Next, let's look at an example that approves applications by default.