Skip to content

Issue 525 Web Chat Hand Off And Workflow Origin

Ed Mozley edited this page Dec 5, 2026 · 1 revision

Issue 525 - Web chat: the hand-off to a person, the analyst's name, and workflows

Reported by @acelr22 in #525 (with the request for a limit on the AI's answers, built at the same time). Fixed after 5.19.0.

What was wrong

  1. A "yes" to the AI's offer of a person did nothing - the AI asked, the visitor agreed, and the AI carried on.
  2. Talk to a person said the visitor was through before anyone was - and in assist mode the button changed nothing at all.
  3. An analyst's reply showed under the AI's name. Replies sent from the ticket are stored with the channel's name as the sender, which is the widget's name.
  4. The AI answered the visitor's replies to the analyst - in assist mode nothing told it a person had taken over.
  5. A workflow on "A ticket is created" with Origin = Web chat never ran. Two faults: web chat (and WhatsApp, Teams and every messaging channel) never fired the event at all; and the event never carried origin_id (or owner_id), although the editor offered both as conditions and every other ticket event sends them - so an Origin condition could not match on any channel, email included.

The fix

1-4: Web chat - Developer Guide, Handing over to a person. 5: ticketDispatchCreated() now sends both fields -

                // GH #525: the editor has always offered Origin and Owner as conditions on
                // this trigger (availableFields), and every other ticket event sends them -
                // this one did not, so "Origin is Web chat" could never match.
                'owner_id'            => $t['owner_id']            !== null ? (int)$t['owner_id']            : null,
                'origin_id'           => $t['origin_id']           !== null ? (int)$t['origin_id']           : null,
  • and webchatOpenTicket() and the messaging ingest call it after the ticket is made, so workflows and the bell hear about tickets from every channel.

Tests

tests/webchat-handoff.php (17) - including a ZZ workflow with Origin = Web chat that must run when the chat becomes a ticket. Control: on the code before, that check fails (no event), as do the hand-off, joined and name checks.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally