Creating a new TM campaign

Description: The method allows you to create a new campaign (called telemarketing campaign) in the CC system

Method: POST

URL: /api/v1/telemarketing/campaigns/progress.do

Query data:

Description of fields: * - required parameters

Field Value type Description
name* string() the name of the TM campaign
typeProcessing* string() Type of processing. May have values: OPERATOR, SMS, and IVR.
Depending on the type of processing selected, the values ​​of other fields that are associated with the processing type should be formed:
OPERATOR
callingMode* string() Outbound calling mode. May have values: PROGRESSIVE_NEW, PREDICTIVE_NEW, PREVIOUS_PREVIEW_NEW
SMS
smsProviderId* integer() unique SMS provider ID How to find out the smsProviderId values How to find out the value of smsProviderId
IVR
ivrScenarioId* integer() unique script IVR identifier How to find out ivrScenarioId values How to find out the value of ivrScenarioId
callingSearchSpaceId* integer() calling search space id How to find out the value of this parameter
callStatusRuleProcessorId* integer() Processor Id for unsuccessful attempts How to find out the value ​​of this parameter
automaticStart boolean() True indicates that the campaign is being started automatically. The default value is false.
When this value is enabled, the following fields should be filled in: * - required
startDate* string() start date. Example format: 2015-08-08
endDate string() end date. Example format: 2015-08-08
startTime string() what time should the campaign start running on weekdays. Example format: 12:30
endTime string() what time should the campaign stop running on weekdays. Example format: 12:30
weekendsStartTime string() what time should the campaign start running on the weekends. Example format: 12:30
weekendsEndTime string() what time should the campaign stop running of the weekend. Example format: 12:30
weekDays string() campaign days (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
vindicationProcessingType string() type of vindication. Possible values ​​are NONE, PRE_VINDICATION, VINDICATION. The default is NONE
notResponceTime integer() call time to the client (sec). The default is 30 sec
lossPercentage integer() losses (allowed abandon call rate) (%). The default is 3%
workingTime integer() working time (the duration of the after call work) (sec.). The default is 10 sec
callToOperatorTime integer() call time to the operator (sec.). The default is 30 sec
description string() campaign description
lifoApplicationsProcessing boolean() the last added application will be processed first (Last In, First Out). The default value is false
multiplePhones boolean() a set of numbers (if the type of IVR and SMS processing was chosen) that will be run simultaneously or in sequence. The default value is false
queueScenarioId integer() unique call script identifier. How to find out the value of this parameter
previewTimeout integer() the time for the client card preview (sec, only available in Preview call mode)
allowAutoAnswer boolean() enable auto answer option on the agent’s side (Available in Progressive call mode)
dynamicRouting boolean() enable dynamic call routing
dialOnlyActivePhoneNumbers boolean() only allow calls to active numbers. The default value is false
clientsBlockedPhoneNumbersSupport boolean() allow search for normalized numbers. The default value is false
endless boolean() endless processing of applications in telemarketing (after processing of all applications does not go from the status ‘In process’ to other statuses, but waiting for new applications)
limitTimeCalls boolean() enable time zone outbound calling (only available in endless mode).
With this setting, the following additional parameters should be specified: * - required
startCallsTime* string() start of client's time zone call campaign. Example format: 09:00
endCallsTime* string() the end of the client's time zone call campaign. Example format: 09:00
disableLimitForFirstCall boolean() disabling the restriction for the first call attempt. The default is false
dayNightModeEnabled boolean() Day-night mode. The default is false

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):

 

 


Deleting a TM campaign

Description: The method allows you to remove a TM campaign from the CC system

Method: DELETE

URL: /api/v1/telemarketing/campaigns/{campaignId}/remove.do

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign to remove.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{"errorMessage":"TelemarketCampaign 11 not found"}

 

 


Starting a Telemarketing Campaign

Description: The method allows you to start call applications specified in a given TM campaign.

Method: POST

URL: /api/v1/telemarketing/campaigns/{campaignId}/progress.do

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign to run.

Possible answers:
Upon successful request, the server will respond with HTTP status 201, and data Created

Examples of unsuccessful response (errors):

 

 


Stop the telemarketing campaign

Description: The method allows stopping the call application dialing specified in a given TM campaign.

Method: DELETE

URL: /api/v1/telemarketing/campaigns/{campaignId}/progress.do

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing company that should be stopped.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):

 

 


Restart the telemarketing campaign

Description: The method allows you to restart the call application specified in a given TM campaign.

Method: PUT

URL: /api/v1/telemarketing/campaigns/{campaignId}/progress.do

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign to be restarted.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):

 

 


Return taskId value by telemarketing id

Description: The method allows you to find out the taskId parameter by telemarketing id (used, for example, when adding telemarketing to a group).

Method: GET

URL: /api/v1/telemarketing/campaigns/{campaignId}/taskId.json

Description of fields: * - mandatory parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign for which you need to know the values ​​of taskId.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and data with JSON { "taskId": 2859 }

Examples of unsuccessful response (errors):
{ "errorMessage": "TelemarketCampaign 261 not found" }

 

 


Adding a task to an agent group

Description:The method allows you to add a task to a given agent group

Method: POST

URL: /api/v1/groups/{groupId}/tasks/{taskId}/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
{groupId}* integer() the id of the group to which you want to add the task. Learn {groupId} values
{taskId}* integer() he task id to add to the group. Learn {taskId} values
taskPriority* integer() is assigned to a specific task depending on the importance of processing it. The more priority is given to a task, the faster it will be processed
userSelectionMode* string() operator selection criterion (possible values: BY_ROUND, BY_PRIORITY, LONGEST_AVAILABLE)
previewTimeout* integer() time to process a lower priority task if a group receives a higher priority task. In case the operator does not process the task with lower priority within the specified time, it will be closed automatically and a new one will be opened to the operator

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and the data will be OK

Examples of unsuccessful response (errors):
{ "errorMessage": "TelemarketCampaign 261 not found" }

 

 


Obtaining telemarketing data

Description: The method allows obtaining data on all telemarking campaigns

Method: GET

URL: /api/v1/telemarketing/campaigns.do?limit={limitN}&offset={offsetN}

Description of fields: * - required parameters

Field Value type Description
{limitN}* integer() the amount of data uploaded. Max = 100
{offsetN} integer() the value of the offset

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and a JSON array with TM data


  [
      {
          "id": 2670,
          "ccProjectId": 1038,
          "automaticStart": true,
          "ivrScenarioId": null,
          "smsMessage": null,
          "smsProviderId": null,
          "typeProcessing": "OPERATOR",
          "startTime": "08:30",
          "endTime": "22:00",
          "weekendsStartTime": "08:30",
          "weekendsEndTime": "22:00",
          "startDate": "2019-03-22",
          "endDate": null,
          "callToOperatorTime": 40,
          "callingMode": "PREDICTIVE_NEW",
          "lossPercentage": 3,
          "name": "Чехол",
          "notResponceTime": 30,
          "vindicationProcessingType": "NONE",
          "workingTime": 600,
          "callStatusRuleProcessorId": 62,
          "callingSearchSpaceId": 200,
          "previewTimeout": 30,
          "allowAutoAnswer": false,
          "description": null,
          "multiplePhones": false,
          "dynamicRouting": false,
          "dialOnlyActivePhoneNumbers": false,
          "clientsBlockedPhoneNumbersSupport": false,
          "weekDays": [
              "Tue",
              "Sun",
              "Fri",
              "Wed",
              "Sat",
              "Mon",
              "Thu"
          ],
          "endless": true,
          "lifoApplicationsProcessing": true,
          "limitTimeCalls": false,
          "startCallsTime": null,
          "endCallsTime": null,
          "disableLimitForFirstCall": false,
          "dayNightModeEnabled": false,
          "queueScenarioId": null
      },
      {
          "id": 2666,
          "ccProjectId": 1082,
          "automaticStart": true,
          "ivrScenarioId": null,
          "smsMessage": null,
          "smsProviderId": null,
          "typeProcessing": "OPERATOR",
          "startTime": "08:30",
          "endTime": "21:30",
          "weekendsStartTime": "08:30",
          "weekendsEndTime": "21:30",
          "startDate": "2019-03-21",
          "endDate": null,
          "callToOperatorTime": 40,
          "callingMode": "PROGRESSIVE_NEW",
          "lossPercentage": 3,
          "name": "Жидкая кожа",
          "notResponceTime": 50,
          "vindicationProcessingType": "NONE",
          "workingTime": 200,
          "callStatusRuleProcessorId": 62,
          "callingSearchSpaceId": 200,
          "previewTimeout": 30,
          "allowAutoAnswer": false,
          "description": null,
          "multiplePhones": false,
          "dynamicRouting": false,
          "dialOnlyActivePhoneNumbers": false,
          "clientsBlockedPhoneNumbersSupport": false,
          "weekDays": [
              "Tue",
              "Sun",
              "Fri",
              "Wed",
              "Sat",
              "Mon",
              "Thu"
          ],
          "endless": true,
          "lifoApplicationsProcessing": true,
          "limitTimeCalls": false,
          "startCallsTime": null,
          "endCallsTime": null,
          "disableLimitForFirstCall": false,
          "dayNightModeEnabled": false,
          "queueScenarioId": null
      }
  ]

Examples of unsuccessful response (errors):

 

 


Creating a TM callback

Description:The method allows you to create a TM callback upon request (a callback to the client from this telemarketing campaign)

Method: POST

URL: /api/v1/callbacks/exec.do?type=tm

Query data:

Description of fields: * - required parameters

Field Value type Description
name* string() The name of the callback
description* string() Description of TM callback
clientIdentifiers* array() must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column.
phone* string() the phone number of the client to whom the callback will be created
campaignId* integer() this is the ID of the TM of the company where you want to call back
operatorId* integer() the identifier of the operator to which the callback will be created
callAt* string() time when the callback should be made (set in 2019-05-28T20: 20: 00 + 03: 00)
callAutomatically* boolean() a parameter that answers whether the callback will start automatically (if "true" is specified), if "false" is selected, then the operator will be reminded at the specified time.

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and a response with a created callback

   
{
  "name": "ТМ callback",
  "description": "Created via api",
  "clientIdentifiers": {
      "offerDomain": "project-07",
      "offerId": 694
  },
  "phone": "0734948442",
  "campaignId": 2671,
  "operatorId": 1309,
  "callAt": "2019-07-28T20:20:00+03:00",
  "callAutomatically": false
}

Examples of unsuccessful response (errors):
{"errorMessage":"callAt must be in future"}
{"errorMessage":"Client not found in campaign"}
{"errorMessage":"Campaign not found"}

 

 


Create a call application in TM campaign From the client

Description:The method allows you to add a CC client as a call application into the desired TM campaign by the given identifier

Method: POST

URL: /api/v1/tacs/campaigns/{campaigId}/exec.do

Query data:

Description of fields: * - required parameters

Field Value type Description
{campaigId}* integer() Id of a telemarketing campaign to which you want to add a client to your call campaign
maxCallCount* integer() the maximum number of calls to the client, the number from 1 to the desired value of the call
disableDuplicatePhonesValidation boolean() check for phone duplicates. The default value is true. If we pass false, then we check for the same phone numbers; if true, no.
clients* array() an array of client IDs to add to the call campaign. Each element of the array is defined by the clientIdentifiers, array, which contains the client identifier fields.
clientIdentifiers* array() Must contain a list of custom client card fields as the synchronization identifier by which the client will be identified on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured on the client card in the “Sync” column.
Example of adding one client:
  "clients": [{
     "clientIdentifiers": {
         "offerName": "TEST",
         "offerId": 10
     }
 }]
Example of adding more than one client:
  "clients": [{
     "clientIdentifiers": {
         "offerName": "TEST",
         "offerId": 10
     }
 },
 {
    "clientIdentifiers": {
        "offerName": "TEST",
        "offerId": 11
    }
}]

Possible answers:
Upon successful request, the server will respond with an HTTP status 200, and an empty JSON {}

Examples of unsuccessful response (errors):
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "Client already exists" } ] }
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "Client is in blacklist" } ] }
{ "errors": [ { "clientIdentifiers": { "offerName": "TEST", "offerId": 11 }, "errorMessage": "No such client" } ] }

 

 


Removing call campaign application using client identifiers

Description: The method allows removing a call application from a call campaign

Method: PUT

URL: /api/v1/tacs/campaigns/{campaignId}/applications/by/syncId/remove.do

Query data:

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign
clientIdentifiers* array() An array of client IDs that should contain a list of custom client card fields, as a synchronization identifier, for which client identification will occur on the system (such fields may be one or more). If the field is defined as a synchronization identifier, it must be present in the list and cannot be blank; otherwise there will be a corresponding error about the inability to identify clients. The name of the field is determined by the name configured in the client card in the “Sync” column
cancelCallbacks* boolean() The true value specifies that if a callback was created on the request, then the manual callback will be deleted along with the request, and the automatic call will go to "CANCEL" status. The false value is to leave the callbacks.

Possible answers:
Upon successful request, the server will respond with HTTP status 200, and the data is ОК

Examples of unsuccessful response (errors):

 

 


Removing call campaign applications using filters

Description: The method allows removing the call application from the call campaign in a given TM campaign by filtering the status of the call, etc. This method allows deleting call applications using such filters as the application status, the status of closing the form by the operator, the client phone number, the status of the client call, the value of the client card by the name of the field "Synchronization" (field types: Number, TextField, ComboBox, Statusfield).

Method: PUT

URL: /api/v1/tacs/campaigns/{campaignId}/applications/by/filter/remove.do

Example query data:

Description of fields: * - required parameters

Field Value type Description
{campaignId}* integer() id telemarketing campaign
criteria* array() An array of filter criteria. In this array parameters are set: key, value, operator
key* string() he key that will be used for filtering. Possible values:
"application.status" - filter by the status of the application.
"application.ccprojectCallStatus" - the filter on the status of closing of the form by the operator
"phones.phoneNumber" - filter by client number
"ts.clientCallStatus" - a filter by the status of the client's call
"client_sync_name" - filter by client IDs.
value* string() this value may take different data depending on the key key:

if key: "application.status": NONE, STARTED, FAILED, SUCCESS, EXPIRED, BLOCKED, CANCEL, ERROR, INVALID

if key: "application.ccprojectCallStatus": ANSWERED, NO_ANSWER, BUSY, INVALID_NUMBER, QUEUE_HANGUP, INCORRECT_NUMBER, LINE_UNAVAILABLE, NOT_FOUND_SUITABLE_PHONE, SCHEDULE_NOT_ALLOWED, NO_ROUTING, REJECT, CHANUNAVAIL

if key: "phones.phoneNumber": phone number in string format

if key: "ts.clientCallStatus": ANSWERED, BUSY, INCORRECT_NUMBER, INVALID_NUMBER, LINE_UNAVAILABLE, NOT_FOUND_SUITABLE_PHONE, NO_ANSWER, NO_ROUTING, QUEUE_HANGUP

if key: "application.hasRecall": true, false

if key: "client_sync_name", then "value" can take values ​​depending on the specified field (field types: Number, TextField, ComboBox, StatusField). if key equals one of the client card field values: for example, if key: "id" then "value": 12345, if key: "first_name" then "value": "Peter" (integer values ​​without '' '' , string values ​​from '' '').
operator* string() Digestion operator: "LIKE", "NOT LIKE", "=" statements available

Possible answers:
Upon successful request, the server will respond with HTTP status 200, and the data is ОК

Examples of unsuccessful response (errors):