Object Inference in the Viabl.ai Platform is the process by which Viabl.ai Platform Objects (such as Questions and Decision Trees) acquire their value at runtime. Here Object refers to Objects derived from a Base Class which are broadly divided into the following categories:
Question Object acquires its value from the user via a User Interface
Knowledge Object acquires its value (typically referred to as Outcome or Decision) by executing one of the following Knowledge Objects:
Attribute Object is, in effect, an "auto-answered" Question and is typically created using the same Add a Question Tool or the Add Calculated Attribute Tool. It differs from a Question in that that it acquires its value via a script assignment (which must be executed prior to the Attribute's execution or inside the OnCapture Event Script of the Attribute itself) and not via direct user input. Its value can come from any of the following:
Other type of inferences provided by Viabl.ai include Dialog & Script Inferences.
Object inference can also be triggered, at any time, from within a Viabl.ai Platform Scripts, using the Do statement (XpertScript) or the .run() method (JavaScript).
Dialogs can also be triggered by being set in the tiedDialog Question Object property.
Below is a Decision Flow Tree that describes the Object Inference process in the Viabl.ai (Click the image to make it larger):
The labels for each node in the above Decision flow Tree correspond to (a) object properties, (b) object events or (c) actions performed by the rules engine. The idea is to depict how inference reacts to each property value and each event. Please refer to the table below for a description of each node label.
For example: if we take the question branch on the tree, we can see as inference proceeds it will check the next object to see if has an empty value and check the isEmpty property. If isEmpty is set to true, inference will proceed along the yes branch, and onto the onCapture event. If the object is not empty it will proceed along the no branch to check if the object is dynamic. If it is not, inference will end. If the object property has been set to dynamic however, we will then proceed along to the onCapture event.
When inference hits the next isEmpty, and the answer is yes, the action PromptForQuestion will be called, prompting for a value. If there is no value, a check will be made on the property to see if allowBlank is set to true or false. If true, inference will proceed to the onLeave event. If false, inference will loop back to the PromptForQuestion action.
Name | Type | Description |
---|---|---|
isempty | Property | The object does not have a value (true/false) |
allowblank | Property | Allow Question with no value to be skipped during UI capture |
isdynamic | Property | Determines if an Object that already has a value, is to be executed by the inference engine (true/false) |
PromptOnBlank | Property | Prompts the user for a value during inference if it has no value |
onCapture | Event | This Event script will be executed first when the object is encountered in inference |
onLeave | Event | This script will be executed just before the end of inference |
PromptForQuestion | Action | Prompts the user for a value |