Sleep-aid and wellness brand builds a custom Zia agent to draft support replies

  • The Company
  • Requirements
  • Solution
  • Benefits

The Company

This company sells sleep-aid and wellness devices direct to consumers, with two product lines that couldn't be more different from a support standpoint. The first is a mouthpiece worn overnight to reduce snoring, sold under the brand Mouthpiece, along with two accessories: a respiratory support supplement and an ultrasonic UV cleaner for sanitizing the device. The second is Gummies, a nightly supplement line split into two formulas: one for night-time bladder control and one for menopause-related hot flashes and night sweats.

Every day, customers write in about fit issues, gag reflex, drooling, hinge separation on the mouthpiece, or questions about when the gummies will start working. Some want to cancel a subscription; some mention a refund without really asking for one yet; others just say the product "isn't working" and leave it there.

Support replies to these emails by hand, and the team leans on a fairly detailed internal playbook to do it: a troubleshooting guide for the mouthpiece, a master ingredient and safety guide for both gummy formulas, and a set of SOPs covering returns, cancellations, incorrect shipments, and defective units. The guarantee terms differ by product too. Mouthpiece has a 30-day adjustment period; Gummies carries a 90-day guarantee. Getting the wrong one into a reply is an easy mistake to make when an customer support agent is moving fast through a queue, and it's the kind of mistake that erodes trust with a customer who's already frustrated.

The team wanted to speed up reply drafting without losing any of the judgment calls a real agent makes, and without ever letting an automated system approve a return, cancel a subscription, or promise something the product guide doesn't back up.

The requirement

The brief was narrow on purpose. Whatever they built needed to draft an email reply, but not send one—and never touch order statuses, refunds, or subscription states on its own. A human agent reviews and approves every draft before it goes out. Beyond that constraint, the reply itself had to follow a fixed structure every time: greeting, acknowledgement, a one-sentence summary of the issue, troubleshooting or guidance, a retention message that references the correct guarantee, a closing line, and the sign-off. No emojis, no casual tone, no medical claims beyond what's stated in the guarantee terms.

The harder part was the logic sitting behind that structure. A refund mention needed to trigger encouragement to keep using the product first, with only the relevant guarantee referenced—never both. A cancellation request needed a reason collected before anything else happened. A vague "this isn't working for me" needed a clarifying question, not a guess. And because customers sometimes confuse their marketing email subscription with their recurring product subscription, the agent had to catch that ambiguity and ask which one they meant before doing anything.

The team evaluated Zoho Desk's built-in Zia Reply Assistance before deciding to build something custom, and three gaps ruled it out.

It only reads from the Zoho Desk knowledge base. Reply Assistance generates suggestions from KB articles inside Desk and nowhere else. The team's actual troubleshooting content, including the product guarantee logic and the five behavior rules for refunds, cancellations, and vague complaints, lives in documents that were never structured as KB articles and weren't going to be rebuilt as one just to fit the tool.

Reply Assistance suggests; it doesn't govern. It can propose reply text, but there's no way to force a specific seven-part format, block it from implying a refund is approved, or require it to ask for a cancellation reason before responding. Those are rules that would still depend on the human agent remembering to apply them by hand, which was the exact problem the team was trying to solve.

Turning it on wasn't as simple as flipping a switch. Reply Assistance has dependencies buried in the Desk admin panel, most notably that it won't function unless Answer Bot is already active, and once active it draws on the entire KB rather than a scoped set of content the team controls.

Solution

Rather than adopt the native Reply Assistance module, the team built a single custom agent in Zia Agent Studio (named Zia internally) and gave it exactly two tools to work with. Zoho Desk depends on knowledge base articles published within and is also dependent on the answer bot being active.However, this is not the case with Zia. Every rule about tone, structure, and what the agent is and isn't allowed to do lives directly in the agent's instructions.

The agent gets triggered through workflows set within Zoho Desk. Every time a new ticket is created, or a new response is recorded from a customer in the thread, the workflow triggers the agent via a custom function.

PurposeDrafting policy-compliant email replies for human review
ProductsZoho Desk
Best suited forSupport teams handling multiple product lines with different guarantee terms and strict rules around refunds, cancellations, and subscriptions.
ComplexityModerate
DeploymentIn Zoho Desk, via workflows
ToolsLatestemailthread (Custom tool), desk_draftemailreply
Knowledge baseYes
Data 
sensitivity
The agent works with customer emails and order-related details, which may contain personal information and should only be accessible to authorized support staff.
ConstraintsThe agent cannot send emails, approve returns, process refunds, update ticket status, or cancel subscriptions under any circumstance.

How a reply gets drafted

The agent starts by calling the Latestemailthread tool and pulling exactly three fields out of the response: the customer's name, their email address, and the plain text of their most recent message. Everything else in that thread, including HTML formatting, quoted history, and attachments, gets ignored. This keeps the agent working from a clean, minimal input rather than getting confused by forwarded threads or old quoted replies.

With the help of retrieval augmented generation (RAG), the agent then retrieves relevant information from the associated knowledge base about product policies, guarantor information, product feature troubleshooting, business policies, and more.

Once the agent has fetched this information, it writes the body of the reply, following the seven-part structure provided by the company every time and applying whichever behavior rule matches the situation:

  • A specific product complaint gets a likely non-medical cause, targeted troubleshooting steps, and a reference to the one correct guarantee for that product.

  • Any mention of a refund or return gets acknowledged, but the agent never approves it, never issues a label, and never processes anything. It references only the relevant guarantee, encourages the customer to keep trying the product, and closes with a fixed retention message the team wrote specifically for this scenario.

  • A cancellation request always gets a "why" question first. If a reason comes with it, the agent asks for the order number if it's missing and offers guidance before accepting the cancellation as final. If no reason is given at all, it asks a probing question instead of proceeding.

  • A customer who's simply unhappy, with no real detail to go on, gets asked what part of the experience fell short, so a human agent has something concrete to work with.

  • Order and shipping questions get general information only. The agent never guesses at order-specific details it doesn't have, and instead asks for whatever's missing.

  • Subscriptions get special handling because customers often mean one of two very different things when they say "unsubscribe." There's the Order Subscription, which is the recurring product delivery managed through the customer portal, and there's the Email Subscription, which just controls marketing emails. When a request doesn't make clear which one the customer means, the agent asks directly rather than assuming.

    Once the body is written, the agent calls desk_draftemailreply with the customer's email address and the generated content. That call creates a draft—but doesn't send anything, touch ticket status, or update any order or CRM record. A support agent still opens that draft, reads it, and decides whether to send it as written or adjust it.

Benefits

Customer support agents open a ticket and already have a reply waiting that follows the same structure, references the right guarantee, and asks the right clarifying questions, instead of starting from a blank reply box every time.

The seven-part format and the behavior rules apply the same way regardless of which agent is working the queue, so a rushed shift doesn't mean a customer gets the 30-day guarantee mentioned when they should have heard about the 90-day one, or a cancellation processed before anyone asked why.

Because the agent only ever produces a draft, nothing related to refund approvals, subscription cancellations, or order changes happens without a person deciding it should. The team gets the speed of an AI-drafted first pass and keeps every decision that actually changes a customer's account in human hands.

Building the digital agent directly in Zia Agent Studio also means the rules can evolve on their own timeline.

(Implemented by Zoho Forward Deployed Engineering)

  • Key FeaturesZia Agents, Workflow rules