Repository navigation
v1.6.5
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 sharedChatActionBar'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. NewChatSessionService::transfer()andescalated_chat_transferredaction ($session, $from_agent_id, $to_agent_id, $to_department_id). chat.transferredruns workflows (new trigger, "Chat transferred") and is sent to webhooks subscribed to it; the webhook form offers it. Its payload is the ticket pluschat {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) andchat.ended. Until now only workflows ran on them. The webhook form offers them. Each payload is the ticket pluschat {session_id, ticket_id, status, agent_id, department_id};chat.messageaddsreply_idandauthor_type(agentorvisitor) but never the body, andchat.endedaddsended_by(agent,customerorsystem). 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_messagepasses a third argument,$author_type(agentorvisitor), andescalated_chat_endeda third,$ended_by.ChatSessionService::end()takes an optional third$ended_by(defaultsystem); the agent and widget end endpoints passagentandcustomer. 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