A Qualification Rule is a configurable check that decides whether a customer may receive a particular Offer. Rules are evaluated inside the Filter stage of a Decision Flow. They come in two stages:
Stage
Behavior
qualification
Hard gate — if the rule fails the Offer is dropped from the candidate set.
fit
Soft penalty — if the rule fails the Offer’s score is multiplied by a decay factor (0.1 — 1.0) instead of being removed.
Rules are sorted by priority (highest first) and evaluated in order. The first hard-gate failure short-circuits — remaining rules for that Offer are skipped.
Kaireon ships five rule types. Each type has its own config shape and runtime evaluation logic.
segment_required
attribute_condition
propensity_threshold
recency_check
metric_condition
offer_attribute
Stage: qualification (hard gate)Checks that the customer belongs to all of the segments listed in requiredSegments (AND logic). If the customer is missing any of the required segments, the Offer is dropped.Config JSON
{ "requiredSegments": ["premium", "high_value"]}
Runtime behavior
Read requiredSegments from config.
Compare against the customer’s segment list (auto-resolved from enriched customer.segment field, or provided in the Recommend request).
If the customer is in all of the required segments, the rule passes.
If the customer is missing any required segment, the rule fails with a reason like Missing required segments: high_value.
An empty requiredSegments array is treated as a pass (no restriction).
Stage: qualification (hard gate)Compares a single customer attribute against an expected value using one of ten operators.Config JSON
Look up attribute in the customer context (enriched attributes from the Enrich stage, or request-time attributes).
If the attribute is missing and operator is not exists/not_exists, the rule passes (skips the rule). This prevents rules from blocking offers when enrichment data is not available (e.g., legacy recommend path without an Enrich stage).
For exists/not_exists, a missing attribute is valid input (not an error).
Apply the operator. If the comparison is false, the rule fails with a reason containing the actual vs expected values.
Stage: qualification or fitSupports two modes for threshold checks:Mode 1: Model-based — requires a named propensity model’s score to meet a minimum threshold.
Mode 2: Attribute-based — checks an enriched customer attribute against a threshold using a comparison operator. Useful for data-driven gates like churn risk or credit score.
If the attribute is missing, the rule passes (benefit of the doubt).
If the value exceeds maxDays, the rule fails.
Runtime behavior — fit stage
If the attribute is missing, the multiplier is 1.0.
If the value is within maxDays, the multiplier is 1.0.
If the value exceeds maxDays, the multiplier decays as maxDays / actualDays (minimum 0.1).
Stage: qualification (hard gate)Evaluates a Behavioral Metric value against a threshold. Use this to enforce business limits such as “no more than 10 impressions per month” or “at least 3 clicks before upgrade offer.”Config JSON
Build a lookup key from metricId + resolved dimensionMapping values. The special token $candidate.offerId is replaced with the current Offer’s ID.
Look up the metric value from the pre-loaded metric map. If no value is found, default to 0.
Apply the operator. If the condition triggers (evaluates to true), the rule fails and the Offer is dropped.
The operator semantics are inverted compared to attribute_condition: when the condition is met the Offer is disqualified. Think of it as defining the disqualification condition. For example, "operator": "gt", "threshold": 10 means “disqualify when impressions exceed 10.”
Stage: qualification (hard gate)Filters on offer-level fields (e.g., productType, margin, revenueValue, or custom fields defined in the offer’s metadata). This lets you write rules that target specific offer properties rather than customer attributes.Config JSON
Every Qualification Rule has a scope that controls which Offers it applies to. Narrower scopes let you write rules that target specific parts of your catalog without affecting everything else.
Scope
scopeId resolves to
When it applies
global
(ignored)
Every Offer in the tenant
segment
Segment ID
Only when the customer belongs to the segment
channel
Channel ID
Only when the request targets that channel
category
Category ID
Only Offers in that Category
subcategory
SubCategory ID
Only Offers in that SubCategory
offer
Offer ID
Only that specific Offer
placement
Placement ID
Only when the request targets that placement
If a rule’s scope does not match the candidate Offer, the rule is skipped (treated as a pass).
When scopeId is null for a non-global scope, the rule applies to all entities at that scope level. For example, a rule with scope: "category" and scopeId: null applies to every Category.
When multiple fit rules apply to the same Offer, their multipliers are multiplied together. For example, if a propensity rule returns 0.8 and a recency rule returns 0.5, the final multiplier is 0.8 x 0.5 = 0.4.
For advanced scenarios, Kaireon supports recursive AND/OR logic groups via the QualificationLogicGroup structure. This allows you to compose rules into arbitrarily nested boolean expressions.
rule_segment_premium AND rule_credit_720 AND (rule_high_propensity OR rule_recent_login)
Vacuous truth rules:
An empty AND group (no ruleIds, no sub-groups) evaluates to true.
An empty OR group evaluates to false.
The evaluator walks the tree recursively: each group collects boolean results from its ruleIds (via the qualification engine) and its nested groups, then applies the group’s operator (AND = every result must be true; OR = at least one must be true).
Returns a paginated list sorted by priority (descending), then by creation date (descending). Supports cursor-based pagination via cursor and limit query parameters.
Soft-deletes the rule (retains the record with a deletedAt timestamp). Returns { "deleted": true, "warnings": [...] }. If the rule is referenced by any Decision Flow’s draftConfig, the response includes a warnings array listing affected flows (ghost reference check).For complete request/response schemas, see the API Reference.