Procedures
Teach your AI agent to handle a specific customer scenario as one ordered list of steps, decisions, skills and quick replies.
A procedure is one customer scenario, handled end to end. It's the answer to "when someone asks about X, here is exactly what I want you to do" — and it's the difference between an agent that improvises and one that follows your process.

Procedures live on the Procedures tab of your AI Persona (Intelligence → Agent). Each one has two halves:
- When it applies — a description of the situation
- What happens then — one ordered list of instructions the agent works through
Use a procedure when a conversation needs more than a plain text answer — for example, asking for an order number, looking the order up with a skill, and then offering "Track my order" and "Talk to someone" buttons.
Because the instructions are one ordered list, a procedure can say when a skill runs and when buttons are offered, not just that they exist.
Procedures were previously called instruction blocks. Same feature, clearer name — nothing you wrote needs changing.
Procedures vs. plain instructions
Your agent's instructions can include regular text and procedures. Both are valid — use the right tool for the job.
| Use plain instructions for… | Use a procedure for… |
|---|---|
| General tone and policies | A specific situation with a clear trigger |
| Rules that always apply | Clickable quick replies customers can tap |
| Background guidance | Running a particular skill at a particular moment |
Plain text outside a procedure still shapes how your agent behaves. Procedures add matching (so the right scenario fires) and order (so things happen at the right point).
The two live on different tabs. The Instructions tab is for the general guidance; its editor shows only that. Underneath it, a line tells you how many procedures you have and links to the Procedures tab, which is where every procedure is written.
Add a procedure
A persona with no procedures yet opens on this:

1. Open the tab
Go to Intelligence → Agent, select your AI Persona, and open the Procedures tab.
2. Add one
Click Add procedure. A new, empty procedure appears at the bottom of the list, opened on its first step.
3. Fill it in, top to bottom
That's the order your agent reads it: first when this applies, then what happens.
4. Save and test
Save your changes, try it in the playground, then deploy when you're happy. Customers only ever see deployed versions.
Each procedure is a card. Beyond the first, they start collapsed — you see the name, the description and how many steps it has, which is enough to find the one you want without scrolling past everything else. Click the ⌄ beside Procedure 1 to open one, and again to close it. A procedure you've just added opens by itself, as does the one the playground reports having run.
To copy one, open its ⋯ menu and choose Duplicate procedure. The copy lands right below the original, open, with (copy) added to its description (and -copy to its name, if it has one). The AI tells procedures apart by their description, so change the copy's description to say when it applies instead.
To remove one, open its ⋯ menu and choose Delete procedure.
The name (optional)
Beside Procedure 1 at the top of each card is an optional name — a short handle for the procedure, like order-tracking or refunds. It's for you, not your agent: it's how you find one procedure among twenty, and it appears nowhere the customer can see.
It's stored as a slug, so it's lowercased and spaces become hyphens as you type. Leave it blank and the procedure is just its position in the list, exactly as before.
The name is a label, never an identity. Two procedures may share a name, or have none — it's the description below it that decides which procedure runs, so renaming one never affects matching or a conversation already following it.
When the procedure applies
The description
The field below the name is the most important one — it tells your agent which customer situations should activate this procedure.
Write a full sentence describing the situation in plain language:
Customer asks where their order is, when it will arrive, or for a tracking link.
The description is required. If you leave it blank, matching will be unreliable.
For detailed guidance on writing descriptions — including how to avoid overlaps between procedures — see Writing Block Descriptions.
The instructions
Below the description, Instructions is one ordered list of everything the agent works through when this procedure runs. It goes through the list one position at a time instead of answering from general knowledge.
Add an entry with the Add button at the bottom, or press / in an empty step. Both open the same menu of five kinds:

| Kind | What it's for |
|---|---|
| Step | Something the AI does at this point |
| Decision | Take a different path per condition |
| Skill | Run one of your installed skills |
| Quick replies | Offer tappable options to the customer |
| Note | Guidance that applies throughout — not a step |
Ordering entries
Entries are numbered on a rail down the left. Only positions get a number — a Note doesn't, because it isn't a point in the flow.
Instructions are one document, so most of the ordering is just typing. Enter opens the next step, so you can write a whole sequence without touching the mouse. Backspace in an entry that's already empty removes it and puts your cursor at the end of the one above. The arrow keys walk from one entry to the next — including in and out of a decision's If and Then — you can select across several entries to cut or copy them, and one undo covers the whole procedure. Pasting a list from somewhere else gives you one entry per line.
The ⋮ beside whichever entry your cursor is in does the rest:
- Add to this procedure — insert any of the five kinds directly after this one
- Duplicate — copy it, in place
- Move up and Move down — or press ⌘⇧↑ / ⌘⇧↓
- Turn into a note (or back into a step)
- Delete

Order is the point. A skill placed at 2 runs after the step at 1; quick replies placed at 4 are offered once the customer has an answer. Move them and the agent's behavior moves with them.
Step
A single instruction — Ask for the order number. It's the entry a new procedure starts on, and the one you'll use most.
Decision
A fork in the procedure. Each row reads If … then … — for example, If the order has shipped, then give the tracking link.
Click Add condition for another row, up to 5 in one decision. The Otherwise field at the bottom is optional; use it for what should happen when none of the conditions hold.
A decision counts as one position toward the limit, however many conditions it has.
Decisions are where references earn their keep: If the order has shipped is a description of a condition, while If Order status is shipped is one the agent can actually check.
Buttons on a branch
A branch can offer its own buttons. Under each If … Then … row, and under Otherwise, click + add button and fill in a label and message, exactly as you would for a Quick replies entry.

When the agent's reply follows a branch, the customer gets only that branch's buttons. Someone whose order is still being packed sees Cancel order, never Track my order. A branch with no buttons sends none.
The buttons always match what the customer is reading. A reply that follows no branch — it answered something else, or asked for a detail no branch covers — gets the buttons of the Quick replies entry it reached, if any, or otherwise the procedure's quick replies. Neither ever includes a branch's buttons.
A branch whose only action is its buttons is fine: If they want to change the delivery, with a Change delivery address button and nothing in Then, is a whole instruction.
Branch buttons are opt-in. A procedure with no buttons on any branch works exactly as it always has.
Skill
Runs one of your organization's skills at this point in the procedure — checking an order, booking an appointment, looking something up.
Type @ and pick the skill from the list, then keep typing to say what to run it with or what to do with the result — it's all one sentence: @get-order using Order number, then confirm the address.

Each skill is listed with the set it came from, because two sets can both provide a "Get order". Only skills your organization has installed are offered; if the list has none, install what you need from Intelligence → Skill Sets first.
An entry that names no skill is just a step, and saves as one.
You can also name a skill anywhere else — inside a decision arm, for instance (if it has shipped, then run @get-tracking). Wherever it appears, the agent can run it at that point.
Skills that only run in procedures
Some skills are marked Only in procedures. Usually these are ones that change something in another system, such as issuing a refund, opening a deal or drafting a quote. The agent never calls them on its own, even when a customer asks. They become available only while a procedure that names them is running, and only at the point where you put them.
That puts the decision where it belongs. The procedure's earlier steps and decisions are the checks, for example has the customer confirmed the quantities? or is the order still within the return window?, and the skill runs only once they pass. Without a procedure that names it, the skill does nothing. The ERPNext skill set has a worked example.
A skill's setting is chosen by whoever built it. In your own skill sets, set it per skill under When the AI can use it in the skill editor; see Creating Skills.
Quick replies
Tappable buttons your customers see beneath the agent's message — "Track order", "Change address", "Speak to a team member". They're offered on the reply that reaches the point where you put this entry, and the agent leads into them there.
For buttons that should only appear after a particular outcome — Track my order once the order has shipped — put them on that branch of a decision instead. See Buttons on a branch.
Click + add reply and fill in two fields:

| Field | What it is | Tips |
|---|---|---|
| Label | The text on the button — what the customer sees | Keep it short and action-oriented. |
| Message | What comes back when the customer taps it | Starts out matching the label. Change it when the label alone isn't enough for the agent to tell the options apart — for example, track_order vs. cancel_order. |
Click Done and the reply collapses into a chip. Click a chip to edit it again, or the × on it to remove it. One entry holds up to 10 replies.
When a customer taps a button, your agent receives the message as context, so it knows which option they picked even if two labels look alike.
A procedure needs at least one Quick replies entry before it can offer buttons of its own. Procedures made only of steps, decisions, skills and notes still guide your agent — they just won't surface buttons.
Quick replies follow the flow
A Quick replies entry is offered only on the reply that reaches it, not on every reply the procedure steers. If you put Start a return after the step that explains the return window, customers see it once the agent has explained the window — not while it's still asking for the order number. A reply that reaches none of your Quick replies entries goes out with no procedure buttons.
Note
Guidance that holds for the whole procedure rather than at one point — never promise a delivery date you haven't checked, keep replies to two sentences. This is where the rules go, as opposed to the work.
Notes aren't numbered and don't count toward the step limit, so a procedure with a lot to say about how to behave doesn't get fewer things to do.
Referencing the conversation
Type @ anywhere in a step, a decision or a note to point at something the conversation itself holds. Pick from the list and it drops in as a chip:

The list is grouped, in this order — scroll for the ones below the fold:
| Group | What it refers to |
|---|---|
| Conversation fields | A custom field captured on this conversation — Order status, Budget |
| Contact fields | A custom field on the contact's record, carried between conversations — Membership, Usual size |
| Labels | Whether a label is on this conversation — VIP, At risk |
| Skills | One of your installed skills to run |
This is what turns a description of a condition into a condition your agent can actually check:
| Without a reference | With one |
|---|---|
| If the order has shipped, then give the tracking link | If Order status is shipped, then give the tracking link |
| If they're an important customer, then skip the queue | If VIP, then skip the queue |
When the procedure runs, the agent checks each reference against what this conversation currently holds — the field's current value, or whether the label is applied — and decides on that. If a field is still empty, the agent asks rather than assumes.
References use the field or label's name. Rename one and existing procedures keep reading correctly — they just stop checking a value until you repoint them. A chip whose field or label no longer exists turns red so you can spot it.
Limits
| Limit | Value |
|---|---|
| Numbered positions per procedure (steps, decisions, skills, quick replies) | 15 |
| Notes per procedure | 10 |
| Conditions in one decision | 5 |
| Replies in one Quick replies entry | 10 |
| Buttons on one branch of a decision | 10 |
| Characters in a single field | 400 |
A procedure with no positions still applies its notes — it just has no checklist to follow.
Quick replies from procedures vs. from skills
Buttons can come from two places. They look the same to customers, but you configure them differently:
| Source | Where you set it up | When customers see it |
|---|---|---|
| Branch buttons | + add button under a branch of a decision | When the reply follows that branch |
| Procedure quick replies | A Quick replies entry in the procedure's Instructions | When the reply reaches that entry |
| Skill output buttons | The skill's definition in Skill Sets (or in the skill's handler response.buttons) | After the skill runs and returns them |
Priority: if a skill already returned buttons in the same turn, those are shown as-is — the agent won't swap them for a procedure's buttons. Otherwise, the branch or Quick replies entry the reply reached decides the buttons.
Use branch buttons for choices that only make sense after one outcome ("Track my order" once it has shipped). Use procedure quick replies for fixed choices tied to the whole scenario ("Talk to someone"). Use skill buttons for follow-up actions that depend on what the skill found ("View invoice", "Reschedule").
How a procedure is chosen
You don't need to configure matching — the description you write is what decides it.
- The agent follows a procedure only when it clearly fits the conversation. Otherwise it replies normally, without one. It won't guess.
- When a procedure fits, the agent works through its instructions in order — running each skill and offering each set of quick replies where you placed them.
- The customer stays in control. Your agent can still answer from your knowledge base or hand over to a human mid-procedure: a customer is under no obligation to stay on the path you wrote.
That's why clear descriptions and distinct boundaries between procedures matter. Overlapping procedures or vague descriptions are the most common reason quick replies don't appear when you expect them.
How a procedure runs
A procedure isn't one reply — it's a thread the agent keeps hold of across several messages.
- It picks up where it left off. The next customer message continues from where the procedure got to, rather than starting again from the top.
- It stops when the work is done. Once the last instruction is complete, the procedure ends.
- It lets go when the customer moves on. If the customer turns to a different scenario, the agent follows that procedure instead. If they change the subject, or the conversation is handed to a human, the procedure is dropped rather than forced to completion.
- It won't get stuck. A procedure the conversation has left behind stops steering replies toward a checklist nobody is following.
- Editing is safe mid-conversation. If you delete a procedure while a conversation is part-way through it, the agent stops following it instead of half-applying it.
Test before you deploy
Open the playground (Test) and send the kind of message the procedure is meant to catch.
When a procedure fires, the playground takes you to the Procedures tab and rings the card that ran — so you can see straight away whether the right one matched, and jump into it if it didn't.
The playground tests the persona as you have it on screen, unsaved edits included — so you can try a change before committing to it. Customers only ever see the version you Save & Deploy.
Tips for well-configured procedures
- One scenario per procedure. Don't combine "cancel subscription" and "upgrade plan" — split them.
- Write descriptions as situations, not labels. "Refunds" is too vague; "Customer asks for a refund or says they were charged incorrectly" is actionable.
- Put each entry where it belongs. Ask yourself what the agent knows at that point — a skill that needs the order number can't run before you've asked for it.
- Notes for rules, steps for work. If it applies throughout, it's a note. If it happens at a moment, it's a position.
- Put outcome-specific buttons on the branch. If a button only makes sense after one outcome, it belongs on that branch, not in a Quick replies entry the customer sees whatever happened.
- Make quick reply labels customer-friendly. Write what they'd tap, not internal codes.
- Use the message field for clarity. When two buttons could mean different things to the agent, give each a distinct message.
- Install skills before you reference them. Only installed skills appear in the @ list.
- Decide on data, not on descriptions. Where a fact lives in a custom field or a label, reference it with @ — the agent can check a reference; it can only guess at a description.
- Check for overlap. If two procedures keep firing on the wrong messages, tighten their descriptions so each names a situation the other does not.
- Test before you deploy. The playground shows which procedure matched and whether quick replies were offered — use it after every significant change.
Troubleshooting
Quick replies never appear
Check these in order:
- Does the procedure have a Quick replies entry? Skills, steps and notes alone won't offer buttons.
- Did the reply reach it? An entry's buttons go out only on the reply that gets to that point in the procedure. If the agent was still asking for something earlier on, nothing is offered yet.
- Is the description specific enough? Vague descriptions rarely match confidently.
- Do two procedures overlap? Only one runs, and it may not be the one you meant.
- Did you deploy? Playground testing is safe, but customers only see deployed versions.
A branch's buttons didn't appear
Check these in order:
- Did the reply actually follow that branch? The buttons follow what the reply says. If the agent asked for a detail no branch covers, or answered something else, it gets the buttons of the Quick replies entry it reached instead, or none.
- Does the branch have a condition? A branch with buttons but no If is skipped, and the editor flags it.
- Did a skill return buttons on the same turn? Skill buttons take priority.
- Did you deploy? Customers only see deployed versions.
The wrong procedure keeps matching
Two descriptions are probably too similar. Open both procedures side by side, find a message that's matching the wrong one, and narrow the other description so it no longer applies.
A procedure never matches when it should
- Rewrite the description as a full situational sentence, using the words your customers actually send.
- Compare against your other procedures — another one may be catching the message instead.
The skill I want isn't in the list
Go to Intelligence → Skill Sets, install the skill set that contains it and configure any required settings, then return to the Procedures tab. It will appear in the @ list once it's available.
I can't add another entry
A procedure holds up to 15 numbered positions and up to 10 notes. The two are counted separately, so running out of steps doesn't stop you adding a note.
If you're at the limit, remove what you no longer need, or split the scenario into two procedures.
I can't add another quick reply
One Quick replies entry holds up to 10 replies. Across a whole procedure, only the first 10 replies you wrote are offered to customers — several entries that add up to more than ten will lose the extras.
Remove replies you no longer need, or split the scenario into two procedures.
Procedures you wrote earlier
Nothing to migrate by hand. A procedure written when instructions, steps, quick replies and skills were separate areas opens as one list: its old prose appears as notes at the top, then its steps, then its skills and quick replies at the end — because those three never had a position of their own.
Your agent already follows it in exactly that form, whether or not you've opened it: what you see in the editor is what runs. Nothing is lost — prose with more paragraphs than a procedure has room for in notes is grouped, a few paragraphs to a note, rather than cut. Move the skills and quick replies to where they belong in the flow and save.