Support Ticket Handoff
Available from SDK 0.16.0.
Ticket filing is configured per application in the Moss dashboard,
including the intake form the assistant collects against. Contact Moss to
enable it for your application.
How it works
- Collect — the assistant gathers the ticket fields in conversation, validated against your configured intake form.
- Review — the widget renders the drafted ticket as a preview card in the chat. The user can edit the description and confirm or cancel.
- Hand off — on confirm, the SDK calls the
onSupportTicketcallback you registered at initialization, passing the confirmed ticket and a handoff id. - File — your page forwards both to your backend over your own session-authenticated channel. Your backend attaches the requester and files the ticket.
- Confirm — your callback resolves with the outcome. The assistant shows the user the result, including the ticket id when you provide one.
Registering the callback
RegisteringonSupportTicket is also the capability signal: the SDK reports
it at session init, and the backend offers ticket filing only to sessions that
registered it. A page that doesn’t register the callback is never offered a
flow it cannot finish.
The handoff
Your callback receives aSupportTicketHandoff:
SupportTicketPayload uses the Zendesk ticket-create shape, in Zendesk’s own
casing, so your backend can attach the requester and post it without
translation:
Fields the user left unset are absent rather than empty — Moss omits what it
cannot determine instead of guessing.
The outcome
Resolve your callback with aSupportTicketOutcome:
- Resolve
{ ok: true }only once the ticket really exists, withticketIdwhen your backend can name it. The user is shown “Submitted on your behalf” on the strength of that value alone. - Resolve
{ ok: false }when filing failed or was refused.errorCodeanderrorDetailland in the handoff’s audit trail; they are never shown to the user. - Do not resolve early to release the SDK. A callback still pending after 15 seconds, or one that rejects, is treated as unknown rather than failed: the card tells the user the request was handed over without a confirmation, because your backend may well have filed it. Late resolutions are ignored.
Responsibilities
Next Steps
Configuration
Full SDK configuration reference
Authentication
JWT setup for SDK sessions