Routing Inbound Messages to Queue
By default all your inbound messages are forwarded to AgentDesk or ClientApp configred with Default Inbound Queue. To change routing of current session you can use session routing API. Full Documentation:
Switch to External Server
POST /api/v1/session/routing
{
"queue": "external_bot",
"sessionId": "61f3810a02e14c0877fc1a32"
}
Switch to AgentDesk
To connect your customer to your agent on AgentDesk, all you need to do is create ClientApp with AppType AGENT and hit the api. For example if you have named this queue as agent_panel_queue, you can use the following request.
POST /api/v1/session/routing
// Default agent Desk Queue
{
"queue": "agent_desk",
"sessionId": "61f3810a02e14c0877fc1a32"
}
POST /api/v1/session/routing
// Route to Team
{
"queue": "agent_desk",
"sessionId": "61f3810a02e14c0877fc1a32",
"team": "sales"
}
POST /api/v1/session/routing
// Route to Agent
{
"queue": "agent_desk",
"sessionId": "61f3810a02e14c0877fc1a32",
"agent": "bob"
}
POST /api/v1/session/routing
// Custom agent Desk Queue
{
"queue": "agent_panel_queue",
"sessionId": "61f3810a02e14c0877fc1a32"
}