Skip to main content

Ticket handoff

The Kapa Website Widget can offer users a Create ticket button that emails the current conversation to an address you configure. Use it to hand off from the AI to any human workflow while keeping the full context of what the user asked.

Ticket handoff popover

Common use cases

  • Support escalation: the user needs a human when the AI answer doesn't fully resolve their question.
  • Sales or demo requests: the user is qualifying and wants to talk to a person.
  • Bug reports: the user hit an issue and wants to send the context to your engineering team.

Overview

When enabled, a Create ticket button appears on qualifying answers. Clicking it opens a small form that asks for the user's email and an optional note. On submit, an email containing the full question-and-answer transcript plus the note is sent to the address you configured. The email's Reply-To is set to the user's email, so the recipient can respond to the user directly.

The button is only rendered when a destination email is set. You can further control when it appears using triggers.

Enabling handoff

Set data-handoff-email to the address that should receive tickets:

<script
src="https://widget.kapa.ai/kapa-widget.bundle.js"
data-website-id="YOUR-WEBSITE-ID"
data-handoff-email="handoff@example.com"
></script>

Without this attribute the button is not rendered.

Renaming the button

When the handoff is enabled via data-handoff-email, the button label defaults to Create ticket. Override it with data-handoff-button-text to match your workflow:

data-handoff-button-text="Talk to Sales"

See Handoff button for the full list of button styling options.

Configuring triggers

By default the button shows on every answer. You can restrict it to answers that meet specific conditions using data-handoff-triggers:

data-handoff-triggers="uncertainty,downvote"

Supply a comma-separated list. The button appears when any listed trigger matches.

TriggerShows the button when…
alwaysEvery answer. This is the default.
conversation-lengthThe conversation has reached at least data-handoff-conversation-length-threshold question-answer pairs.
uncertaintyKapa flagged the answer as uncertain.
downvoteThe user has downvoted the answer.

Conversation-length threshold

When you use the conversation-length trigger, control the pair count with data-handoff-conversation-length-threshold (default 3):

data-handoff-triggers="conversation-length"
data-handoff-conversation-length-threshold="5"

Event tracking

Track handoff interactions with the following events:

See the Events API documentation for implementation details.