Undirected Fill
The Point Engine activates points via the Undirected Fill mechanism. Undirected fill activates points dynamically based on inputs being met. The active configuration point of a task defines how undirected fill will run. Undirected fill will look for new points to activate until all possible points have been evaluated.
Undirected fill can activate invoke or value points when their inputs are met.
Invokes, which activate code points, can be activated once per task with the exception of those run within entities. Values are made available when their inputs are met.
Paths
Referencing a key in a Token is done via "dot notation". The dot notation syntax is called the path. The following example illustrates this.
Example Token
{
"schedule_followup": {
"type": "lost_delivery_wait",
"procedure": "Schedule a followup to check on delivery when the lost wait date has been reached."
},
"inform": {
"type": "lost_delivery_wait",
"procedure": "Create a response for a reported lost delivery that has not reached its wait time."
}
}
Example Paths
schedule_followup.type
= "lost_delivery_wait"schedule_followup.inform.procedure
= "Create a response for a reported lost delivery that has not reached its wait time."
Inputs
Inputs are defined by a top level key of inputs
with an object containing one or more keys. The keys within the object are token paths. These keys contain an object with a key of evaluate
which has a value that defines the input evaluation logic. All input keys must evaluate to true
for a point to be triggered for Fill.
Example Input Object
{
"inputs": {
"_this.request_type_L3": {
"evaluate": "=missing_a_package",
"description": "L3 request type is missing_a_package"
},
"_this.lost_qualified": {
"evaluate": "=no",
"description": "Check if lost is not qualified"
},
"_this.lost_qualified_wait_date": {
"evaluate": true,
"description": "Check if wait date for lost qualified is true"
},
"_this.problem_with_order_related": {
"evaluate": "=yes",
"description": "This flag indicates that the request is related to problem with an order.",
"pending": {
"criteria": "The customer reports a problem with their order not related to tracking status. Some examples are the product was damaged, there was a quality defect, items were missing, etc.",
"options": [
"yes",
"no"
]
}
}
}
}
Evaluators
When undirected fill is triggered, the point engine will evaluate inputs against key value pairs within the data token. Inputs support different types of evaluations. Evaluators can be strictly defined by the point or derived by the point engine when run.
Defined Evaluators
Defined evaluators state evaluation criteria directly within the point. Defined evaluators support several evaluation operators.
When to use?
Defined evaluators should be used whenever criteria can be strictly defined and is present within the data token.
String Matches
String value in a token key equals, or does not equal, the Input evaluate key value.
String Equals
Example Evaluate to true
if _this.request_type_L3
equals "missing_a_package".
{
"inputs": {
"_this.request_type_L3": {
"evaluate": "=missing_a_package",
"description": "Check if L3 request type equals missing_a_package"
}
}
}
String Does Not Equal
Example Evaluate to true
if _this.request_type_L3
does not equal "missing_a_package".
{
"inputs": {
"_this.request_type_L3": {
"evaluate": "!=missing_a_package",
"description": "Check if L3 request type does not equal missing_a_package"
}
}
}
Number Comparisons
Number value in a token key is compared against the input evaluate key value.
Greater Than
Example Evaluate to true
if _this.some_number
is greater than 5.
{
"inputs": {
"_this.some_number": {
"evaluate": ">5",
"description": "Check if some number is greater than 5"
}
}
}
Less Than
Example Evaluate to true
if _this.some_number
is less than 10.
{
"inputs": {
"_this.some_number": {
"evaluate": "<10",
"description": "Check if some number is less than 10"
}
}
}
Equal To
Example Evaluate to true
if _this.some_number
is equal to 3.
{
"inputs": {
"_this.some_number": {
"evaluate": "=3",
"description": "Check if some number equals 3"
}
}
}
Matches Any
Checks if any of the values in an array match the token key value.
Array Contains
Example: Evaluate to true
if any value in _this.array_field
matches "value1", "value2", or "value3".
{
"inputs": {
"_this.array_field": {
"evaluate": "[value1,value2,value3]",
"description": "Check if array field contains any of the specified values"
}
}
}
Overlapping Values
Checks for overlapping values between a set of values and the Token key value.
Overlapping Values
Example: Evaluate to true
if there are overlapping values between _this.set_field
and "valueA", "valueB", "valueC".
{
"inputs": {
"_this.set_field": {
"evaluate": "{valueA,valueB,valueC}",
"description": "Check for overlapping values between set field and specified values"
}
}
}
Existence Checks
Checks for the existence or non-existence of a key or a value.
True (Exists)
Example: Evaluate to true
if crm.exists_field
exists.
{
"inputs": {
"crm.exists_field": {
"evaluate": true,
"description": "Check if exists_field in CRM exists"
}
}
}
False (Does Not Exist)
Example: Evaluate to true
if crm.nonexistent_field
does not exist.
{
"inputs": {
"carm.nonexistent_field": {
"evaluate": false,
"description": "Check if nonexistent_field in CRM does not exist"
}
}
}
Derived Evaluators
Derived evaluators state conditions for criteria to be determined and assessed. Criteria for derived evaluators are determined when the point is run.
When to use?
Derived evaluators should be used whenever criteria must be determined and is not present within the data token.
AI Criteria
AI will assess the a statement located in the pending.criteria
key and evaluate against options in the pending.options
key. Once evaluated, the response will be written to the root criteria path and then evaluated against the evaluate
value just like a defined evaluator.
Example: Evaluate to true
if pending.criteria
evaluates to yes
{
"inputs": {
"_this.problem_with_order_related": {
"evaluate": "=yes",
"description": "This flag indicates that the request is related to problem with an order.",
"pending": {
"criteria": "The customer reports a problem with their order not related to tracking status. Some examples are the product was damaged, there was a quality defect, items were missing, etc.",
"options": [
"yes",
"no"
]
}
}
}
}
Entities
Entities allow points to be run multiple times across different context. Entities are set as a predefined key within the data token. The Entity key is an array. Every element within that array is a unique entity.
As an example, in the following data token, the key instance
is the entity key. Each element is a different entity of type item.
{
"0": {
"type": "item",
"order": "#1006",
"item_number": "13699970138246",
"item_name": "The Compare at Price Snowboard",
"quantity": 1
},
"1": {
"type": "item",
"order": "#1007",
"item_number": "13699975807110",
"item_name": "Selling Plans Ski Wax - Special",
"quantity": 1
},
"2": {
"type": "item",
"order": "#1007",
"item_number": "13699975839878",
"item_name": "The Multi-managed Snowboard",
"quantity": 1
}
}
Entity Paths
The Path of an entity can be dynamically referenced with _this
.
For example, in the previous object, _this
would translate to instance[X]
, with X being the element ID. In this example, with all three entities being present, _this.type
would evaluate to:
instance[0]
instance[1]
instance[2]
Updated 2 months ago