Skip to content

v1.6.5

Choose a tag to compare

@mpge mpge released this 23 Oct 02:14
· 38 commits to main since this release
670d361

Added

  • Live chat transfer (escalated-laravel escalated.admin.chat.transfer): POST /wp-json/escalated/v1/chat/{session_id}/transfer, with an API token like the other agent chat endpoints. The body is {agent_id, department_id} (either or both); the shared ChatActionBar's {type: "agent"|"department", id} is accepted too. With an agent, the session and ticket are reassigned to them. With only a department, the ticket moves there and the chat goes back to the queue (unassigned, waiting), then chat routing runs again for the new department. A missing or non-integer target, an unknown department, an ended chat, or an agent who is not staff or cannot see the ticket is a 422; an unknown session is a 404. New ChatSessionService::transfer() and escalated_chat_transferred action ($session, $from_agent_id, $to_agent_id, $to_department_id).
  • chat.transferred runs workflows (new trigger, "Chat transferred") and is sent to webhooks subscribed to it; the webhook form offers it. Its payload is the ticket plus chat {session_id, ticket_id, status, agent_id, department_id, from_agent_id, to_agent_id, to_department_id}, as escalated-laravel's. Existing webhooks are not subscribed to it automatically.
  • Webhooks now receive the other live chat events, as escalated-laravel's DispatchWebhook: chat.started (a chat begins), chat.assigned (an agent accepts it), chat.message (an agent or visitor message) and chat.ended. Until now only workflows ran on them. The webhook form offers them. Each payload is the ticket plus chat {session_id, ticket_id, status, agent_id, department_id}; chat.message adds reply_id and author_type (agent or visitor) but never the body, and chat.ended adds ended_by (agent, customer or system). Existing webhooks, including one folded from the old single webhook URL, are not subscribed to them automatically; tick them on the webhook to receive them.
  • escalated_chat_message passes a third argument, $author_type (agent or visitor), and escalated_chat_ended a third, $ended_by. ChatSessionService::end() takes an optional third $ended_by (default system); the agent and widget end endpoints pass agent and customer. Existing listeners registered for fewer arguments are unaffected.

What's Changed

  • Live chat transfer and chat.transferred by @mpge in #109
  • feat(webhooks): send live chat events to webhook subscribers by @mpge in #110
  • chore(release): v1.6.5 by @mpge in #111

Full Changelog: v1.6.4...v1.6.5