LeadConduit uses a rules engine to customize flow behavior based on field data, appended data, or internal tracking metadata (such as the submission timestamp). The rules engine is built into flow acceptance criteria, filtering, volume caps, pricing, mappings, and more.
Rules belong to a set which has the following properties:
op
— and
or or
determines whether all rules in set must pass or just onerules
— the array of Rules and/or Rule Sets to evaluateEach element of the rules
array can be a Rule or another Rule Set.
Rules have the following properties:
lhv
— left hand value is a key to look up a value from the lead data contextop
— operator Name of the operator rhv
— right hand value (omit for unary operators like is blank
)rule_set
— optional rule set to be ANDed with the ruleWhen rules are processed the lhv
will be resolved to a value using the data in the variables found under that key. For example, if the lhv
is "lead.first_name" and the variables are { "lead": { "first_name": "Bob" } }
, then the resolved lhv
will be "Bob".
The lhv
and rhv
of each rule supports (templating)[/#tag/Templates]. The variables are used to evaluate the template.
id | string (ShortID) ^[0-9a-zA-Z]{6}$ ID for this rule | ||||||||||||||||||||||||||
lhv required | string The required left-hand value to be evaluated (templating is supported) | ||||||||||||||||||||||||||
op required | string Binary operators compare the
| ||||||||||||||||||||||||||
required | string or number or boolean or Array of strings The right-hand value to be evaluated (templating is supported) | ||||||||||||||||||||||||||
object (rule-set) A rule set is a collection of rules to evaluate. The |
{- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": null
}
]
}
}
A rule set is a collection of rules to evaluate. The op
property determines whether all rules must pass (and
) or just one of them must pass (or
) in order for the rule set to be considered passing.
id | string (ShortID) ^[0-9a-zA-Z]{6}$ The ID of the rule set in this flow | ||||||
op required | string Determines whether all rules or just some rules must pass for the overall set to pass
| ||||||
required | Array of Binary Rule (object) or Unary Rule (object) or Rule Set (object) non-empty The required rules to be evaluated. Rule sets may also be specified as array elements in order to achieve nesting. |
{- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}