Dialer's outbound campaign
To create the new outbound campaign you need to send the POST request to Webitel Engine server address with set request body. See the example of such request below:
POST
/api/v2/dialer
Content-Type: application/json X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
request body
1 |
|
A description of the structure of the request body is given in the table below:
# | Name | Type | Description |
---|
2 | name | string | Campaign's name |
3 | description | string | Custom campaign description |
4 | type | string | Dialer type. It can take one of the values:
|
5 | priority | number | Campaign priority (any integer). Default number is 0. |
6 | calendar | object | Work calendar. You must specify the identifier and name of the previously created calendar. |
10 | parameters | object | Additional campaign parameters: 11 - 25. |
11 | limit | number | The maximum number of simultaneous calls. |
12 | minBillSec | number | The minimum duration of a successful call is "in conversation" if the call result function is not enabled (20). |
13 | originateTimeout | number | The maximum duration of a subscriber call. |
14 | maxTryCount | number | The maximum number of attempts to dial a subscriber. |
15 | intervalTryCount | number | Waiting between dialing attempts in seconds. |
16 | wrapUpTime | number | Duration of waiting for a call result if the call result function is enabled (20). |
17 | predictAdjust | number | The number of completed attempts, after which the Predictive mechanisms for the Predictive Dialer are turned on. |
18 | targetPredictiveSilentCalls | number | Target lost call rate for the Predictive Dialer. |
19 | maxPredictiveSilentCalls | number | The maximum allowable rate of lost calls for the Predictive Dialer. |
20 | waitingForResultStatus | boolean | Call Result - the expected result of dialing a subscriber from an external system through the REST API. |
21 | recordSession | boolean | Enable conversation recording. |
22 | eternalQueue | boolean | "Eternal Campaign" - do not stop after all subscribers have dialed. |
23 | retryAbandoned | boolean | Continue attempts to dial the subscriber after he has been "lost". |
24 | retriesByNumber | boolean | The number of attempts for the type of number to count for each number of this type separately. |
25 | oneDayTask | boolean | One day campaign. Do not transfer subscribers to the next day if all attempts are made to dial within one day (0:00 - 24:00). |
27 | amd | object | Function of answering machine detection: 28 - 38. |
28 | enabled | boolean | Enable autoresponder detection. |
29 | allowNotSure | boolean | Transfer calls to the operator in which unambiguous recognition of the person is not received. |
30 | maximumWordLength | number | Maximum duration of one sentence (ms). |
31 | maximumNumberOfWords | number | The maximum number of words in the greeting. If it is exceeded - an answering machine. |
32 | betweenWordsSilence | number | Duration of silence between words (ms). |
33 | minWordLength | number | The minimum duration of a continuous voice sound to define this sound as a word (ms). |
34 | totalAnalysisTime | number | The maximum time set for the operation of the algorithm for identifying a person or answering machine (ms). |
35 | silenceThreshold | number | The maximum duration of silence between words (ms). |
36 | afterGreetingSilence | number | Silence after greeting (ms). |
37 | greeting | number | Maximum greeting length (ms). |
38 | initialSilence | number | Maximum silence before greeting (ms). |
40 | variables | object | Additional variables that will be assigned to the channel of each dial-up attempt for all campaign subscribers. |
43 | numberStrategy | string | Number selection strategy by type of subscriber communication facility. One of the values is possible:
|
44 | membersStrategy | string | The strategy of passing the list of subscribers. One of the values is possible:
|
45 | autoResetStats | boolean | Automatically clear statistics and performance indicators of campaign operators at 0:00. |
46 | resources | array | An array of objects with outbound callflow (47 - 62). |
48 | dialedNumber | string | Regular expression of the subscriber's phone number. |
49 | destinations | array | Array of objects (50 - 59), with a description of the directions of the output of the call. |
51 | gwName | string | Gateway name from 07 Gateways. |
52 | dialString | string | Dial number string. |
54 | order | number | Order (sequence) of choice. |
55 | limit | number | The number of simultaneous calls in this direction. |
56 | enabled | boolean | enabled or not |
57 | callerIdNumber | string | CallerID for destination. |
62 | agentParams | object | General parameters of operators in the campaign (63 - 68). If not set, then the individual settings of each of the operators in the 06 Directory are taken into account. |
63 | callTimeout | number | The maximum duration of a call to the operator (dial-up to the operator). |
64 | wrapUpTime | number | The time for completing the call. At this time, the dialer does not distribute the call to the agent. |
65 | maxNoAnswer | number | The maximum number of consecutive calls without an operator answering, after which the system will take the operator to a break. |
66 | busyDelayTime | number | The delay in seconds between calls from the queue if the agent is busy. |
67 | rejectDelayTime | number | The delay in seconds between calls from the queue if the agent rejects the call. |
68 | noAnswerDelayTime | number | The delay in seconds between calls from the queue if the agent did not answer. |
70 | agents | array | An array with the numbers of operators assigned to this campaign. |
74 | skills | array | An array with operator skills that will be automatically included in this campaign. |
77 | agentStrategy | string | The strategy of choosing a free operator. One of the values is possible:
|
78 | communications | object | Communication facilities of subscribers. |
79 | types | array | An array with types of communication tools of subscribers (80 - 104). |
81 | name | string | The name of the type of communications. |
82 | code | string | Communication type code. |
83 | ranges | array | An array of objects describing time and quantity parameters for each type of communication tool. |
85 | startTime | number | The start time of the action. |
86 | endTime | number | Action completion time. |
87 | attempts | number | The number of attempts to dial. |
88 | priority | number | Priority. |
After successfully creating a new campaign, the server returns the identifier in the response:
Respons
1 |
|
To change the campaign parameters, you must send PUT with the updated request body. For example:
PUT
/api/v2/dialer/5947d253877320000ca427a7
Content-Type: application/json X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
To delete a campaign, a DELETE request is used, and to get information on a dealer, GET
To start the campaign you need to send a PUT request without a body
PUT
/api/v2/dialer/5947d253877320000ca427a7/state/1
Content-Type: application/json X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
Subscribers upload:
To add a new subscriber to the created campaign, you need to send a POST request to the Webitel Engine server address with the specified request body. The following is an example of such a request:
POST
/api/v2/dialer/5947d253877320000ca427a7/members?autoRun=true
Content-Type: application/json X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
Body
1 |
|
autoRun
The parameter allows you to automatically launch a campaign after adding a subscriber.
Body JSON
Variable | Type | Description |
---|---|---|
name | string | Custom subscriber name |
priority | number | Call Priority (any integer). Default number is 0. |
communications | array | An array of phone numbers with priorities for dialing one subscriber if you need to specify more than one means of communication for search. The type field indicates the code type of the communication medium. |
variables | object | Additional variables that will be assigned to the channel of each attempt to dial the subscriber. |
expire | number | Optional parameter. Indicates the maximum time to which the subscriber should ring. If this subscriber is not served within the indicated time period, the dialer will stop making calls. |
After successfully adding a subscriber, the server returns an identifier in the response:
Answer example
|
To change the PUT data, to delete a subscriber, a DELETE request is used, and to get information - GET
GET
/api/v2/dialer/5947d253877320000ca427a7/members/5949067198ff9f000ca9a264
X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
Call Result Management
If the function to manage the result of a call from an external application, waitingForResultStatus, has been activated, at the end of each successful call, the dialer will wait for a REST request with the status - consider this attempt successful or not. Also, it is possible to transfer a new phone, exclude the current one or set a new dial-up time. Request example:
PUT
/api/v2/dialer/5947d253877320000ca427a7/members/5949067198ff9f000ca9a264/status
Content-Type: application/json X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg
Body
|
Body JSON
Variable | Type | Description |
---|---|---|
success | boolean |
|
reset_retries | boolean | true - Completely clear all attempts by all means of communication of the subscriber and start from the beginning. |
next_after_sec | number | If indicated, the time in seconds after how much to make the next attempt to dial the subscriber. If time is not specified, the value from the settings of the dealer is taken into account. |
next_communication | string | To which number to make the next attempt. If no number is specified, the number will be selected in priority order. If a new number is specified, it will be added with a higher priority. |
stop_communications | array | An array with numbers that you can’t dial into anymore. Or, you can specify all (as a string), then dialing to all numbers except for the one specified in the next_communication field will be stopped "stop_communications": "all" |
description | string | Random comment on action. |
Cancel call member
To cancel (without deleting) a call member, you can send a terminate PUT request:
PUT
/api/v2/dialer/5947d253877320000ca427a7/members/5949067198ff9f000ca9a264/terminate
X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNmMTQ3ZTFiLTk1ZGYtNDI1OC05ZT
M2LWQ4NWZkZDZlZDUzZiIsImV4cCI6MTQ5NzkwNjAwMDAwMCwiZCI6InNpdGUiLCJ0IjoiZG9tYWluIiwidiI6Mn0.o
-bcG_U3oJMN4r3YaBfSg9CcrZPANZulcapR4E6TSdg