Variant Catalog
The Variant Catalog is a centralized library of reusable targeting rules. Every content variant references one catalog entry, and takes its targeting and priority from it, so one entry can serve many records. When you update a catalog entry, all variants using it automatically get the updated rules.
Overview
The catalog solves a common problem: when multiple pages need the same targeting rules (e.g., “show to VIP users”), defining those rules individually on each variant is tedious and error-prone. The catalog lets you define the rules once and reuse them everywhere.
How It Works
- Create catalog entries with targeting rules (e.g., “VIP Users”, “UK Mobile Users”)
- Assign catalog entries to variants — the variant inherits the catalog’s targeting rules and priority
- Update catalog entries — changes propagate to all variants using that entry
Variant Catalog
-- "VIP Users" (Priority 30, rules: segment is VIP)
-- "UK Mobile" (Priority 20, rules: market = UK AND device = mobile)
-- "Mobile Users" (Priority 10, rules: device = mobile)
Homepage
-- Variant: "VIP Homepage" -> uses catalog: "VIP Users"
-- Variant: "UK Mobile Home" -> uses catalog: "UK Mobile"
-- Default variant (the record's own, no catalog entry)
Product Listing
-- Variant: "VIP Products" -> uses catalog: "VIP Users" (same rules)
-- Default variant (the record's own, no catalog entry)Catalog Entry Properties
| Property | Description |
|---|---|
key | Unique identifier (lowercase, hyphens allowed). Cannot be changed after creation. |
name | Display name |
description | Optional description of what this entry targets |
targetingRules | Expression-based targeting conditions |
priority | Among the entries that match, the highest priority wins |
isDefault | Breaks a tie between entries at the same priority. It does not make the entry match every request |
isActive | Whether the entry is available for use |
A variant cannot carry targeting rules or a priority of its own: a variant change that sends either is refused. Even a one-off audience is a catalog entry.
In the console
Creating a catalog entry
- Go to Settings > Variant Catalog
- Click New Entry
- Configure:
- Key:
vip-users(unique identifier) - Name: “VIP Users”
- Description: Optional explanation of the targeting intent
- Priority: among the entries that match, the highest wins
- Targeting Rules: Define conditions using the visual rule builder
- Key:
- Click Save
Using catalog entries in variants
- Open a record and go to its Variants tab
- Click Add Variant, or edit a variant
- Pick the catalog entry the variant is for. The variant takes its rules and priority from it
Priority System
Resolution is filter, then highest priority — not first-match-wins. The distinction matters, because a first-match reading makes priority look like an ordering of evaluation when it is really a tiebreak among everything that already matched.
- Every variant’s targeting rules are evaluated against the request context. This is the filter, and it runs over all of them.
- Among the variants that matched, the highest priority wins.
- Ties break on the record’s own default marker. If two matching variants sit at the same priority and one of them is the record’s default, that one wins. Otherwise the first in the pool does — so a tie between two non-default variants at the same priority is not something to rely on.
- If nothing matched, the default variant is returned.
A variant that names no catalogue entry sits at priority 0. It still participates — it is not excluded — it simply loses to anything with a catalogue entry above zero.
Recommended priority ranges
| Priority | Use Case | Example |
|---|---|---|
| 50+ | Override/emergency | Temporary promotions, urgent updates |
| 20-50 | Specific targeting | VIP users, combined conditions |
| 10-20 | General targeting | Market-specific, device-specific |
| 0 | Default/fallback | Standard content for everyone |
Example priority setup
Priority 50: VIP UK Mobile Users (most specific)
Priority 30: VIP Users (any market)
Priority 20: UK Mobile Users
Priority 10: UK Users
Priority 5: Mobile Users
Priority 0: Default (fallback)Higher priority means more specific targeting. Among the entries that match, the highest priority wins, so a VIP UK mobile user gets “VIP UK Mobile Users” at priority 50 rather than “Mobile Users” at priority 5.
The fallback
The fallback when no entry matches is each record’s own default variant, which needs no catalog entry. Nothing in the catalog has to exist for it.
Via the CLI
List catalog entries
foir variant-catalog listGet a catalog entry
By ID:
foir variant-catalog get vc_abc123By key:
foir variant-catalog get vip-usersCreate a catalog entry
foir variant-catalog create --data '{
"key": "vip-users",
"name": "VIP Users",
"description": "Targets users in the VIP segment",
"priority": 30,
"targetingRules": {
"type": "group",
"logicalOperator": "AND",
"conditions": [
{
"type": "condition",
"left": { "type": "context", "path": "segment.vip-users" },
"operator": "is_true"
}
]
}
}'Update a catalog entry
foir variant-catalog update vc_abc123 --data '{
"name": "VIP Users",
"priority": 35
}'Delete a catalog entry
foir variant-catalog delete vc_abc123Best Practices
- Use the catalog for any targeting rules shared by two or more variants. Central management prevents rules from drifting out of sync.
- Use descriptive keys like
vip-uk-mobilerather than generic names likerule-001. - Space priorities clearly (0, 10, 20, 30…) to leave room for future entries without renumbering.
- Add descriptions to each catalog entry explaining what it targets and why.
- Deactivate entries you are no longer using instead of deleting them, in case you need them again.