> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wayak.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Email reply drafting

> Draft context-aware customer email replies that follow your brand voice and resolve issues faster

Drafting quality email replies is one of the most time-consuming tasks in customer service. Each response requires reading the incoming message, understanding the issue, checking customer history, referencing the right policy, and writing in a consistent brand voice. Even experienced agents spend 5-10 minutes per reply. Multiply that across hundreds of daily emails and you have a team that spends more time writing than solving.

This use case gives your support team an agent that reads incoming emails, pulls relevant customer history and policy information, and drafts a reply ready for human review. The agent follows your brand voice guidelines from the knowledge space and flags any email that requires escalation instead of a standard response.

***

## What you need

<CardGroup cols={2}>
  <Card title="Data sources" icon="database">
    * **Helpdesk system (Zendesk, Freshdesk, or similar)** — Ticket records with email threads, status, and assigned agent
    * **CRM system** — Customer account details, contract status, and purchase history
  </Card>

  <Card title="Knowledge spaces" icon="book-open">
    * **Brand voice guidelines** — Upload your tone guide, approved phrases, and language to avoid
    * **Email templates** — Standard response templates for common issue types (billing, shipping, returns, technical)
    * **Refund and credit policies** — Upload your current policies so the agent can reference them accurately
  </Card>
</CardGroup>

**Semantic layer:** Define these in your ontology before setting up the agent.

| Component | Name                    | Definition                                                                                                         |
| --------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Object    | Ticket                  | Maps to the helpdesk ticket table. Represents a customer issue with status, category, and full conversation thread |
| Object    | Customer                | Maps to the CRM account table. Represents a customer with contact info, account tier, and history                  |
| Metric    | First Response Time     | Minutes between ticket creation and the first agent reply                                                          |
| Metric    | Customer Lifetime Value | Total revenue from a customer's account, used to prioritize high-value customers                                   |
| Dimension | Issue Type              | Categorizes tickets as billing, technical, shipping, returns, account, or general inquiry                          |
| Dimension | Customer Tier           | Segments customers by account level: enterprise, business, standard                                                |

<Tip>
  See [building a semantic layer](/quickstart/build-semantic-layer) for a step-by-step guide.
</Tip>

***

## Agent setup

<Steps>
  <Step title="Create the agent">
    Go to **Agent Space** > **New agent**.

    | Field    | Value                                              |
    | -------- | -------------------------------------------------- |
    | **Name** | Support Rep                                        |
    | **Role** | Customer service specialist                        |
    | **Goal** | Resolve customer issues quickly and empathetically |
  </Step>

  <Step title="Set the description">
    > You are a customer support specialist. Always greet the customer by name when available. Use a warm, professional tone. Acknowledge the customer's frustration before jumping to a solution. Keep responses concise — no more than three paragraphs. If you cannot resolve an issue, escalate clearly and explain what happens next. Never promise refunds or credits without confirming the policy first.
  </Step>

  <Step title="Scope data access">
    Grant access to:

    * Helpdesk system data source (ticket records and email threads)
    * CRM system data source (customer accounts and purchase history)
    * Brand voice guidelines knowledge space
    * Email templates knowledge space
    * Refund and credit policies knowledge space
    * Ticket and Customer objects in the semantic layer
  </Step>

  <Step title="Add skills">
    <AccordionGroup>
      <Accordion title="Draft customer email reply">
        **Trigger:** User asks to draft a reply or a new support email arrives

        1. Read the incoming email and identify the issue type (billing, technical, shipping, returns, account, general inquiry).
        2. Check the customer's history in the CRM for prior interactions, open tickets, and account tier.
        3. Pull the relevant email template from the knowledge space based on the issue type.
        4. Draft a reply that acknowledges the issue, provides a clear next step, and sets expectations for resolution time.
        5. Match the company's tone guidelines from the brand voice knowledge space: professional, empathetic, concise.
        6. If the issue requires internal action (refund, escalation, engineering ticket), note it separately as an internal comment.
        7. Present the draft for review before sending.
      </Accordion>

      <Accordion title="Check refund eligibility">
        **Trigger:** Customer requests a refund or credit

        1. Identify the customer and order from the email or ticket context.
        2. Pull the order details from the CRM, including purchase date, amount, and item.
        3. Check the refund policy from the knowledge space for the applicable time window and conditions.
        4. Determine eligibility: within policy (approve), outside policy (deny with reason), or edge case (escalate).
        5. Draft the appropriate response, citing the specific policy clause.
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>

***

## Automation

### Playbook: Auto-draft for new emails

<Steps>
  <Step title="Set the trigger">
    Set the playbook to trigger on a new inbound email event from the helpdesk system.
  </Step>

  <Step title="Build the workflow">
    The playbook reads the incoming email, classifies it, pulls context, and generates a draft reply saved back to the ticket.

    1. **Query step** — Pull the email content and any existing ticket context from the helpdesk.
    2. **Query step** — Look up the customer in the CRM by email address to get account details and history.
    3. **AI step** — Classify the issue type and generate a draft reply following the brand voice guidelines.
    4. **Condition step** — If the issue type is "legal" or "data privacy," skip the draft and route directly to the legal queue.
    5. **Action step** — Save the draft reply as an internal note on the ticket for agent review.
  </Step>

  <Step title="Configure delivery">
    The draft is saved directly to the helpdesk ticket. Send a Slack notification to the assigned agent's channel letting them know a draft is ready for review.
  </Step>

  <Step title="Test and activate">
    Click **Run now** to test with live data, then toggle to **Active**.
  </Step>
</Steps>

***

## What's next

<CardGroup cols={2}>
  <Card title="Ticket classification" icon="arrow-right" href="/use-cases/customer-service/ticket-classification">
    Automatically categorize and prioritize tickets the moment they arrive.
  </Card>

  <Card title="All customer service use cases" icon="list" href="/use-cases/customer-service">
    See the full list.
  </Card>
</CardGroup>
