How to Write Reply Templates That Keep AI Replies On-Script

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Write Reply Templates That Keep AI Replies On-Script.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Write Reply Templates That Keep AI Replies On-Script.

Write reply templates that keep AI on-script by splitting each canned response into locked lines and fill-in slots. Lock the policy wording, numbers and promises; mark the parts the AI may adapt (greeting, the customer's details, one line of empathy); and add when-not-to-use rules so the AI escalates instead of improvising. Then test on real past messages.

Old-style canned responses and AI pull in opposite directions. A canned response is rigid, so it often doesn't quite fit the question and customers feel processed. AI is flexible, so it drifts from your policy, rounding "within 7 working days" to "in a few days" or inventing a free returns label. A good template gives the AI a fixed skeleton, clearly marked places to flex, and a rule for what to do when nothing fits.

Follow me on Instagram@sagnikteaches

The worked example is an illustrative online clothing shop with three people handling about 600 customer emails and messages a month, most of them about returns, sizing, delivery and exchanges. It uses AI to draft replies that a person approves, and it is considering letting an AI agent answer the simplest questions directly. Examples from a software reseller, an events company, a print shop and a jewellery seller follow.

Connect on LinkedInSagnik Bhattacharya

One principle runs through everything below. Consistency doesn't come from a model setting. Turning the temperature down used to be the standard advice for consistent AI output, but it no longer works across the board: some newer models don't support it at all. Fixed instructions, examples, structured output and a review step do the job instead, and a well-built template is all four.

Subscribe on YouTube@codingliquids

Anatomy of an AI-ready reply template

An AI-ready template has six parts. Most canned responses have only one of them (the text), which is why AI either ignores them or copies them stiffly.

  1. Name and trigger: what situation it's for, in plain words the AI can match against ("Customer wants to return an unworn item within 30 days").
  2. Facts needed: what must be known before replying (order number, delivery date, item). If a fact is missing, the reply asks for it rather than guessing.
  3. Locked lines: sentences sent exactly as written, because they state policy, money or time.
  4. Slots: marked places the AI fills or adapts, each with a limit ("one sentence", "the customer's first name only").
  5. Never-say list: promises and phrases the AI must not add to this reply.
  6. Hand-over rule: the conditions under which this template must not be used and a person takes over.

Here is the clothing shop's returns template, written out in full:

TEMPLATE: RETURN-01  Unworn item, within 30 days
USE WHEN: customer asks to return an item they haven't worn, and the order
arrived 30 days ago or less.
FACTS NEEDED: order number, item name, delivery date. If any is missing, ask for it.
REPLY:
[GREETING: "Hi [first name]," only]
[ACKNOWLEDGE: one sentence that names the item and the reason if given]
LOCKED: You can return it within 30 days of delivery, as long as it's unworn
with the tags still on.
LOCKED: Start your return here: [returns link]. Returns cost $4.95, taken
from your refund, unless the item is faulty.
LOCKED: Once it reaches us, we'll check it and refund you within 7 working
days to the card you paid with.
[OPTIONAL: one sentence offering an exchange if they mentioned size or fit]
[SIGN-OFF: "Thanks, [agent first name]"]
NEVER SAY: free returns; refund "straight away" or "in a few days";
"we're sorry for any inconvenience"; anything about store credit.
HAND OVER IF: item worn or damaged; over 30 days; customer says it's faulty;
customer is angry or mentions a chargeback, complaint body or lawyer.

The locked lines carry everything that could cost money if the AI rephrased it. The slots carry everything that makes the reply feel written for this person.

From canned response to template: a returns reply rebuilt

Here is how the same reply looked at three stages, all illustrative. First, the shop's old canned response, used for every return question:

Old canned response: Thank you for contacting us regarding your return. Please visit our Returns page for full details of our returns policy. If you have any further questions, please do not hesitate to get in touch.

It is accurate and useless: the customer asked a question and was sent to a page. When the shop started using an AI assistant with just "reply to this customer about their return, be friendly", it swung the other way:

AI reply without a template: Hi there! So sorry to hear the dress didn't work out. No worries at all, returns are totally free and super easy! Just pop it back in the post and we'll get your refund to you in 2-3 days. Let us know if there's anything else we can do!

Friendly, and wrong three times: returns cost $4.95, refunds take up to 7 working days, and "pop it back in the post" skips the returns portal the shop needs customers to use. Every one of those becomes an argument later. With the template, the AI draft for a customer asking to return a linen dress that "comes up too short" looked like this:

AI reply with RETURN-01: Hi [first name], thanks for letting us know the linen midi dress came up too short. You can return it within 30 days of delivery, as long as it's unworn with the tags still on. Start your return here: [returns link]. Returns cost $4.95, taken from your refund, unless the item is faulty. Once it reaches us, we'll check it and refund you within 7 working days to the card you paid with. If you'd like the long version instead, it's 8cm longer and we can swap it over. Thanks, [agent first name]

What the approver fixed: the exchange offer said the long version was "8cm longer", a figure the AI had inferred from the product names rather than looked up. It was actually 6cm. That's why slots need limits too: the optional exchange line now says "offer an exchange; don't state measurements unless they're in the order details". Everything else went out unchanged.

Writing the slots so templated replies don't sound canned

Locked lines keep replies accurate. Slots keep them human, and they are where most templates go wrong, either because the slot is so loose the AI fills it with stock sympathy or so tight it adds nothing. Three rules the shop settled on, each with an illustrative bad and good fill for the acknowledgement slot:

  • Name the specific thing. Bad: "Thanks for reaching out about your order." Good: "Thanks for letting us know the rust cord shirt was too roomy across the shoulders." Repeating the item and the customer's own reason shows someone read the message.
  • One sentence of feeling, at most, and only when earned. Bad: "We completely understand how frustrating this must be and we're so sorry for any inconvenience caused." Good, for a late parcel: "Sorry it's taking longer than it should." For a simple return, no apology at all: nothing has gone wrong.
  • Answer the question they asked before the policy. If the customer asked "can I swap it for a medium?", the first flexible line says "Yes, we can swap it", and the locked return lines follow. A template that puts policy first reads like a form letter even when every word is right.

Write these rules into the slot markers themselves ("[ACKNOWLEDGE: one sentence, name the item and their reason, no apology unless something went wrong]") rather than in a separate style guide, because the AI reads the template every time and the style guide only sometimes. The shop also keeps two or three example fills under each template, taken from replies customers answered with a thank-you, which gives the AI a pattern without handing it a script to copy.

Where the templates live in your tools

The template text is the same everywhere; where you store it depends on how replies get written.

ToolWhat it calls templatesHow AI uses them
GmailTemplates (the old "canned responses" feature)You insert the template, then use Gemini or another assistant to fill the slots, or paste the library into an assistant's instructions
ZendeskMacrosIts suggested first replies feature uses generative AI to draft a first response from your existing macros and help centre articles
Help ScoutSaved replies (with variables)AI Assist can fix grammar, change tone or length, or translate saved replies on Plus and Pro plans; its AI Answers bot is billed at $0.75 per resolution
Intercom (Fin)Macros for agents; Guidance for the AI agentGuidance lets you set Fin's communication style, when to ask clarifying questions and when to hand over, and preview it before switching it on
ChatGPT or ClaudeWhatever you put in a ProjectKeep the template library as a project file and the rules in the project instructions, so every draft starts from them

In Gmail, turn templates on under Settings, See all settings, Advanced, then save any draft as a template from the compose window's More options menu; Google's page on creating a template in Gmail has the steps. Gmail can also send a template automatically through a filter, which suits a simple "we've received your message" acknowledgement and nothing more complicated.

If the shop's Shopify Inbox AI agent answers customers directly, note that it can use web search as a secondary source. Put the locked policy lines on your store's policy pages in exactly the same words, and test the agent on your own policy questions, so it finds your wording rather than a general answer.

The clothing shop's eight templates, and what they cover

The shop sorted one month's 600 messages by what customers actually wanted. Eight types covered 71% of them (illustrative figures):

TemplateMessages a monthLocked lines include
Where's my order?118Dispatch times; how to read the tracking link
Return, unworn, within 30 days8430-day window, $4.95 fee, 7 working days
Size or fit advice before buying71"Measurements are on each product page"; the size-guide link
Exchange for another size52Exchanges free if stock allows; how to request
Faulty item34Free return; refund or replacement; photos requested
Change or cancel an order27Possible only before dispatch
Discount code not working23Code terms; one code per order
Refund not received yet177 working days after receipt; bank timing

The other 29% (174 messages) were a mix: wholesale enquiries, press, complaints, questions about specific fabrics, and messages asking two or three things at once. Those go to a person. The result after a month: drafting time for templated replies fell from about 6 minutes to under 2, including the approval read. At 426 templated messages that's roughly 426 × 4 = 1,704 minutes, about 28 hours a month back for three people. If you're earlier in this process, your first 30 days of AI customer support for an online shop covers what to set up before templates.

A prompt that makes the AI choose a template or hand over

With a template library in place, the AI's first job is choosing, and choosing "none" must be an allowed answer. This is the prompt the shop keeps in its project instructions:

You draft replies for an online clothing shop using ONLY the templates in
the attached library.
For each customer message:
1. Pick the one template whose USE WHEN matches. If none matches, or the
   message matches a HAND OVER IF rule, or it asks more than one thing
   that needs different templates, reply only with: HANDOVER + one line why.
2. Check FACTS NEEDED. If a fact is missing from the message or order data,
   ask for it in the reply instead of guessing.
3. Copy LOCKED lines exactly, character for character.
4. Fill slots within their limits. Never add promises, figures or dates that
   aren't in the template or the order data.
Return: TEMPLATE ID | the reply | any fact you couldn't confirm.

An illustrative run on a message reading "Hi, the jumper I ordered has a hole in the sleeve and I also want to swap the jeans for a size up":

Sample output: HANDOVER: two requests needing different templates (FAULTY and EXCHANGE); the faulty item also needs photos checked.

That's the right answer. An earlier version of the prompt, without the "more than one thing" rule, had picked the exchange template and ignored the hole, which is exactly the kind of reply that makes a customer write back angrier. Mixed messages are the most common way template systems fail, so the hand-over rule matters as much as the templates. The tutorial on when an AI chatbot should hand over to a human goes deeper on hand-over rules.

Test on last month's messages before anything goes live

Before trusting the templates, run them against 30 real messages from last month, chosen at random, and compare the drafts with what a person actually sent. Score each draft: right template (or right hand-over), locked lines intact, slots filled correctly, nothing invented. The shop's first test run found:

  • 4 wrong template choices, mostly "where's my order?" chosen for "I've received the wrong item". A new template, WRONG-ITEM, fixed it.
  • 2 softened locked lines: "within 7 working days" became "within about a week". The fix was adding "copy LOCKED lines character for character" to the prompt, and checking locked lines with a simple find in the draft.
  • 3 invented facts in slots, including a delivery date inferred from the order date. The "never add figures that aren't in the order data" rule came from this.
  • 21 drafts correct as written.

Retest after any change to templates, policy or the AI tool. The guardrails tutorial on stopping AI promising what you don't offer has more ways to catch invented promises.

Templates for other kinds of business

The structure carries across. Some illustrative locked lines and hand-over rules from other businesses:

  • Software reseller, "licence key not working": locked line "Please don't share your licence key in this chat; we'll look it up from your order number." Hand over if the customer mentions a security incident or a suspicious sign-in. Never say "it's definitely a bug on our side".
  • Events company, "is my date available?": the AI may only confirm availability from the booking calendar data, never from the message. Locked line: "A date is only held once the deposit is paid." Hand over if the enquiry mentions more than 200 guests or a venue the company hasn't worked at.
  • Print shop, "proof approval": locked line "Once you approve the proof, we print exactly what you've approved, so please check spelling, dates and phone numbers carefully." Never say "we'll catch any mistakes".
  • Handmade jewellery seller, "can you resize my ring?": slots for ring and current size; locked lines for price and turnaround; hand over for any ring not bought from the shop, because resizing someone else's work carries risk.

Keeping templates current when a policy changes

Templates rot quietly. When the shop raised its return fee from $3.95 to $4.95, it updated the website policy page and forgot two templates, so for a fortnight some replies quoted the old fee. Three habits prevent that:

  1. One owner. A named person approves every template change.
  2. A version line on every template ("RETURN-01, v3, updated 2 September"), so an approver can see at a glance whether a draft came from the current version.
  3. A change checklist: when a policy, price or time changes, search the template library, the policy pages, the chatbot's knowledge sources and any automated emails for the old wording, and change them all the same day.

If your AI also answers from an FAQ or knowledge base, keep that in step with the templates; the tutorial on training an AI chatbot on your FAQs, policies and prices covers that side. And for the order-tracking and returns questions that make up most online-shop inboxes, see whether an AI chatbot can handle order tracking and returns.

Reply template questions

Did Gmail get rid of canned responses?

The feature is still there under a different name. Gmail calls them templates now: turn them on in Settings, See all settings, Advanced, then save any draft as a template from the compose window's More options menu. You can also send a template automatically with a filter, which is worth doing only for simple acknowledgements.

How many reply templates does a small business need?

Fewer than most people think. Sort a month of messages by what customers actually asked, and you'll usually find six to ten types cover most of the inbox. Write templates for those first, and send everything else to a person rather than stretching a template to fit.

Can the AI change a locked line if the customer's case is unusual?

No. If a locked line doesn't fit, the template doesn't fit, and the message should go to a person. Letting the AI soften or rewrite policy wording is how inconsistent promises start. If the same exception keeps coming up, write a new template for it.

Will customers notice the replies come from templates?

They notice when a reply doesn't answer their question or repeats stock phrases. A template that fills in their order details, answers the exact question and sounds like your business reads as a good reply. The flexible slots exist so every reply fits the person it goes to.

Further reads

Sources: Gmail Help (Create a template in Gmail); Zendesk help (Turning on suggested first replies); Help Scout documentation (saved replies and AI Assist); Fin by Intercom help (Guidance basics); series fact sheet for Help Scout AI Answers pricing, Shopify Inbox's AI agent and advice on consistent outputs (checked September 2026).

Want your reply templates rebuilt for AI?

On a 1:1 call we'll sort a sample of your real messages, pick the templates that cover most of them, and set them up with locked lines and handover rules in the tools you use now.

Book a 1:1 call with me