Match one boundary
Select the closest first-party template for the first state change, then replace source identifiers and owner rules.
Policy Pattern Catalog
The pattern catalog is intentionally first-party and practical: versioned templates for common Decision API boundaries, with request shapes, outcome hints, CRM sync hints, and SDK examples tied back to the public registry.
Use this packet before adopting a pattern in production. A pattern is not just a sample payload; it should define the action boundary, the lifecycle artifacts to store, and the proof a reviewer can verify after launch.
Select the closest first-party template for the first state change, then replace source identifiers and owner rules.
Attach target system, target object, requested action, risk context, and idempotency before calling /api/decide.
Capture the Decision Record, Action Execution Receipt, Outcome Record, and Decision Packet v1 for the first live run.
Use the hosted verifier or SDK verifier before applying the template to another production boundary.
These patterns are adoption accelerators, not a replacement for your own policy. Choose the closest template, replace the source identifiers and owner rules, then send the final payload through /api/decide.
Approve, block, or route a discount or pricing exception before CRM or billing changes state.
pricing_exception
CRM
Billing
Route a refund request before billing, automation, or account tooling issues a credit.
refund_review
Refunds
Risk
Authorize an agent-proposed action before a tool, workspace, account, or external system is mutated.
agent_action_gate
Tools
Execution
Call Decide before a CRM update, then record the CRM sync receipt after fields are written back.
crm_writeback_gate
Salesforce
HubSpot
Every first-party pattern should lead to the same lifecycle proof path. The template helps with payload shape, but the durable value comes from the records that follow the action.
| Pattern field | How to use it | Reviewer signal |
|---|---|---|
decision_request_template | Starter payload for POST /api/decide, with workflow, source record, requested action, and context slots. | Decision Record v1 includes verdict, evidence, hashes, policy version, replay URL, and verify URL. |
outcome_template | Starter shape for reporting what happened after the action finishes or routes to review. | Outcome Record links observed metrics and status back to the original decision. |
crm_sync_template | Starter shape for CRM write-back receipts when the pattern stores decision fields on a source object. | CRM Sync receipt proves mapped fields were written back without storing CRM credentials in Decide. |
sdk_examples | Packaged examples that show the call path and fail-closed handling for the template. | Implementation reviewers can compare code against the public first-hour examples. |
pattern_hash | Canonical hash of the normalized pattern, useful for detecting local template drift. | Reviewers can see whether the team changed the template before launch. |
| Decision Packet v1 | Export the first live run after the pattern is wired. | Portable proof contains the Decision Record, execution receipts, Outcome Records, policy intelligence, audit-chain metadata, and verification hints. |
Pattern
Use before a discount, quote exception, or package override updates CRM, billing, or an internal approval state.
pricing_exception
Recommended policy v3
Include workflow, source_record_id, and requested_action.
Add discount, margin floor, owner rule, target system, target object id, mutation, and expiration.
MARGIN_FLOOR_OK, OWNER_RULE_VERIFIED, and DISCOUNT_WITHIN_POLICY.
curl -i "https://www.decide.fyi/api/decision/policy-patterns?pattern_id=pricing_exception"
const { policy_pattern: pattern } = await decide.policyPatterns({
patternId: "pricing_exception"
});
const record = await decide.decide(pattern.decision_request_template, {
idempotencyKey: "deal_1042_discount_15",
responseView: "full"
});
Pattern
Use before refund automation or billing credit paths where unclear outcomes should become review states.
refund_review
Recommended policy v1
Include workflow, source_record_id, and requested_action.
Pass vendor, days since purchase, region, plan, amount, and customer segment when available.
WITHIN_WINDOW, OUTSIDE_WINDOW, NO_REFUNDS, and UNSUPPORTED_VENDOR.
Pattern
Use when an agent proposes an action and your system needs a recorded permission boundary before execution.
agent_action_gate
Recommended policy v1
Include workflow, source_record_id, and requested_action.
Add agent id, tool name, target system, target object id, mutation, and risk level.
ACTION_BOUND, OWNER_RULE_VERIFIED, and RISK_ACCEPTABLE.
Pattern
Use before writing a CRM object, then record a CRM Sync receipt after Decision Record fields land on the source object.
crm_writeback_gate
Recommended policy v1
Include workflow, source record id, requested action, target system, and target object id.
Add CRM provider, object type, object id, mutation, and field mapping.
CRM_OBJECT_BOUND, DECISION_FIELDS_MAPPED, and WRITEBACK_RECORDED.
The page is the human catalog. The API is the machine-readable contract. Use the registry in setup tools, documentation generators, agents, or onboarding flows.
curl -i "https://www.decide.fyi/api/decision/policy-patterns?tag=crm"
const registry = await decide.policyPatterns({ tag: "crm" });
for (const pattern of registry.patterns) {
console.log(pattern.pattern_id, pattern.pattern_hash);
}
| Field | Purpose |
|---|---|
pattern_hash | Canonical hash of the normalized pattern, useful for detecting local template drift. |
decision_request_template | Starter payload for POST /api/decide. |
outcome_template | Starter shape for reporting what happened after the action. |
crm_sync_template | Starter shape for recording CRM write-back receipts when the pattern involves CRM fields. |
sdk_examples | Packaged examples that show the integration path in code. |
Before a pattern moves from a starter template into a production boundary, each owner should be able to inspect a concrete artifact.
| Owner | Confirm | Artifact |
|---|---|---|
| Policy owner | The template matches one exact action boundary and has an explicit review path. | Pattern id, pattern hash, policy id, and owner rule. |
| Engineering | The call is server-side, idempotent, fail-closed, and stores the full Decision Record. | SDK example, integration code, and stored record sample. |
| Operations | The first launch has a status/readiness check and quota behavior is understood. | Status packet and rollout readout. |
| Reviewer | The first live run exports and verifies as a Decision Packet v1. | Hosted verifier output or npx @decide-fyi/sdk verify-packet output. |
This is the foundation for a marketplace, not a public community marketplace claim. Customer-authored templates, ratings, installs, and effectiveness scores should come only after real adoption data exists.
Decide-maintained patterns that make the first API call easier to shape and review.
No customer download counts, ratings, community authors, or benchmark claims unless the underlying evidence exists.
Pattern-level effectiveness can become meaningful only when customers report enough Outcome Records.