Skip to main content

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., purchaseSubtotalUsd, loyaltyTier) 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.
Use templates to skip the blank-page problem when starting a new policy domain.
Templates are opt-in. They only run when you click Apply in the Console or call the apply endpoint. Your existing facts and policy groups are never modified.

Available Templates

E-Commerce

Loyalty tier discounts, first-purchase bonus, free shipping for high-LTV customers, and promo code handling for online retail.9 facts · 5 sample rules
More templates (Fintech, SaaS) are coming soon.

E-Commerce Template

Facts (9)

Sample Rules (5)

The 3 tier discount rules share a mutex group (vip_discount) with EXCLUSIVE / HIGHEST_PRIORITY — only the highest-priority matching rule fires. First-purchase bonus and free shipping run independently.

Applying a Template

  1. Go to Settings → Domain Templates.
  2. Click Preview on a template card to inspect the facts and rules before committing.
  3. Click Apply to create the policy group.
  4. Optionally provide a custom group name. If left blank, a default name is generated (with a date suffix if the name already exists).
After apply, you’re navigated to the new policy group where you can edit rules, set effective dates, and publish.

What Happens on Apply

The entire operation is transactional — if any step fails, nothing is created.
The created policy version starts as DRAFT. To make it live, publish it from the policy group page or via the deployment API.

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) — provided no rule still references them.
  • 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, once nothing references them. Template-applied facts are regular tenant facts — no special protection, and the same guard applies: a fact that any rule references cannot be deleted (FD-006) or retyped (FD-007). The error reports how many rules reference it. Remove those rules, or edit them to stop using the fact, and the delete goes through. Can I roll back an apply? Not as a single operation. To undo, archive the policy group manually (or delete the version), then delete the facts you don’t need. That order matters: while the rules still exist they reference the facts, and the delete is refused. 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.