Getting started
Getting StartedAPI BasicsAPIs
AuthenticationBlocklistsCall ChannelsCall CenterCall RecordingsDevicesPivotQuickcallWebhooksBusiness SMS
VirtualTextAutomation
ZapierUse cases
Create Trello Card for Voicemails Received Send Call Data to Google SheetsSlack Notifications from Call EventsSMS Airtable TemplateTrigger SMS Messages from Your CRMZapier Webinar RecordingAbout Call Center
Qubicle is an application for providing call queues using VirtualPBX. The Qubicle application allows you to configure VirtualPBX users as recipients for inbound calls distributed amongst one or many queues. Queues are independently configured and will distribute calls according to one of several different routing methods to recipients that have been assigned to that queue that are currently available.
Concepts
Queues
A Queue is the primary entity in Qubicle, it represents a queue of sessions that will be distributed according to some routing method to a list of member recipients. The queue process is persistent, and will be running regardless of if there are sessions that are in queue, or if there are recipients logged in.
Recipients
Recipients are the entity responsible for handling sessions in Qubicle. These can be though of as 'agents' in the logical sense. They encapsulate all data and state needed to determine the current availability for a recipient, the information needed to route a session to the recipient (where to send the call) as well as data that is useful for performance metrics about the recipient. The recipient process's lifetime is tied to a given recipients login state. Offline recipients are not represented in the Qubicle system. The recipient process also handles all external API interaction that allows changing of state and handling of sessions.
Sessions
Sessions are the entity in Qubicle that represent something that a recipient handles. In the primary case this is an inbound caller. A session is created when you send a call to the Callflows Qubicle endpoint. Once the session is created it is joined into the configured queue for that endpoint and ownership is passed on to Qubicle. The session manages all data related to the entities time is the Qubicle application, such as which queues it has been a part of and for how long, which recipient handled the call, and other data that may be related to the delivery of the entity.
Events
All entities in Qubicle emit events as they perform the actions needed to route a session to its ultimate destination. Using these events you can obtain real-time information about the state of the system, and the state of these entities.
Session Events
A session will emit events that are relevant from the perspective of an inbound call.
Session Events
Queue Events
A queue will emit events for all actions it takes, such as when a session joins and leaves, as well as when it is delivered to a recipient.
Queue Events
Recipient Events
A recipient will emit events for all sessions that it is handling via a queue, as well as events about the state and availability of the recipient.
Recipient Events
Integration
The Qubicle application integrates with VirtualPBX to provide call routing and delivery. This integration is achieved by using Callflows to route calls into Qubicle and Blackhole to emit events in real time via Websockets from Qubicle.
Callflows Integration
There are two callflow modules for Qubicle that allow VirtualPBX to interact with it. The first and primary module is 'cf_qubicle' which will allow calls to be routed to Qubicle queues. The second is 'cf_qubicle_recipient' which will allow calls to control recipient state. This can be used to route a feature code or extension to a callflow that will allow recipients to log in and out from a device.
Callflows
Qubicle Callflow
The Qubicle callflow module is used to route calls to a queue in Qubicle.
Configuration
Plain Text
"flow": {
"data": {
"queue_id" | "id": {QUEUE_ID},
},
"module": "qubicle",
"children": {
}
},
Queue
The queue parameter is the ID of a qubicle Queue that the call is to be routed to, it can be named either 'queue_id', or just 'id'
Qubicle Recipient Callflow
The Qubicle recipient callflow module is used to trigger recipient actions from Callflows.
Configuration
Plain Text
"flow": {
"data": {
"link_method": {LINK_METHOD},
"action": {ACTION},
"target_queue": {TARGET_QUEUE},
"pin_prompt_media": {PIN_PROMPT_MEDIA},
"success_media": {SUCCESS_MEDIA_ID},
"failure_media": {FAILURE_MEDIA_ID},
},
"module": "qubicle_recipient",
"children": {
}
},
Link Method
The link method parameter will determine how the inbound caller is linked to a Qubicle user in order to determine what user to send the action as. It can be one of the following values:
- "device": The Authorizing-ID of the call will be matched against the owner for the device. If the owner is found and Qubicle enabled, the action is emitted for that owner.
- "pin": The caller is prompted for a pin code that is checked against the "qubicle.pin" configuration key on the users document, if there is a successful match the action is emitted for that user.
- "both" (default): The device is checked first, failing a match the caller is then prompted for a pin.
Action
This will determine the action that is emitted after the call has been linked to a user, the following values are allowed:
- "login"
- "logout"
- "ready"
- "away"
- "login_ready" - This will perform BOTH the login and ready actions in one step.
- "state_toggle" - This action will log the recipient in and go ready if they are logged out, or log them out if they are logged in.
The "ready" and "away" actions MAY be targeted at a specific queue if the "target_queue" value is configured to the ID of the Qubicle queue.
Target Queue
This will ONLY be used when sending a "ready" or "away" action, and will target the per-queue availability setting for the user.
Pin Prompt Media
This is the ID of a media file that will be played to prompt the caller to enter their pin for linking to a Qubicle recipient enabled user with a configured 'pincode'.
Success Media
This is the ID of a media file that will be played when the action is successfully emitted.
Failure Media
This is the ID of a media file that will be played when the action fails (due to the lack of ability to associated a user with the caller).
APIs
Qubicle Queue API
Introduction
This API is used for configuring queues in Qubicle, as well as altering the membership of recipients in queues.
Schema
Plain Text
{
"$schema": "http://json-schema.org/draft-04/schema#",
"_id": "qubicle_queue",
"description": "Defines a queue in Qubicle",
"name": "Qubicle Call Queue",
"properties": {
"agent_wrapup_time": {
"default": 0,
"description": "Pre-defined wait period applied after an agent handles a customer call (in seconds)",
"minimum": 0,
"name": "Agent Wrapup Time",
"type": "integer"
},
"force_away_on_reject": {
"default": false,
"description": "If set to true and a recipient rejects a call, they will be forced to away state",
"type": "boolean"
},
"hold_treatment": {
"description": "Media ID (or appropriate media URI) of media to play while caller is on hold.",
"name": "Hold Treatment",
"type": "string"
},
"name": {
"description": "A friendly name for the queue",
"maxLength": 128,
"minLength": 1,
"name": "Name",
"type": "string"
},
"queue_router": {
"default": "route_round_robin",
"description": "The queue router used for routing and delivering calls to recipients",
"name": "Router",
"type": "string"
},
"queue_type": {
"default": "queue_basic",
"description": "The type of queue",
"enum": [
"queue_basic"
],
"name": "Type",
"type": "string"
},
"ring_timeout": {
"default": 20,
"description": "Amount of time in seconds that qubicle will wait while ringing for the agent to successfully answer a call.",
"minimum": 1,
"name": "Agent Connect Timeout",
"type": "integer"
},
"tick_time": {
"default": 1000,
"description": "The time between delivery ticks in milliseconds",
"minimum": 250,
"name": "Tick Time",
"type": "integer"
},
"timeout": {
"default": 3600,
"description": "The maximum amount of time in seconds that a call will wait in queue.",
"minimum": 10,
"name": "Queue Timeout",
"type": "integer"
},
"timeout_if_size_exceeds": {
"default": 0,
"description": "If set to a non-zero value the queue will immediately time out any call entering the queue over the size",
"type": "integer"
},
"timeout_immediately_if_empty": {
"default": false,
"description": "If set to true and a call enters the queue while it has no logged in agents, the call will time out",
"type": "boolean"
},
"timeout_redirect": {
"description": "The ID of a queue that the call will be sent to in the event of a timeout",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
List Queues
This action will list all queues that are configured for the specified account.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues
Plain Text
{
"page_size":{RESULT_COUNT},
"data":[
{
"id": "{QUEUE_ID}",
"name": "{QUEUE_NAME}"
}
],
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
Queue Status
This action will return the status of the queue.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status
{ "data": { "active_recipient_count": {ACTIVE_RECIPIENT_COUNT}, "available_recipient_count": {AVAILABLE_RECIPIENT_COUNT}, "stats": { "estimated_wait": {EST_WAIT_TIME}, "average_wait": {AVG_WAIT_TIME}, "recipient_count": {RECIPIENT_COUNT}, "active_session_count": {ACTIVE_SESSION_COUNT}, "total_sessions": {TOTAL_SESSION_COUNT}, "missed_sessions": {MISSED_COUNT}, "abandoned_sessions": {ABANDONED_COUNT} }, "node": {RUNNING_ON_NODE} }, "revision":"{REVISION}", "request_id":"{REQUEST_ID}", "status":"success", "auth_token":"{AUTH_TOKEN}" }
- Active-Session-Count: Count of currently active sessions in the queue
- Recipient-Count: Count of total configured recipients for the queue
- Active-Recipient-Count: Count of currently active recipients (logged in)
- Available-Recipient-Count: Count of currently available recipients (ready to take a call)
- Estimated-Wait: The currently estimated wait time for a session in queue
- Average-Wait: The DAILY average wait time for all sessions
- Total-Sessions: The DAILY total session count for the queue
- Missed-Sessions: The DAILY total count of missed sessions (sessions that timed out without being handled)
- Abandoned-Sessions: The DAILY total count of abandoned sessions (session left queue prior to being handled)
- Node: The node that the queue process is running on
Queue List Status
This action will return the status for the listed queues
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/status
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/status -d '{"data":{"queue_ids":[{QUEUE_ID_1},{QUEUE_ID_2}]}}'
Plain Text
{
"data":{
{QUEUE_ID_1}: {
"active_recipient_count": {ACTIVE_RECIPIENT_COUNT},
"available_recipient_count": {AVAILABLE_RECIPIENT_COUNT},
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
},
"node": {RUNNING_ON_NODE}
},
{QUEUE_ID_2}: {
"active_recipient_count": {ACTIVE_RECIPIENT_COUNT},
"available_recipient_count": {AVAILABLE_RECIPIENT_COUNT},
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
},
"node": {RUNNING_ON_NODE}
}
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
Queue Information
This action will return all configuration data for a specific queue.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}
Plain Text
{
"data":{
"name":"{QUEUE_NAME}",
"queue_type":"queue_basic",
"queue_router":"{ROUTER_TYPE}",
"timeout":{TIMEOUT},
"hold_treatment":"{MEDIA_ID_FOR_HOLD_TREATMENT}",
"agent_wrapup_time":{AGENT_WRAPUP},
"tick_time":1000,
"members":{
{MEMBERS_LIST}
},
"id":"{QUEUE_ID}",
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
The {MEMBERS_LIST} for a queue will consist of a list of key -> value mappings where the key is the id of a Qubicle enabled user (recipient) and the value is an empty string.
Plain Text
"members":{
"{USER_ID}":"",
"{USER2_ID}":""
}
Create a queue
This action will allow configuration of a new queue.
PUT /v2/accounts/{ACCOUNT_ID}/qubicle_queues/
Plain Text
curl -v -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues -d '{"data":{"name":"{QUEUE_NAME}"}}'
Plain Text
{
"data":{
"name":"{QUEUE_NAME}",
"agent_connect_timeout":15,
"agent_wrapup_time":2,
"queue_router":"route_round_robin",
"queue_timeout":3600,
"queue_type":"queue_basic",
"tick_time":1000,
"id":"{QUEUE_ID}"
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
Modify a queue
The queue configuration can be modified with a PATCH request as follows
PATCH /v2/accounts/{ACCOUNT_ID}/qubicle/queues/{QUEUE_ID}
Plain Text
curl -v -X PATCH -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID} -d '{"data":{"queue_timeout":"2000"}}'
Plain Text
{
"data":{
"name":"{QUEUE_NAME}",
"agent_connect_timeout":{AGENT_CONNECT_TIMEOUT},
"agent_wrapup_time":{AGENT_WRAPUP_TIME},
"queue_router":{QUEUE_ROUTER},
"queue_timeout":2000,
"queue_type":{QUEUE_TYPE},
"tick_time":1000,
"id":"{QUEUE_ID}"
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
List queue sessions
This action lists all sessions that are in the queue currently.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/sessions
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/sessions Return Value:
{ "data": [ { "queue_id":"{QUEUE_ID}", "session_list": [{SESSION1}, {SESSION2}] } ], "revision":"{REVISION}", "request_id":"{REQUEST_ID}", "status":"success", "auth_token":"{AUTH_TOKEN}" }
List queue recipients
This action lists all recipients that are in the queue currently, as well as their permissions.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients
Return Value:
Plain Text
{
"data": [
{
"id":{RECIP_1_ID},
"permission_roles": {RECIP_1_ROLES},
"permissions": [{RECIP_1_PERMISSIONS}]
}
],
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
Set the queue membership
This action modifies the membership of a queue.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients -d '{"data": {"action": {ACTION}, "members":["{USER_ID_1}", "{USER_ID_2}"]}}'
Plain Text
{
"data":{
"name":"{QUEUE_NAME}",
"queue_type":"queue_basic",
"queue_router":"route_round_robin",
"timeout":{TIMEOUT},
"agent_connect_timeout":15,
"hold_treatment":"{MEDIA_ID}",
"agent_wrapup_time":2,
"tick_time":1000,
"members":{
{USER_ID_1}:"",
{USER_ID_2}:""
},
"id":"{QUEUE_ID}"
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
NOTE: Members is a list of user id's
Action is one of the following:
- add: adds the list of id's to queue membership
- remove: removes the list of id's from queue membership
- set: sets the membership to exactly the list of id's provided
Clear a queue's membership
DELETE /v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients
Plain Text
curl -v -X DELETE -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_queues/{QUEUE_ID}/recipients
Plain Text
{
"data":{
"name":"{QUEUE_NAME}",
"queue_type":"queue_basic",
"queue_router":"route_round_robin",
"timeout":{TIMEOUT},
"agent_connect_timeout":15,
"hold_treatment":"{MEDIA_ID}",
"agent_wrapup_time":2,
"tick_time":1000,
"members":{
},
"id":"{QUEUE_ID}"
},
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"status":"success",
"auth_token":"{AUTH_TOKEN}"
}
Qubicle Recipient API
Introduction
This API allows a user to control recipient state as well as get information about recipient state.
List recipients
This action will return a list of all configured recipients for an account.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients
Plain Text
{
"page_size":2,
"data":[
{"id":"{RECIPIENT_ID1}","name":"{RECIPIENT_NAME1}"},
{"id":"{RECIPIENT_ID2}","name":"{RECIPIENT_NAME2}"}
],
"status":"success",
"revision":"{REVISION}",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Get recipient configuration
This action will return the recipient configuration of the specified recipient. NOTE this is actually a users document.
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}
The returned document is a VirtualPBX users document
Get recipient status
Returns the current status of the recipient.
GET /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}/status
Plain Text
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}/status
Plain Text
{
"data":{
"available": {AVAILABLE},
"availability_state": {AVAIL_STATE},
"queue_availability": {QUEUE_AVAILABILITY},
"offered_call": {OFFERED_CALL_INFO},
"handling_call": {HANDLING_CALL_INFO},
"wiretapping_recipient": {WIRETAPPING_RECIPIENT_ID},
"wiretap_mode": {WIRETAP_MODE},
"wrapup_time_seconds": {WRAPUP_TIME_SECONDS},
"stats": {
"total_calls": {TOTAL_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
},
"node": {RUNNING_ON_NODE}
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
- Available: true or false depending on recipient availability
- Avg-Call-Time: the average amount of time the recipient has spent on a call (in seconds)
- Login-Time: the unix timestamp of when the recipient logged in
- Total-Calls: the total number of calls that the recipient has handled
- Missed-Calls: the total number of calls that the recipient failed to handle for any reason
- Availability-State: The state of the recipient ( "Ready" | "Away" | "Wrapup-Time" | "Call-Offer" | "On-A-Call" | "Not-Logged-In" )
- Queue-Availability: IF a per-queue availability flag(s) have been set, they will be reported here as a list of queue-id -> boolean values
- Last-Action-Time: The timestamp of the last time the recipient changed state
- Last-Handled-Time: The timestamp of the last time the recipient was delivered a call
- Offered-Call: IF there is a call currently being offered, this will contain the Queue-ID, Session-ID, Caller-ID-Name, Caller-ID-Number, Queue-Enter-Time of the * call
- Handling-Call: IF there is a call currently being handled, this will contain the Queue-ID, Session-ID, Caller-ID-Name, Caller-ID-Number, Queue-Enter-Time of the * call
- Wrapup-Time-Seconds: The time left, in seconds, until the recipient is out of wrapup (0 if they are not on wrap up)
- Node: The node that the process for this recipient is running on
- Wiretapping-Recipient: IF the recipient is wiretapping another recipient, this will be the id of the target recipient
- Wiretap-Mode: IF the recipient is wiretapping another recipient, this will be the mode (whisper, eavesdrop, barge)
Get recipient list status
Returns the current status of a list of recipients.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/status
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/status -d '{"data":{"recipient_ids":[{RECIP_ID_1},{RECIP_ID_2},{RECIP_ID_3}]}}'
Plain Text
{
"data":{
{RECIP_ID_1}: {
"available": {AVAILABLE},
"availability_state": {AVAIL_STATE},
"offered_call": {OFFERED_CALL_INFO},
"handling_call": {HANDLING_CALL_INFO},
"wrapup_time_seconds": {WRAPUP_TIME_SECONDS},
"stats": {
"total_calls": {TOTAL_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
},
"node": {RUNNING_ON_NODE}
},
{RECIP_ID_2}: {
"available": {AVAILABLE},
"availability_state": {AVAIL_STATE},
"offered_call": {OFFERED_CALL_INFO},
"handling_call": {HANDLING_CALL_INFO},
"wrapup_time_seconds": {WRAPUP_TIME_SECONDS},
"stats": (
"total_calls": {TOTAL_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
},
"node": {RUNNING_ON_NODE}
},
{RECIP_ID_3}: "not_logged_in"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
NOTE This will either return the same object as the /status API for a single recipient, or the value "not_logged_in"
Login recipient
The login action will log a recipient in and start the recipient process.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID} -d '{"data":{"action":"login"}}'
Plain Text
{
"data":{
"action":"login"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Logout recipient
The logout action will terminate the recipient process, and log the recipient out of Qubicle.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID} -d '{"data":{"action":"logout"}}':
Plain Text
{
"data":{
"action":"logout"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Set recipient status
Sets the recipient's status. The possible status values are login / logout / ready / away. The recipient must be logged in (status set to login) prior to being able to set a ready / away status. The "queue_id" argument is OPTIONAL and if present will set the availability for that queue only.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/status
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}/status -d '{"data":{"status":"{STATUS}"}}'
Plain Text
{
"data":{
"status":"{STATUS}",
"queue_id":{QUEUE_ID <OPTIONAL>}
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Extend Wrap-Up Time
The wrapup_extend action will reset the recipient's wrap up time to the full amount. The amount varies based on the configuration of the queue the previous call was handled from.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID} -d '{"data":{"action":"wrapup_extend"}}'
Plain Text
{
"data":{
"action":"wrapup_extend"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Cancel Wrap-Up Time
The wrapup_cancel action will end the recipients current wrapup time.
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID} -d '{"data":{"action":"wrapup_cancel"}}'
Plain Text
{
"data":{
"action":"wrapup_cancel"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Monitor Recipient
Pro only feature The monitor action will eavesdrop another recipient (if the current recipient has the permission enabled, and you are using Callcenter Pro)
The possible mode values are:
- "eavesdrop": the monitoring recipient can hear both the caller and agent (this is the default mode)
- "whisper": the monitoring recipient can talk to the agent only, but hear both parties
- "barge": the monitoring recipient is in a 3 way call with the agent and caller
POST /v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID}/
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{RECIPIENT_ID} -d '{"data":{"action":"monitor", "target": {TARGET_RECIPIENT_ID}, "mode": {MODE}}'
Plain Text
{
"data":{
"action":"monitor"
},
"status":"success",
"request_id":"{REQUEST_ID}",
"auth_token":"{AUTH_TOKEN}"
}
Router Types
The following is a description of the types of routers that are available to be used for Qubicle queues, and the method that they use to distribute sessions. These routing methods (with the exception of round robin) are all simple hard routing metrics. This means that based on the type they will all have potential caveats that would allow a recipient or recipients to get into a state where the routing metrics are skewed and could cause delivery issues (or the appearance of issues). This must be taken into account when choosing a routing method.
Round Robin
Configuration
Plain Text
"queue_router": "route_round_robin"
Description
Round robin will evenly distribute calls amongst the membership of a queue. The routing algorithm will start a "round" that contains all members of the queue, and then for each session will offer a member an available session. When a member receives an offer, they are removed from the current "round" and will not be considered for delivery of an additional offer until everyone in the round has been offered a call. Note that the outcome of the offer to a member does not factor into their removal from the current round.
Caveats none
Least Calls
Configuration
Plain Text
"queue_router": "route_least_calls"
Description
Least calls will take all members of a queue and sort the list by the number of calls that they have handled. Sessions will then be distributed in order starting with the member that has the least calls.
Caveats You must take into account that this routes according to HANDLED calls. Therefore if a recipient has the least number of handled calls and is offered a session but continues to reject that session they will still be offered the session until they either handle it, or it times out.
Least Offers
Configuration
Plain Text
"queue_router": "route_least_offers"
Description
Least offers will take all members of a queue and sort the list by the number of sessions that they have been offered. Sessions will then be distributed in order starting with the member that has the least offers.
Caveats
You must take into account that this routes according to OFFERS of sessions. If you have a recipient that is continually rejecting offers, or has stepped away and not correctly set their state to 'away' (therefore they are being offered sessions that will be rejected ultimately) then the routing metrics for that recipient will be skewed. They may then spend a long amount of time without being offered a session since their offered count will be much higher than recipients that are not repeatedly rejecting offers.
Most Idle
Configuration
Plain Text
"queue_router": "route_most_idle"
Description
Most idle routing will sort the recipients by the time that they last handled a call, and route sessions to those with the longest time elapsed since they have handled a call.
Caveats
As with other hard metric routing methods, there is the potential for undesirable behavior if a recipient skews the metrics and incorrectly sets their state. This must be taken into account when choosing a routing algorithm.
BLF Status Indication Guide
This guide will provide an overview of setting up BLF to report the status of a Qubicle recipient.
Prerequisites
A valid user that has a device configured, and is enabled as a Qubicle recipient
Configuration
In order to enable BLF indications for a recipient, we must first configure the 'presence_id' that we wish to use on the recipient. This can be achieved with the following Crossbar request:
NOTE this is using the users API.
Plain Text
curl -X PATCH -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v1/accounts/{ACCOUNT_ID}/users/{RECIPIENT_ID}/ -d '{"data":{"qubicle":{"presence_id":"{PRESENCE_ID}"}}}'
Phone Configuration
Phone configuration will vary by the model of phone / sip device you are using. However you can now configure your device to subscribe to {PRESENCE_ID}@{REALM} and you will be provided with BLF updates when the state of the recipient changes.
States
The BLF states correspond to the following recipient states:
- IDLE: logged out
- RINGING: logged in, but away
- ON-A-CALL: logged in, ready
Using Qubicle as a Recipient via Callflows
This guide will provide an overview of interaction with Qubicle as a recipient, using Callflows.
This will mean that you are going to be set up as an agent that will receive calls from a queue, and you will login and logout of that queue via feature codes from your phone.
Prerequisites
A valid user that has a device configured, and is enabled as a Qubicle recipient
References
In this guide we will be using the following schemas and APIs:
cf_quibcle_recipient
Setup
In this example we will assume that our agents are using their own desk phones, thus we can enable device linking when using the recipient callflow so that they do not need to remember a pin code. The first step in this process is to decide which feature codes we would like to correspond to the various actions, and then configure the callflows for them.
Let us assume that for the purposes of this example we will use the following feature codes:
- 20 to login
- 21 to set ready state
- 22 to set away state
- 23 to logout
Now that we have decided the method for linking the calls to recipients and the feature codes we wish to use, we can proceed with the configuration via Crossbar APIs.
Configure login callflow
Plain Text
curl -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v1/accounts/{ACCOUNT_ID}/callflows -d '{"data":{"flow":{"module":"qubicle_recipient","data":{"link_method":"device","action":"login"}},"featurecode":{"name":"qubicle login","number":"20"},"numbers":["*20"]}}'
Configure set ready callflow
Plain Text
curl -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v1/accounts/{ACCOUNT_ID}/callflows -d '{"data":{"flow":{"module":"qubicle_recipient","data":{"link_method":"device","action":"ready"}},"featurecode":{"name":"qubicle set ready","number":"21"},"numbers":["*21"]}}'
Configure set away callflow
Plain Text
curl -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v1/accounts/{ACCOUNT_ID}/callflows -d '{"data":{"flow":{"module":"qubicle_recipient","data":{"link_method":"device","action":"away"}},"featurecode":{"name":"qubicle set away","number":"22"},"numbers":["*22"]}}'
Configure logout callflow
Plain Text
curl -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" http://{SERVER}:8000/v1/accounts/{ACCOUNT_ID}/callflows -d '{"data":{"flow":{"module":"qubicle_recipient","data":{"link_method":"device","action":"logout"}},"featurecode":{"name":"qubicle logout","number":"23"},"numbers":["*23"]}}'
Typical Use
Now let's walk through the typical usage from the viewpoint of a call center agent. First the agent will arrive at their desk and log into the queue, to indicate that they are now on shift and working.
- * Agent dials 20 on their desk phone *
Perhaps the agent then gets some coffee, reads some emails, and is now ready to take calls. The agent then goes into the 'ready' state, so that they are marked as available to take calls.
- * Agent dials 21 on their desk phone *
After a few hours it is time to go on break, the agent will now mark themselves as 'away' so that they are no longer considered available for call delivery.
- * Agent dials 22 on their desk phone *
The agent will then enjoy lunch and upon returning, set themselves as ready again to finish out their shift.
- * Agent dials 21 on their desk phone *
After a long days work, the agent is ready to go home. They will log out of Qubicle signifying the end of their shift.
- * Agent dials 23 on their desk phone *
Qubicle User Guide
This guide will provide an overview of interaction with the Qubicle system from the viewpoint of a recipient (agent).
Prerequisites
A valid user that has a device configured, and is enabled as a Qubicle recipient
Recipient States
A recipient can be in one of three states at any given time. Not logged in, Logged in but 'away', and Logged in and 'ready'. In order for a recipient to be considered for routing a call they must be both logged in, and in the ready state.
Managing state
Login state is managed for a recipient by using the Recipient Crossbar API. More specifically the "Set recipient status" method. Setting the recipients status value to 'login' will initiate the login process for that recipient, setting it to 'logout' will log out and terminate the process for the recipient.
Ready and away state are also managed using the same API call, with either the status being 'ready' or 'away'.
A quick example
So in order for you as a recipient to log in and take a call, you would need to perform the following two API calls to set yourself as logged in and ready:
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}/status -d '{"data":{"status":"login"}}'
Plain Text
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_recipients/{USER_ID}/status -d '{"data":{"status":"ready"}}'
Qubicle Websockets Setup
Introduction
This document will get a basic Websockets connection set up to the Qubicle event feed.
Prerequisites
In order for the Websocket connections to work correctly, the Blackhole application must be started and the bh_qubicle module must be present and loaded.
Initiate Websocket connection
Set up the Websocket connection to Blackhole
Plain Text
var ws = new WebSocket("ws://{SERVER}:5555");
// Connection Open Callback
ws.onopen = function() {
console.log("Websocket connection is open.");
}
Subscribe to Qubicle events via Websocket
Once the connection is successfully opened you must use a valid auth token to subscribe to Qubicle events. In this example a convenience function is created to help with the JSON formatting.
Plain Text
// Log Websocket data to console
ws.onmessage = function(ws_data) {
var msg = JSON.parse(ws_data.data);
console.log(ws_data.data);
}
function send(json) {
ws.send(JSON.stringify(json));
}
// Subscribe for session events
send({"action":"subscribe", "auth_token": "{AUTH_TOKEN}", "data":{"account_id": "{ACCOUNT_ID}", "binding": "qubicle.session"}});
// Subscribe for recipient events
send({"action":"subscribe", "auth_token": "{AUTH_TOKEN}", "data":{"account_id": "{ACCOUNT_ID}", "binding": "qubicle.recipient"}});
// Subscribe for queue events
send({"action":"subscribe", "auth_token": "{AUTH_TOKEN}", "data":{"account_id": "{ACCOUNT_ID}", "binding": "qubicle.queue"}});
Queue Events
Create
The create event indicates that a queue has started running.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"create",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "create",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"pid": "{PROCESS_PID}",
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Delete
The delete event indicates that a queue is no longer running.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"delete",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "delete",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"reason": "{REASON}",
"queue_id": "{QUEUE_ID}",
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Sync
The sync event periodically updates clients to ensure that they have the correct and latest queue information.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"sync",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "sync",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Join
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"join",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "join",
"event_timestamp": {SERVER_TIMESTAMP},
"join_time": {JOIN_TIME},
"join_position": {JOIN_POSITION},
"est_wait_time": {ESTIMATED_WAIT_TIME},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"session_id": "{SESSION_ID}",
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Leave
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"leave",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "leave",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"reason": "{REASON}",
"session_id": "{SESSION_ID}",
"total_wait_time": {TOTAL_WAIT_TIME},
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Delivered
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.queue",
"subscription_key":"qubicle.queue.{ACCOUNT_ID}.*",
"name":"delivered",
"routing_key":"qubicle.queue.{ACCOUNT_ID}.{QUEUE_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-queue",
"event_name": "delivered",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"recipient_id": "{USER_ID}",
"session_id": "{SESSION_ID}",
"total_wait_time": {TOTAL_WAIT_TIME},
"stats": {
"estimated_wait": {EST_WAIT_TIME},
"average_wait": {AVG_WAIT_TIME},
"recipient_count": {RECIPIENT_COUNT},
"active_session_count": {ACTIVE_SESSION_COUNT},
"total_sessions": {TOTAL_SESSION_COUNT},
"missed_sessions": {MISSED_COUNT},
"abandoned_sessions": {ABANDONED_COUNT}
}
}
}
Recipient Events
Recipient events can be used to track the state and actions that affect a recipient in Qubicle. The following are the currently emitted events.
Login
The login event is emitted when a recipient logs into Qubicle via any means.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"create",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "create",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"pid": "{PROCESS_PID}",
"recipient_id": "{USER_ID}",
"state": "away",
"username": "{USERNAME}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Logout
The logout event is emitted when a recipient logs out of Qubicle via any means.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"delete",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "delete",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"reason": "{REASON}",
"recipient_id": "{USER_ID}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Ready
The ready event indicates that a recipient is now is the 'ready' state, and thus can receive sessions from a queue.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"ready",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"away_time": {TIME_RECIPIENT_WAS_AWAY_IN_SECONDS}
"event_category": "qubicle-recipient",
"event_name": "ready",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"recipient_id": "{USER_ID}",
"state": "ready",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Away
The away event indicates that a recipient is in the 'away' state and thus will not be considered for session delivery from a queue.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"away",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "away",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"state": "away",
"recipient_id": "{USER_ID}",
"reason": "{REASON}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Pause
The pause event indicates that a recipient has paused call delivery from a given queue.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"pause",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "pause",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"recipient_id": "{USER_ID}",
"queue_id": "{QUEUE_ID}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Resume
The resume event indicates that a recipient has resumed call delivery from a given queue.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"resume",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "resume",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"recipient_id": "{USER_ID}",
"queue_id": "{QUEUE_ID}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Wrapup Start
The wrapup start event indicates the start of wrap-up time. Which is a configurable (per-queue) amount of time after handling a session that the recipient will not be offered additional sessions.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"wrapup_start",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "wrapup-start",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"state": {STATE},
"recipient_id": "{USER_ID}",
"queue_id": "{QUEUE_ID}",
"wrapup_time_seconds": {TIME_IN_SECONDS_OF_WRAPUP},
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Wrapup Complete
The wrapup complete event indicates the end of wrap-up time.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"wrapup_complete",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"available": {BOOLEAN IF AVAILABLE},
"availability_state": "{STRING_AVAIL_STATE}",
"event_category": "qubicle-recipient",
"event_name": "wrapup-complete",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"state": {STATE},
"recipient_id": "{USER_ID}",
"queue_id": "{QUEUE_ID}",
"total_time": {TOTAL_WRAPUP_TIME},
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Offer
The offer event indicates that a session is being offered to the recipient from a queue.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"offer",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"caller_id_name": "{CALLER_ID_NAME}",
"caller_id_num": "{CALLER_ID_NUM}",
"enter_pos": {QUEUE_ENTER_POSITION},
"queue_enter_time": {QUEUE_ENTER_TIME},
"est_wait": {QUEUE_ESTIMATED_WAIT},
"force_away_on_reject": {FORCE_AWAY_FLAG},
"event_category": "qubicle-recipient",
"event_name": "offer",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"queue_id": "{QUEUE_ID}",
"queue_wrapup": {QUEUE_WRAPUP_TIME},
"recipient_id": "{USER_ID}",
"ring_timeout": {RING_TIMEOUT},
"session_id": "{SESSION_ID}",
"session_zone": "{SESSION_ZONE}",
"caller_id_name": {CALLER_ID_NAME},
"caller_id_number": {CALLER_ID_NUMBER},
"queue_enter_time": {QUEUE_ENTER_TIME},
"state": "{STATE}",
"offer_data": {PRIV_OFFER_DATA},
"session": {SESSION_CALL_OBJECT},
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Reject
The reject event indicates that a recipient has rejected a call.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"reject",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"reject",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"app_version": "{VERSION}",
"app_name":"qubicle",
"queue_id": "{QUEUE_ID}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Rescind
The rescind event indicates that an offer has been rescinded from the recipient. This could happen for example if a session hung-up while it was being offered.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"rescind",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"state":"{STATE}",
"session_id":"{SESSION_ID}",
"recipient_id":"{RECIPIENT_ID}",
"queue_id": "{QUEUE_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"rescind",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"app_version":"{VERSION}",
"app_name":"qubicle",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Delivered
The delivered event indicates that a session was successfully delivered to a recipient and is now being handled.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"delivered",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-recipient",
"event_name": "delivered",
"event_timestamp": {SERVER_TIMESTAMP},
"msg_id": "{MSG_ID}",
"recipient_id": "{RECIPIENT_ID}",
"queue_id": "{QUEUE_ID}",
"queue_name": "{QUEUE_NAME}",
"session_id": "{SESSION_ID}",
"caller_id_name": {CALLER_ID_NAME},
"caller_id_number": {CALLER_ID_NUMBER},
"queue_enter_time": {QUEUE_ENTER_TIME},
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Hangup
The hangup event indicates that a session has been hung-up after being handled by the recipient.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"hangup",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"queue_id":"{QUEUE_ID}",
"session_id":"{SESSION_ID}",
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"hangup",
"event_category":"qubicle-recipient",
"app_version":"{VERSION}",
"app_name":"qubicle",
"talk_time": {TALK_TIME},
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
External Call Start
The external call start message indicates that a recipient has gone on a non-queue call.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"external_call_start",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"external_call_start",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"app_version":"{VERSION}",
"app_name":"qubicle",
"external_call_id": "{CALL_ID}",
"state": "{STATE}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
External Call End
The external call end event indicates that a recipient is no longer on a non-queue call.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"external_call_end",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"external_call_end",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"app_version":"{VERSION}",
"app_name":"qubicle",
"state": "{STATE}",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Sync
The sync event is used to periodically propagate the state of a recipient so that clients can ensure that they have the most up-to-date state information. This event is used for internal purposes, and as such may change at any time.
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"sync",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"sync",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"availability_state": "{AVAILABILITY_STATE}",
"available": {AVAILABLE_FLAG},
"node": "{ORIGINATING_NODE}",
"wrapup_time_seconds": {SECONDS_OF_WRAPUP},
"app_version":"{VERSION}",
"app_name":"qubicle",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Wiretap Start
The wiretap start event indicates that the recipient is wiretapping / monitoring another recipient, or is being monitored
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"wiretap_start",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"monitoring-recipient-id": "{MONITORING_RECIPIENT_ID}",
"target": "{TARGET_RECIPIENT_ID}",
"mode:" "{WIRETAP_MODE}",
"wiretap-call-id": "{WIRETAP_CALL_ID}",
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"wiretap_start",
"event_category":"qubicle-recipient",
"app_version":"{VERSION}",
"app_name":"qubicle",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Wiretap Stop
The wiretap stop event indicates that the recipient is no longer monitoring or being monitored
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"wiretap_stop",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"wiretap-call-id": "{WIRETAP_CALL_ID}",
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"wiretap_stop",
"event_timestamp": {SERVER_TIMESTAMP},
"event_category":"qubicle-recipient",
"app_version":"{VERSION}",
"app_name":"qubicle",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Wiretap Failed
The wiretap failed event indicates that an attempted monitor action has failed for some reason
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.recipient",
"subscription_key":"qubicle.recipient.{ACCOUNT_ID}.*",
"name":"wiretap_failed",
"routing_key":"qubicle.recipient.{ACCOUNT_ID}.{RECIPIENT_ID}",
"data":{
"recipient_id":"{RECIPIENT_ID}",
"account_id":"{ACCOUNT_ID}",
"msg_id":"{MSG_ID}",
"event_name":"wiretap_failed",
"event_category":"qubicle-recipient",
"event_timestamp": {SERVER_TIMESTAMP},
"app_version":"{VERSION}",
"app_name":"qubicle",
"stats": {
"total_calls": {TOTAL_CALLS},
"offered_calls": {OFFERED_CALLS},
"missed_calls": {MISSED_CALLS},
"avg_call_time": {AVG_CALL_TIME},
"login_time": {LOGIN_TIME},
"last_action_time": {LAST_ACTION_TIME},
"last_handled_time": {LAST_HANDLED_TIME}
}
}
}
Session Events
Create
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.session",
"subscription_key":"qubicle.session.{ACCOUNT_ID}.*",
"name":"create",
"routing_key":"qubicle.session.{ACCOUNT_ID}.{SESSION_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-session",
"event_name": "create",
"msg_id": "{MSG_ID}",
"node": "VirtualPBX_apps@{SERVER}",
"session_id": "{SESSION_ID}",
"session_type": "call_session",
"caller_id_name": {CALLER_ID_NAME},
"caller_id_number": {CALLER_ID_NUMBER},
"pid": {SESSION_PROC_PID},
"event_timestamp": {SERVER_TIMESTAMP}
}
}
Delete
Plain Text
{
"action":"event",
"subscribed_key":"qubicle.session",
"subscription_key":"qubicle.session.{ACCOUNT_ID}.*",
"name":"delete",
"routing_key":"qubicle.session.{ACCOUNT_ID}.{SESSION_ID}",
"data":{
"account_id": "{ACCOUNT_ID}",
"app_name": "qubicle",
"app_version": "{VERSION}",
"event_category": "qubicle-session",
"event_name": "delete",
"msg_id": "{MSG_ID}",
"node": "VirtualPBX_apps@{SERVER}",
"reason": "{REASON}",
"session_id": "{SESSION_ID}",
"event_timestamp": {SERVER_TIMESTAMP}
}
}
← Previous
Add link here
Next →
Add link here
On this page
- About Call Center
- Concepts
- Queues
- Recipients
- Sessions
- Events
- Session Events
- Queue Events
- Recipient Events
- Integration
- Callflows Integration
- Callflows
- Qubicle Callflow
- Configuration
- Queue
- Qubicle Recipient Callflow
- Configuration
- Link Method
- Action
- Target Queue
- Pin Prompt Media
- Success Media
- Failure Media
- APIs
- Qubicle Queue API
- Introduction
- Schema
- List Queues
- Queue Status
- Queue List Status
- Queue Information
- Create a queue
- Modify a queue
- List queue sessions
- List queue recipients
- Set the queue membership
- Clear a queue's membership
- Qubicle Recipient API
- List recipients
- Get recipient configuration
- Get recipient status
- Get recipient list status
- Login recipient
- Logout recipient
- Set recipient status
- Extend Wrap-Up Time
- Cancel Wrap-Up Time
- Monitor Recipient
- Router Types
- Round Robin
- Configuration
- Description
- Least Calls
- Configuration
- Description
- Least Offers
- Configuration
- Description
- Caveats
- Most Idle
- Configuration
- Description
- Caveats
- BLF Status Indication Guide
- Prerequisites
- Configuration
- Phone Configuration
- States
- Using Qubicle as a Recipient via Callflows
- Prerequisites
- References
- Setup
- Configure login callflow
- Configure set ready callflow
- Configure set away callflow
- Configure logout callflow
- Typical Use
- Qubicle User Guide
- Prerequisites
- Recipient States
- Managing state
- A quick example
- Qubicle Websockets Setup
- Introduction
- Prerequisites
- Initiate Websocket connection
- Subscribe to Qubicle events via Websocket
- Queue Events
- Create
- Delete
- Sync
- Join
- Leave
- Delivered
- Recipient Events
- Login
- Logout
- Ready
- Away
- Pause
- Resume
- Wrapup Start
- Wrapup Complete
- Offer
- Reject
- Rescind
- Delivered
- Hangup
- External Call Start
- External Call End
- Sync
- Wiretap Start
- Wiretap Stop
- Wiretap Failed
- Session Events
- Delete