What is a Domain Template?
A Domain Template is a curated bundle of fact definitions and sample rules tailored to a specific industry. Applying a template creates:- A pre-defined set of facts (e.g.,
purchase_subtotal_usd,loyalty_tier) registered for your tenant. - A new policy group with sample rules, ready to publish or customize.
- An entry in your group list — same as if you had built it manually.
Available Templates
E-Commerce
Loyalty tier discounts, first-purchase bonus, free shipping for high-LTV customers, and promo code handling for online retail.8 facts · 5 sample rules
E-Commerce Template
Facts (8)
| Key | Type | Required | Description |
|---|---|---|---|
purchase_subtotal_usd | NUMBER | ✅ | Cart subtotal before discounts, in USD |
purchase_currency | STRING | ISO 4217 currency code (e.g., USD, EUR, KRW) | |
cart_category_tags | LIST_STRING | Category tags of items in the cart | |
customer_ltv_usd | NUMBER | Customer lifetime value, in USD | |
loyalty_tier | STRING | PLATINUM / GOLD / SILVER / BRONZE / NONE | |
applied_promo_code | STRING | Promotion code entered at checkout | |
is_first_purchase | BOOLEAN | Whether this is the customer’s first purchase | |
loyalty_credit_usd | NUMBER | Redeemable store credit balance, in USD |
Sample Rules (5)
| Priority | Name | Trigger | Effect |
|---|---|---|---|
| 1 | Platinum Tier — 20% Off | loyalty_tier=PLATINUM and subtotal ≥ USD 100 | 20% off subtotal (mutex: vip_discount) |
| 2 | Gold Tier — 15% Off | loyalty_tier=GOLD and subtotal ≥ USD 100 | 15% off subtotal (mutex: vip_discount) |
| 3 | Silver Tier — 10% Off | loyalty_tier=SILVER and subtotal ≥ USD 100 | 10% off subtotal (mutex: vip_discount) |
| 4 | First-Purchase Bonus | is_first_purchase=true | USD 10 off subtotal |
| 5 | High-LTV Free Shipping | customer_ltv_usd ≥ 1000 | Add tag free_shipping |
vip_discount) with EXCLUSIVE / HIGHEST_PRIORITY — only the highest-priority matching rule fires. First-purchase bonus and free shipping run independently.
Applying a Template
- Go to Settings → Domain Templates.
- Click Preview on a template card to inspect the facts and rules before committing.
- Click Apply to create the policy group.
- Optionally provide a custom group name. If left blank, a default name is generated (with a date suffix if the name already exists).
What Happens on Apply
| Resource | Behavior |
|---|---|
| Facts | Created only if missing. Existing facts with the same key are kept as-is (your edits are preserved). |
| Policy Group | New group, status=ACTIVE. |
| Policy Version | New version, status=DRAFT. Edit rules before publishing. |
| Rules | All 5 sample rules created. |
| Application history | Recorded for audit. |
Customizing After Apply
Templates are starting points. After applying, you can freely:- Edit any rule (condition, action, priority, mutex).
- Add or remove rules in the version.
- Delete facts you don’t need (they’re regular custom facts, not protected).
- Rename the policy group.
- Adjust the version’s effective dates before publishing.
FAQ
Can I apply the same template twice? Yes. Each apply creates a new policy group. Existing facts are reused (not duplicated). If the default group name is taken, a date suffix is appended automatically. Can I delete a template’s facts later? Yes. Template-applied facts are regular tenant facts — no special protection. Be aware that deleting a fact in use will cause rules referencing it to evaluate that condition asfalse.
Can I roll back an apply?
Not as a single operation. To undo, archive the policy group manually (or delete the version) and delete the facts you don’t need. The application history record remains for audit.
Next Steps
Policy Groups
Learn how policy groups and versions work.
Fact Definitions
Understand the fact model in depth.

