The API supports two rule models: advanced or simple. Use ADVANCED rules when you need nested logic, explicit grouping, or include/exclude branches. Use SIMPLE rules when you want to combine one or more asset selections using a set operation such as UNION or INTERSECT.
Advanced Rules
Use ADVANCED rules when you need nested logic, explicit grouping, or include/exclude branches.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "advancedRule" |
include | SegmentLogic object | Yes | Tree of segment logic describing which members to include |
exclude | SegmentLogic object | No | Tree of segment logic describing which members to exclude. If used, must appear combined last (see Constraints and Validation Rules). |
SegmentLogic Object
Used for include/exclude, and recursively nested inside left/right below.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Discriminator: "SegmentLogic" in examples (the spec's discriminator mapping uses lowercase "segmentLogic") |
logic | string | Yes | AND or OR. Combines left and right. |
isGroup | boolean | No | Marks this node as a parenthesized rule group. Set to true when this node's own logic (left/right combined via its logic value) should be evaluated as a single grouped unit before being combined with a sibling node one level up: the same role parentheses play in a math expression, e.g. "(A OR B) AND C". Set false (or omit) for a top-level node or one that doesn't need grouping. |
left | node | Yes | Left child node: a Segment, Segmentation, or nested SegmentLogic node (see below) |
right | node | No | Right child node, same allowed types as left. Omit for a single-branch (unary) expression. |
Node Types for SegmentLogic's Left/Right
A SegmentLogic node's left or right can be one of three node types, distinguished by type. Fields are grouped by node type below. The "Node Type" column repeats for readability: it is not itself a field.
| Node Type | Field | Type | Required | Description |
|---|---|---|---|---|
| Segment | type | string | Yes | Discriminator: "segment" per the spec's mapping (this node type doesn't appear in any example reviewed) |
| Segment | id | string | Yes | Referenced segment asset ID |
| Segment | name | string | Yes | Referenced segment name |
| Segment | size | integer | No | Row count when known. May be absent while computing. |
| Segmentation | type | string | Yes | Discriminator: "Segmentation" in examples (the spec's discriminator mapping uses lowercase "segmentation") |
| Segmentation | audienceID | string | Yes | Catalog asset ID to segment. The spec spells this audienceID; every real example uses audienceId (lowercase d). |
| Segmentation | audienceName | string | No | Catalog asset name, when available |
| Segmentation | filters | filter node | No | A single filter or a nested filter-logic tree (see "Filters on Advanced Rules" below). If empty or omitted, all members in the asset match. |
| SegmentLogic (nested) | type | string | Yes | Discriminator: "SegmentLogic" |
| SegmentLogic (nested) | logic | string | Yes | Same as the top-level SegmentLogic.logic field above |
| SegmentLogic (nested) | isGroup | boolean | No | Same grouping role as the top-level SegmentLogic.isGroup field above |
| SegmentLogic (nested) | left | node | Yes | Same as above. Nesting can continue up to the maximum rule depth (three levels; see Constraints and Validation Rules). |
| SegmentLogic (nested) | right | node | No | Same as above |
Filters on Advanced Rules
A Segmentation node's filters property can be either a single flat filter condition, or a nested AND/OR tree of filter conditions (the nested tree form is untested). The "Filter Node Type" column repeats for readability: it is not itself a field.
| Filter Node Type | Field | Type | Required | Description |
|---|---|---|---|---|
| filter (single condition) | type | string | Yes | Discriminator: "filter" |
| filter (single condition) | field | string | Yes | Column or field on the asset to filter on |
| filter (single condition) | fieldType | string | Yes | Field type: see Filter Types and Operators |
| filter (single condition) | operator | string | Yes | Comparison operator: see Filter Types and Operators |
| filter (single condition) | value | string | Yes | Operand compared to the field; encoding depends on fieldType and operator |
| filterLogic (nested tree) | type | string | Yes | Discriminator: "filterLogic" (not seen in any example: this whole nested form is untested) |
| filterLogic (nested tree) | logic | string | Yes | AND or OR. Combines left and right. |
| filterLogic (nested tree) | left | filter node | Yes | Left child: a filter or nested filterLogic node |
| filterLogic (nested tree) | right | filter node | Yes | Right child, same allowed types as left |
| filterLogic (nested tree) | isGroup | boolean | Yes | Same grouping role as SegmentLogic.isGroup above: marks this filterLogic node as a parenthesized group of filter conditions |
Simple Rules
Use SIMPLE rules (the default when ruleType is omitted) when you want to combine one or more asset selections using a set operation such as UNION or INTERSECT.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "simpleRule" |
setOperation | string | No | UNION (combine all matching members) or INTERSECT (only members matching every item). No documented default when omitted. |
items | array of AssetSelector | Yes | Feed-backed assets to combine, each with its own filter list: see "AssetSelector Object" below |
AssetSelector Object
One feed row in a simple rule: which asset to read and how to filter it.
| Field | Type | Required | Description |
|---|---|---|---|
assetID | string | Yes | Asset ID for this feed row |
logicalOperator | string | No | AND or OR. Combines this item's filters. |
filters | array of filter conditions | No | Predicates on this asset: see "Filters on Simple Rules" below. If empty or omitted, all members in the referenced asset match. |
assetName | string | No | Catalog asset name, when available |
Filters on Simple Rules
Each entry in an AssetSelector's filters array:
| Field | Type | Required | Description |
|---|---|---|---|
fieldName | string | Yes | Column or field on the Catalog asset (table, view, or segment) to filter on |
fieldType | string | Yes | Catalog field type: see Filter Types and Operators |
comparisonOperator | string | Yes | Comparison operator: see Filter Types and Operators |
fieldValue | string | Yes | Operand compared to the field; encoding depends on fieldType and comparisonOperator |
Note: SIMPLE-rule filters use fieldName/fieldType/comparisonOperator/fieldValue; ADVANCED-rule filters use field/fieldType/operator/value. Same concepts, different property names depending on rule type.