Templates

Start from a decision you already make.

Each template is a complete gate: the policy in words, the input your systems send, the closed answer it gives, and the settings that decide when rules take over. Create one, change anything, and call it in minutes.

Refund approval

Use this template

Decide whether a refund request can be approved without a person.

Input

  • amount_usd number · required
  • days_since_delivery integer · required
  • reason string
  • customer_tier enum: standard, plus, business
  • item_damaged boolean

Answers

  • decision enum: approve, reject, ask · decides
  • category enum: damaged, late, changed_mind, other

Params

  • limit_usd 150
  • window_days 30
The config
name: Refund approval
slug: refund-approval
description: Decide whether a refund request can be approved without a person.
policy: |
  Approve a refund when the amount is at or under the limit and the order was delivered within the return window.
  Reject it when the order was delivered more than the window ago, unless the item arrived damaged.
  Ask a person when the amount is over the limit, when the customer is on the business tier and the amount is over
  half the limit, or when the reason suggests fraud or a dispute.
  The category says why the customer wants the refund, from the reason they gave.
params:
  limit_usd: 150
  window_days: 30
input:
  amount_usd: {type: number, required: true}
  days_since_delivery: {type: integer, required: true}
  reason: {type: string, max: 2000}
  customer_tier: {type: enum, values: [standard, plus, business]}
  item_damaged: {type: boolean}
output:
  decision: {type: enum, values: [approve, reject, ask], decides: true}
  category: {type: enum, values: [damaged, late, changed_mind, other]}
mode: shadow
promotion: {auto: true, min_shadow: 300, max_error: 0.01}
audit_rate: 0.05
failure:
  on_model_error: default
  default_output: {decision: ask, category: other}
retention_days: 90
redact: [reason]

Support ticket triage

Use this template

Route each new support ticket to a queue and set its priority.

Input

  • subject string · required
  • body string
  • plan enum: free, pro, enterprise · required
  • product_area enum: billing, login, app, api, other

Answers

  • queue enum: billing, accounts, technical, general · decides
  • priority enum: normal, high, urgent

Params

  • urgent_words outage, down, data loss
The config
name: Support ticket triage
slug: ticket-triage
description: Route each new support ticket to a queue and set its priority.
policy: |
  Billing questions, refunds and invoices go to billing. Login, password and access problems go to accounts.
  Errors, outages and anything that is broken go to technical. Everything else goes to general.
  Priority is urgent when the customer is on the enterprise plan and something is broken, or when the subject
  mentions an outage. It is high for paying customers with a broken product, and normal otherwise.
params:
  urgent_words: [outage, down, data loss]
input:
  subject: {type: string, required: true, max: 300}
  body: {type: string, max: 5000}
  plan: {type: enum, values: [free, pro, enterprise], required: true}
  product_area: {type: enum, values: [billing, login, app, api, other]}
output:
  queue: {type: enum, values: [billing, accounts, technical, general], decides: true}
  priority: {type: enum, values: [normal, high, urgent]}
mode: shadow
promotion: {auto: true, min_shadow: 300, max_error: 0.01}
audit_rate: 0.05
failure:
  on_model_error: default
  default_output: {queue: general, priority: normal}
retention_days: 30
redact: [body]

Lead routing

Use this template

Send each inbound lead to sales, self-serve or nurture.

Input

  • employees integer · required
  • region enum: NA, EU, UK, APAC, LATAM, MEA · required
  • asked_for_demo boolean · required
  • started_trial boolean
  • email_domain_type enum: company, personal, education

Answers

  • route enum: sales, self_serve, nurture · decides

Params

  • sales_min_employees 200
  • served_regions NA, EU, UK
The config
name: Lead routing
slug: lead-routing
description: Send each inbound lead to sales, self-serve or nurture.
policy: |
  Companies with at least the sales threshold of employees, or that asked for a demo, go to sales.
  Small companies that signed up for a trial go to self-serve. Students, personal email addresses and anyone
  outside the served regions go to nurture.
params:
  sales_min_employees: 200
  served_regions: [NA, EU, UK]
input:
  employees: {type: integer, required: true}
  region: {type: enum, values: [NA, EU, UK, APAC, LATAM, MEA], required: true}
  asked_for_demo: {type: boolean, required: true}
  started_trial: {type: boolean}
  email_domain_type: {type: enum, values: [company, personal, education]}
output:
  route: {type: enum, values: [sales, self_serve, nurture], decides: true}
mode: shadow
promotion: {auto: true, min_shadow: 300, max_error: 0.01}
audit_rate: 0.05
failure:
  on_model_error: default
  default_output: {route: nurture}
retention_days: 90

Expense coding

Use this template

Code each expense line to a ledger account and flag the ones that need a receipt review.

Input

  • merchant string · required
  • merchant_category enum: airline, rail, hotel, taxi, restaurant, software, office, other · required
  • amount_usd number · required
  • with_customer boolean
  • travelling boolean

Answers

  • account enum: travel, entertainment, software, office, other · decides
  • needs_review boolean

Params

  • review_over_usd 250
The config
name: Expense coding
slug: expense-coding
description: Code each expense line to a ledger account and flag the ones that need a receipt review.
policy: |
  Flights, trains, hotels and taxis are travel. Meals while travelling are travel; meals with customers are
  entertainment. Software subscriptions are software. Anything over the receipt threshold needs review, and so
  does any entertainment expense.
params:
  review_over_usd: 250
input:
  merchant: {type: string, required: true, max: 200}
  merchant_category: {type: enum, values: [airline, rail, hotel, taxi, restaurant, software, office, other], required: true}
  amount_usd: {type: number, required: true}
  with_customer: {type: boolean}
  travelling: {type: boolean}
output:
  account: {type: enum, values: [travel, entertainment, software, office, other], decides: true}
  needs_review: {type: boolean}
mode: shadow
promotion: {auto: true, min_shadow: 300, max_error: 0.01}
audit_rate: 0.05
failure:
  on_model_error: default
  default_output: {account: other, needs_review: true}
retention_days: 365

Ad approval

Use this template

Approve feed-driven ad versions against the current offer, market and legal line.

Input

  • price_monthly_usd number
  • term_months integer
  • market string · required
  • channel enum: meta, youtube, display, search, tv · required
  • flight_end_day integer · required
  • legal_line_present boolean · required

Answers

  • decision enum: approve, reject, ask · decides
  • problem enum: none, price, term, flight, legal, unknown

Params

  • lease_price_usd 299
  • lease_term_months 36
  • legal_line_markets US-CA, US-NY
  • offer_ends_day 20261231
The config
name: Ad approval
slug: ad-approval
description: Approve feed-driven ad versions against the current offer, market and legal line.
policy: |
  An ad version may run only with the approved offer: the monthly lease price and the term must match the current
  offer exactly. The flight must end on or before the offer's last day. In markets that require it, the ad must
  carry the required legal line; the legal line counts as carried when it was found in the ad word for word.
  Reject a version that states a different price or term, runs past the offer, or lacks a required legal line.
  Ask a person when the price is missing or the market is new to the brand.
params:
  lease_price_usd: 299
  lease_term_months: 36
  offer_ends_day: 20261231
  legal_line_markets: [US-CA, US-NY]
input:
  price_monthly_usd: {type: number}
  term_months: {type: integer}
  market: {type: string, required: true, max: 10}
  channel: {type: enum, values: [meta, youtube, display, search, tv], required: true}
  flight_end_day: {type: integer, required: true, description: "The last day the version runs, as YYYYMMDD"}
  legal_line_present: {type: boolean, required: true}
output:
  decision: {type: enum, values: [approve, reject, ask], decides: true}
  problem: {type: enum, values: [none, price, term, flight, legal, unknown]}
mode: shadow
promotion: {auto: true, min_shadow: 300, max_error: 0.01}
audit_rate: 0.05
failure:
  on_model_error: default
  default_output: {decision: ask, problem: unknown}
retention_days: 180