Webitel API
1. Dialers
1.1 Loading Members into a dialer.
Examples of POST requests:
Add only one participant: https://swagger.webitel.com/#/MemberService/CreateMember
Add an array of Members: https://swagger.webitel.com/#/MemberService/CreateMemberBulk
CRM should save the ID of the loaded Member for further use, for example, when canceling a call.
To display the Bucket's name to the Agent during an inbound call, the Bucket's name (
bucket_name
) must be passed in the variables array.To open a client's card in CRM using a link in the variables array, it is necessary to pass a full link to the card of this client. The name of the variable -
{link}.
{
"items": [ // an array of Members. Each object is an individual Member.
{
"agent": { // determines the binding of the Member to a specific Agent, optional.
"id": "${id}" // Agent identifier.
},
"bucket": {
"id": "${id}" // Bucket identifier. Used for Agent and client binding. Provides for the use of Buckets for products within a Queue for one country.
},
"communications": [ // in this array, the number/s of clients are passed in. {
"description": "${description}", // a description of the method of communication.
"destination": "${destination}", // Member number. Required.
"display": "${display}", // The number will be displayed to the Member during the call. Optional.
"priority": 0, // priority destination within a subscriber. When there are multiple numbers in the communications array, the priority will determine the order in which they are called. The larger the number, the higher the priority. Required.
"resource": { // defines a binding of the Member to a specific Resource from which the call will be made. Optional.
"id": "${id}" // Resource identifier. For details, see the Get a list of resources section.
},
"type": {
"id": "${id}" // Communication Type identifier from the Webitel directory. Required. For details, see the Get a list of Communication Types section.
}
}
],
"expire_at": "${expire_at}", // specifies the time when to remove the Member from the dialer (Unix time)
"min_offering_at": "${min_offering_at}", // specifies the start time of the dialing to the Member. The Timestamp is in the UTC.
"name": "${name}", // Member name. Required.
"priority": 0, // the priority of the Member within the Queue. The higher the number, the higher the priority of dialing the Member.
"timezone": {
"id": "${id}" // time zone ID (on the Webitel page). For details, see the Get a list of time zones section.
},
"variables": { // additional variables on the Member that will be displayed to the Agent when receiving a call.
"additionalProp1": "${additionalProp1}",
"additionalProp2": "${additionalProp2}",
"additionalProp3": "${additionalProp3}"
}
}
],
"queue_id": "${queue_id}" // identifier of the Queue to which Members are loaded.
} |
1.2. Get a list of time zones
https://swagger.webitel.com/#/CalendarService/CalendarService_SearchTimezones
1.3. Get a list of Buckets
https://swagger.webitel.com/#/BucketService/BucketService_SearchBucket
1.4. Get a list of Communication Types
1.5. Cancel caller dialing by the dialer
https://swagger.webitel.com/#/MemberService/PatchMember
Required parameters:
Queue (dialer) identifier;
identifier of the Member in the Queue.
To cancel the caller's dialing, you need to send a request:
"stop_cause": "cancel"
To clear the previous result of a Member in the call list, you need to send a request:
"stop_cause": "null"
(or an empty string)
Other parameters do not need to be filled in.
2. Initiating a manual outbound call from CRM (Click-to-call)
https://swagger.webitel.com/#/CallService/CallService_CreateCall
To make an outbound call from the CRM, the Agent must have a registered SIP phone and token to fulfill requests.
{
"destination": "${agent_id}", // destination number. Required.
"from": {
"extension": "${extension}" // Agent's extension. Required. For details, see the Get the list of Agents section.
},
"params": {
"disable_auto_answer": true, // switches off the automatic answer. If you pass the parameter, the Agent will need to accept from the Workspace.
"variables": { // additional variables by client that can be used for statistics.
"additionalProp1": "${additionalProp1}",
"additionalProp2": "${additionalProp2}",
"additionalProp3": "${additionalProp3}"
}
}
} |
3. Agent Skill management
3.1. Get the list of Agents
https://swagger.webitel.com/#/AgentService/AgentService_SearchAgent
3.2. Get the list of Webitel Skills
https://swagger.webitel.com/#/SkillService/SkillService_SearchSkill
3.3. Get Agent Skills
https://swagger.webitel.com/#/AgentSkillService/AgentSkillService_SearchAgentSkill
Required parameters:
Agent identifier.
3.4. Add a Skill to an Agent
https://swagger.webitel.com/#/AgentSkillService/AgentSkillService_CreateAgentSkill
{
"agent_id": "${agent_id}", // Agent identifier. For details, see the Get the list of Agents section.
"capacity": 0, // potential - level of mastery of the Skill. Possible values: 0-100
"enabled": true, // Skill state. It can be enabled/disabled.
"skill": {
"id": "${id}" // Skill identifier from the Webitel directory. For details, see the Get the list of Webitel Skills section.
}
} |
3.5. Delete an Agent Skill
https://swagger.webitel.com/#/AgentSkillService/AgentSkillService_DeleteAgentSkill
Required parameters:
Agent identifier;
Agent's Skill identifier. For details, see the Get Agent Skills section.
3.6. Edit an Agent Skill
https://swagger.webitel.com/#/AgentSkillService/AgentSkillService_PatchAgentSkill
Required parameters:
Agent identifier;
Agent's Skill identifier. For details, see the Get Agent Skills section.
4. Post-processing
4.1 Post-processing management.
https://swagger.webitel.com/#/MemberService/AttemptCallback
After the call is completed, the Agent should send the status of the call processing (post-processing) from CRM to Webitel.
Possible values of the status parameter:
success — successful call. The call will not be retried.
cancel — cancelled. The call will not be retried.
any other transmitted value (if it is necessary for statistics) will be considered by the system as
abandoned
status. There will be another attempt to dial according to the dialer settings.
5. Call history
5.1 Connection to Webitel database
In the case of Webitel On-Site deployment, obtaining data on calls and operators is possible through connection to Webitel database (PostgreSQL 14).
5.2 Get the call history
https://swagger.webitel.com/#/CallService/CallService_SearchHistoryCall
In the database, a reference to the conversation record is stored in the storage.files table.
|
The uuid field contains the unique identifier of the call.
Using HTTP REST API it is possible to get a list of all related files (not only call records (files array)) by call UUID.
Then you can get a specific file by the file identifier.
5.3 Get records by file ID
GET https://:WEBITEL_SERVER/api/storage/recordings/:FileID/stream?access_token=:TOKEN
:WEBITEL_SERVER — Webitel server.
Required parameters:
:FileID — file identifier obtained from CallService_SearchHistoryCall;
:TOKEN — token.
5.4 Search for calls by variable value
GET https://:WEBITEL_SERVER/api/calls/history?page=1&size=10&number=110&variables[Company]=eb0b368c39305630464fa34c2af0e45f
:WEBITEL_SERVER — Webitel server.
Required parameters:
number — phone number. Search is performed by from_number, to_number, destination;
Company — variable name (metadata);
page — page, if there are many records;
size — maximum number of records.
6. Other
6.1 Get the list of Queues
https://swagger.webitel.com/#/QueueService/QueueService_SearchQueue