> ## Documentation Index
> Fetch the complete documentation index at: https://developers.activeprospect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rules

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.

### Rule Set

Rules belong to a set which has the following properties:

* `op` — `and` or `or` determines whether all rules in set must pass or just one
* `rules` — the array of Rules and/or Rule Sets to evaluate

### Rules

Each 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 context
* `op` — 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 rule

### Variables

When 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".

### Templating

The `lhv` and `rhv` of each rule supports [templating](/docs/leadconduit/api/tag/Templates/). The variables are used to evaluate the template.
