When a reader files the ticket after seeing an answer, hand-off puts that conversation on the ticket. Your agent sees what the reader already tried.

Set up

Add a hidden field to your ticket form. It must be on the page so the deflector can write to it. Then, on the deflector’s Hand-off tab, turn on Carry the conversation onto the ticket, set Target field to the hidden field, and click Save changes.
SettingAttributeOptionDefault
Carry the conversation onto the ticketdata-handoff-enabledhandoffEnabledOff
Target fielddata-handoff-target-query-selectorhandoffTargetSelectorRequired when hand-off is on
What to writedata-handoff-formathandoffFormatlink
Turn hand-off on in the dashboard, not only on the script tag. Kelu only sends the conversation link when the deflector itself has hand-off on.
Don’t use the description field as the target. The reader would see the text, and a rich-text editor may overwrite it.

When it runs

When the reader presses Continue to submit ticket, or presses your form’s submit button again with the same question within the repeat window. The text is added after anything already in the field. The target can be an <input>, a <textarea> or an editable element.

What to write

Link to the conversation (link) writes a link to the conversation in your Kelu dashboard. Only members of your workspace can open it. The full transcript (markdown) writes every question, answer and source. Pick it when your agents can’t open the Kelu dashboard.
### AI assistant conversation

Thread: https://app.kelu.dev/conversations/8f2c…

**Question:**

How do I rotate a client key without downtime?

**Answer:**

Create the new key first, deploy it, then revoke the old one.

**Sources:**
- Rotating client keys — https://docs.example.com/keys/rotation
Follow-up questions are included when the reader presses Continue to submit ticket. A second press of your form’s own button carries only the first answer.

For forms built in JavaScript

If your form builds its request in code, listen for the kelu-deflector:submit event on document:
document.addEventListener("kelu-deflector:submit", (event) => {
  const { link, markdown } = event.detail;
  myTicket.ai_conversation = markdown ?? link ?? "";
});
event.detail holds:
FieldWhat it is
versionAlways 1
conversationIdThe id of the reader’s conversation with Kelu, the same conversation_id the form-deflect API returns. null when nothing was deflected, or when the workspace uses Zero data retention
deflectionIdThe id of this answer on the form. Use it to report the outcome. Can be null
linkThe link to the conversation, or null
markdownThe conversation as markdown, or null
Both link and markdown are sent whatever What to write says. The event also fires when Kelu found no answer good enough to show. Then deflectionId is set when Kelu recorded the attempt, and every other field is null.

Troubleshooting

  • Nothing is written. Add data-debug-mode="true" to the script tag and file a test ticket. The console shows hand-off target could not be written if the selector doesn’t match a field it can write to.
  • The link is missing. Hand-off is on only in the script tag. Turn it on in the dashboard.