Skip to content

Draft replies to inbound email with AI

Verified against source (4)

  • Extensions/MessageExtensions.cs
  • qbo4.AI/GenerativeAI.cs
  • qbo4.AI/GenerativeAIOptions.cs
  • Message/Message.Search.xslt

Customers often email questions whose answers are already in QBO: a balance, a due date, the status of a request. In this walkthrough you set QBO up to draft a reply to each inbound email using the data on the record the email is about, save the draft for a person to check, and send it only when they’re satisfied.

For example, with an account statement imported onto an account record, an inbound email asking “What is my current balance, and when is my next payment due?” gets a draft reply that quotes the balance and due date from the account. The reviewer confirms the figures and sends it.

Power users who configure messaging and workflow, and the operations staff who review and send the drafts.

  • AI configured for your installation, with at least one named AI service. Reply drafting uses the installation’s default unless you name another.
  • The Messaging application setting GenerativeAI set to True, which shows Generate response using AI on replies.
  • The MessageReply permission for anyone who drafts replies from the screen.
  • An inbound mailbox that QBO receives from, with processors that link each email to its record. See Monitor an inbound mailbox.
  • Messaging: inbound mailboxes, processors, message templates, and replies
  • AI: reply drafting
  • Workflow and Worklists: automation and review queues

The draft is only as good as the data the model sees. QBO sends the model two things: the email’s body, and a summary of the record the email is linked to (for example, the account, loan, or claim). If an email isn’t linked to a record, the model sees only the email itself and can’t answer questions about the account.

On the inbound mailbox, add a processor that links each email to its record, typically a statement that finds a reference number in the subject and returns the record. Add a threading processor so replies to earlier messages join the same conversation.

Try the feature on one message before automating it:

  1. Open an inbound message that’s linked to a record.
  2. Select the Reply icon.
  3. Check Generate response using AI. Check Reply all to copy everyone on the original; otherwise the draft is addressed to the sender only.
  4. Choose Save. QBO drafts the reply and opens it for editing.
  5. Check every figure and statement against the record, correct anything that’s wrong, and send it.

The draft’s subject is the original’s, prefixed RE:. It inherits the original’s type, priority, status, and secure-delivery setting, and it’s threaded to the original message.

To draft a reply as soon as an email arrives, trigger a workflow from the inbound message (setting the message template in a processor is a convenient trigger) and add an advanced step that saves a draft:

GET /api/message/airesponsesave?ID={MessageID}&IncludeRecipients=false

There are three reply operations. Choose the one that matches how much review you want:

Operation What it does Use it when
airesponsedraft Drafts the reply and returns it without saving. A person is drafting from the screen.
airesponsesave Drafts and saves the reply, but doesn’t send it. You want every reply reviewed. Start here.
airesponsesend Drafts, saves, and sends the reply. Only for narrow, low-risk cases you’ve reviewed thoroughly.

Add AgentName to use a specific AI service instead of the default. Set IncludeRecipients=true to address the draft to everyone on the original, not just the sender.

Give reviewers a worklist of saved, unsent AI drafts, so each one is checked and sent from a single queue. Because drafts are ordinary messages threaded to the original, the full conversation is on the record for anyone who picks it up later.

Reply drafting has no per-template instructions: the model is asked to draft an HTML reply to the email from the record’s data. To give every draft standing guidance, such as your sign-off, tone, or “never promise a payoff figure”, ask your administrator to add a prompt prefix for message replies in the installation’s AI configuration.

For answers that need a structured review with your own instructions, use an AI review with a message template instead (see the next walkthrough).

Every inbound email that’s linked to a record has a draft reply waiting, built from that record’s current data. Staff spend their time checking and sending rather than looking up figures and typing, and nothing reaches a customer until a person (or a rule you deliberately configured) sends it.