Skip To Content
DocsRules

Write your first rule

One sentence, one number, and the two outcomes a rule can have.

A rule says what Kestrel may do in one category, and where the line is. It is one sentence with one number in it.

The shape of a rule

Refund up to $200 to the original card.

Every rule has three parts: an action (refund), a limit ($200) and a condition (to the original card). The limit is the part you will change most often.

Two outcomes

A request that is inside the limit has one of two outcomes, and you choose which:

  • Act alone. Kestrel does the work and closes the ticket.
  • Ask before acting. Kestrel does the work up to the last step, then waits for a person.

A request that is over the limit always asks a person. See Approvals.

Rules are checked by code

The model works out what the customer wants. Whether Kestrel is allowed to do it is decided by ordinary code that compares the request with your rule. A rule cannot be talked around by a cleverly worded ticket.

Rules as data

Every rule can be read and changed through the API:

JSON
{  "category": "refunds",  "action": "refund",  "limit": { "amount": 20000, "currency": "usd" },  "inside_limit": "act_alone"}

Good first rules

  1. Refund a duplicate charge, up to a small amount.
  2. Reset a password after two identity checks.
  3. Change a delivery address before the order ships.

Give Kestrel one category this week.

Start with refunds. Connect your help desk and billing, set a limit, and watch the first hundred runs before it works alone.

Talk To Sales