Sinch Contact Center Restful Outbound Campaign Interface (OBI) version v1
http://localhost:8080/RI/obi
Description
This interface provides data of outbound campaigns.
Request Header Data Requirements
To GET JSON response, the request must have "Accept = application/json" header.
To GET XML response, the request should have "Accept = application/xml" header.
To POST/PUT JSON data, the request must have "Content-Type = application/json" header.
To POST/PUT XML data, the request should have "Content-Type = application/xml" header.
POST should also have "Accept = text/html" header. It returns the ID of the created object. POST also returns Location header which contains the ID. POST returns code 201 (Created).
PUT and DELETE do not have any response, instead they return code 204 (No Content).
/campaigns
Collection of campaigns.
Get a list of campaigns.
get /campaigns
Get a list of campaigns.
Query Parameters
- statistics: (boolean - default: false)
Includes statistics result, both total (if campaign has been active) and daily (if campaign has been active during the current UTC date).
Example:
statistics=true
- statisticsDate: (datetime)
Includes daily statistics for the given date if campaign has been active then (no total statistics). statistics=true parameter must be given as well.
Example:
statisticsDate=2023-05-16T00:00:00Z
- agentId: (string)
Includes statistics only for the given agents (IDs separated by comma). Only those campaigns are returned which have statistics for these agents. statistics=true parameter must be given as well. Can be used with statisticsDate parameter.
Example:
agentId=38FFAEA3C2B54CD6BCFBCCF2006C0800,6B818C08D6B543ED8A1FDB45D8BC173F
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?, except for ID fields, which must be in id32 or id36 format (GUID).
Valid searchable fields: name, dialerId, dialerName, dialingMode, status, dialerStatus, queueId, queueName, customIvrNumber, total, handled, maxCalls, filtered, timeZoneExample:
name=TestCampaign*
- startDate: (string)
Search for campaigns that have the startDate value after the given UTC time
Example:
startDate=2020-06-29T12:00:00.000Z
- startDateEnd: (string)
Search for campaigns that have the startDate value before the given UTC time
Example:
startDateEnd=2020-09-29T12:00:00.000Z
- endDate: (string)
Search for campaigns that have the endDate value after the given UTC time
Example:
endDate=2020-06-29T12:00:00.000Z
- endDateEnd: (string)
Search for campaigns that have the endDate value before the given UTC time
Example:
endDateEnd=2020-09-29T12:00:00.000Z
- registered: (string)
Search for campaigns that have the registered value after the given UTC time
Example:
registered=2020-06-29T12:00:00.000Z
- registeredEnd: (string)
Search for campaigns that have the registered value before the given UTC time
Example:
registeredEnd=2020-09-29T12:00:00.000Z
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: campaigns
- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- name: required(string)
- remarks: (string)
- dialerId: required(string - minLength: 32 - maxLength: 32)
- dialerName: (string)
- dialerType: required(one of QueueDialer, CampaignDialer)
- dialingMode: required(one of PREVIEW, PROGRESSIVE, PREDICTIVE)
- status: (one of Passive, Active, Handled, Expired, Invalid, Deleted, Quota)
- dialerStatus: (one of OPEN, CLOSING, CLOSING2, CLOSED, PASSIVE, COMPLETED, SUSPEND, EXPIRED, SHUTDOWN, QUOTA)
- queueId: required(string - minLength: 32 - maxLength: 32)
- queueName: (string)
- customIvrNumber: (string)
- total: (integer)
- handled: (integer)
- notHandled: (integer)
- callable: (integer)
Number of customers which have not been handled yet (not handled, MAXCALLS or filtered), and which can be called immediately (don't have scheduled call in the future).
- maxCalls: (integer)
Number of customers which have MAXCALLS result. Customers get MAXCALLS result, after each dial has ended in BUSY or NOANSWER, and RetryCount + 1 attempts have been made. RetryCount is campaign parameter with default value of 3, meaning that by default 4 attempts are made. If RetryCount is later increased, then these customers will be called again.
- filtered: (integer)
- startDate: (datetime)
- endDate: (datetime)
- registered: required(datetime)
- timeZone: (string)
- loggedOn: (integer)
- abandonRate: (number)
Predictive campaigns only, between 0.0 and 2.0, default value 1.0 %. If 0.0, then no extra predictive calls are made. If 1.0, then target is 1 % of abandoned calls (connected with customer but no available agent).
- increasePredictiveRatio: (number)
Predictive campaigns only, between 0.0 and 100.0, default value 0.0 %. Percentage of extra calls made for busy agents. Updated automatically to reach the configured abandonRate value.
- stats: (object)
Added when statistics=true query parameter is given and there are statistics for the campaign.
- total: (object)
Total statistics for the campaign, if campaign has been active. If statisticsDate=YYYY-MM-DDT00:00:00Z query parameter is given, then total statistics are not returned.
- numberOfHandledCustomers: required(integer)
Number of handled customers.
- numberOfCalls: required(integer)
Number of calls.
- numberOfSuccessfulCalls: required(integer)
Number of SUCCESS and REFUSAL calls.
- numberOfRefusalCalls: required(integer)
Number of REFUSAL calls.
- numberOfAmountCalls: required(integer)
Number of calls with amount.
- numberOfSkipCalls: required(integer)
Number of SKIP calls.
- numberOfRejectCalls: required(integer)
Number of AGENT_REJECTED calls.
- numberOfOperLogoutCalls: required(integer)
Number of calls where agent logged out when call was in preview/connected/wrap-up state.
- numberOfNotDialedCalls: required(integer)
Number of calls which were not dialed, for example if number was invalid.
- numberOfHangupCalls: required(integer)
Number of HANGUP calls.
- numberOfAbandonedCalls: required(integer)
Number of ABANDONED calls.
- amount: required(number)
The amount collected from SUCCESS calls.
- loginTime: required(number)
Agent login time in seconds.
- pauseTime: required(number)
Agent pause time in seconds.
- waitTime: required(number)
Agent wait time in seconds.
- previewTime: required(number)
Agent preview time in seconds.
- callTime: required(number)
Agent dialing time in seconds (in preview/progressive campaign).
- talkingTime: required(number)
Agent talking time in seconds.
- wrapTime: required(number)
Agent wrap-up time in seconds.
- numberOfCustomers: required(number)
Number of customers.
- numberOfAgents: required(number)
Number of agents.
- numberOfHandledCustomers: required(integer)
- daily: (object)
Daily statistics for the campaign if the campaign has been active on the given day. By default the current UTC day is used, unless statisticsDate=YYYY-MM-DDT00:00:00Z query parameter is given.
- numberOfHandledCustomers: required(integer)
Number of handled customers.
- numberOfCalls: required(integer)
Number of calls.
- numberOfSuccessfulCalls: required(integer)
Number of SUCCESS and REFUSAL calls.
- numberOfRefusalCalls: required(integer)
Number of REFUSAL calls.
- numberOfAmountCalls: required(integer)
Number of calls with amount.
- numberOfSkipCalls: required(integer)
Number of SKIP calls.
- numberOfRejectCalls: required(integer)
Number of AGENT_REJECTED calls.
- numberOfOperLogoutCalls: required(integer)
Number of calls where agent logged out when call was in preview/connected/wrap-up state.
- numberOfNotDialedCalls: required(integer)
Number of calls which were not dialed, for example if number was invalid.
- numberOfHangupCalls: required(integer)
Number of HANGUP calls.
- numberOfAbandonedCalls: required(integer)
Number of ABANDONED calls.
- amount: required(number)
The amount collected from SUCCESS calls.
- loginTime: required(number)
Agent login time in seconds.
- pauseTime: required(number)
Agent pause time in seconds.
- waitTime: required(number)
Agent wait time in seconds.
- previewTime: required(number)
Agent preview time in seconds.
- callTime: required(number)
Agent dialing time in seconds (in preview/progressive campaign).
- talkingTime: required(number)
Agent talking time in seconds.
- wrapTime: required(number)
Agent wrap-up time in seconds.
- numberOfCustomers: required(number)
Number of customers.
- numberOfAgents: required(number)
Number of agents.
- numberOfHandledCustomers: required(integer)
- total: (object)
Example:
[
{
"notHandled": 5,
"callable": 0,
"dialerName": "Queue Dialer",
"dialerType": "QueueDialer",
"total": 10,
"registered": "2020-09-25T07:07:50.243Z",
"dialerId": "88B8B41C99E6484A94F402EA5E465FC5",
"dialer": "88B8B41C99E6484A94F402EA5E465FC5",
"endDate": "2021-02-20T22:00:00Z",
"startDate": "2020-12-20T22:00:00Z",
"handled": 5,
"dialerStatus": "PASSIVE",
"maxCalls": 0,
"filtered": 0,
"dialingMode": "PREDICTIVE",
"name": "Test Campaign",
"timeZone": "Europe/Berlin",
"queueId": "63AA93F493A54C5A8597FCFA670B2382",
"status": "Passive",
"queueName": "Test Queue",
"id": "8A7C98EAF1164F2FAA93B98EECB95D76"
},
{
"notHandled": 5,
"callable": 1,
"dialerName": "Campaign Dialer",
"dialerType": "CampaignDialer",
"total": 10,
"registered": "2019-09-25T07:07:50.243Z",
"dialerId": "88B8B41C99E6484A94F402EA5E465FC5",
"dialer": "88B8B41C99E6484A94F402EA5E465FC5",
"handled": 5,
"dialerStatus": "OPEN",
"maxCalls": 0,
"filtered": 0,
"loggedOn": 1,
"dialingMode": "PREVIEW",
"name": "Test Preview Campaign",
"queueId": "63AA93F493A54C5A8597FCFA670B2382",
"status": "Active",
"queueName": "Test Queue",
"id": "62718C7889CC44F7B944C1A6F6BE9B7F",
"stats": {
"total": {
"numberOfHandledCustomers": 1,
"numberOfCalls": 15,
"numberOfSuccessfulCalls": 1,
"numberOfRefusalCalls": 0,
"numberOfAmountCalls": 0,
"numberOfSkipCalls": 0,
"numberOfRejectCalls": 0,
"numberOfOperLogoutCalls": 0,
"numberOfNotDialedCalls": 14,
"numberOfHangupCalls": 1,
"numberOfAbandonedCalls": 0,
"amount": 0.0,
"loginTime": 5122.0327,
"pauseTime": 0.0,
"waitTime": 0.0030002594,
"previewTime": 20.573732,
"callTime": 0.0010008812,
"talkingTime": 0.0,
"wrapTime": 5101.453,
"numberOfCustomers": 60,
"numberOfAgents": 1
},
"daily": {
"numberOfHandledCustomers": 0,
"numberOfCalls": 0,
"numberOfSuccessfulCalls": 0,
"numberOfRefusalCalls": 0,
"numberOfAmountCalls": 0,
"numberOfSkipCalls": 0,
"numberOfRejectCalls": 0,
"numberOfOperLogoutCalls": 0,
"numberOfNotDialedCalls": 0,
"numberOfHangupCalls": 0,
"numberOfAbandonedCalls": 0,
"amount": 0.0,
"loginTime": 0.0,
"pauseTime": 0.0,
"waitTime": 0.0,
"previewTime": 0.0,
"callTime": 0.0,
"talkingTime": 0.0,
"wrapTime": 0.0,
"numberOfCustomers": 30,
"numberOfAgents": 0
}
}
}
]
Entity representing a campaign.
Update the campaign with campaignId = {campaignId}.
Note: Provide all properties since all fields are updated.
Get the campaign with campaignId = {campaignId}.
put /campaigns/{campaignId}
Update the campaign with campaignId = {campaignId}.
Note: Provide all properties since all fields are updated.
URI Parameters
- campaignId: required(string)
Body
Media type: application/json
Type: object
Properties- name: required(string)
- remarks: (string)
- dialingMode: required(one of PREVIEW, PROGRESSIVE, PREDICTIVE)
- queueId: required(string - minLength: 32 - maxLength: 32)
- customIvrNumber: (string)
- startDate: (datetime)
- endDate: (datetime)
- timeZone: (string)
- abandonRate: (number)
Predictive campaigns only, between 0.0 and 2.0, default value 1.0 %. If 0.0, then no extra predictive calls are made. If 1.0, then target is 1 % of abandoned calls (connected with customer but no available agent).
- increasePredictiveRatio: (number)
Predictive campaigns only, between 0.0 and 100.0, default value 0.0 %. Percentage of extra calls made for busy agents. Updated automatically to reach the configured abandonRate value.
Example:
{
"endDate": "2021-02-20T22:00:00Z",
"startDate": "2020-12-20T22:00:00Z",
"dialingMode": "PREDICTIVE",
"name": "Test Campaign",
"timeZone": "Europe/Berlin",
"queueId": "63AA93F493A54C5A8597FCFA670B2382",
}
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
get /campaigns/{campaignId}
Get the campaign with campaignId = {campaignId}.
URI Parameters
- campaignId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- name: required(string)
- remarks: (string)
- dialerId: required(string - minLength: 32 - maxLength: 32)
- dialerName: (string)
- dialerType: required(one of QueueDialer, CampaignDialer)
- dialingMode: required(one of PREVIEW, PROGRESSIVE, PREDICTIVE)
- status: (one of Passive, Active, Handled, Expired, Invalid, Deleted, Quota)
- dialerStatus: (one of OPEN, CLOSING, CLOSING2, CLOSED, PASSIVE, COMPLETED, SUSPEND, EXPIRED, SHUTDOWN, QUOTA)
- queueId: required(string - minLength: 32 - maxLength: 32)
- queueName: (string)
- customIvrNumber: (string)
- total: (integer)
- handled: (integer)
- notHandled: (integer)
- callable: (integer)
Number of customers which have not been handled yet (not handled, MAXCALLS or filtered), and which can be called immediately (don't have scheduled call in the future).
- maxCalls: (integer)
Number of customers which have MAXCALLS result. Customers get MAXCALLS result, after each dial has ended in BUSY or NOANSWER, and RetryCount + 1 attempts have been made. RetryCount is campaign parameter with default value of 3, meaning that by default 4 attempts are made. If RetryCount is later increased, then these customers will be called again.
- filtered: (integer)
- startDate: (datetime)
- endDate: (datetime)
- registered: required(datetime)
- timeZone: (string)
- loggedOn: (integer)
- abandonRate: (number)
Predictive campaigns only, between 0.0 and 2.0, default value 1.0 %. If 0.0, then no extra predictive calls are made. If 1.0, then target is 1 % of abandoned calls (connected with customer but no available agent).
- increasePredictiveRatio: (number)
Predictive campaigns only, between 0.0 and 100.0, default value 0.0 %. Percentage of extra calls made for busy agents. Updated automatically to reach the configured abandonRate value.
- stats: (object)
Added when statistics=true query parameter is given and there are statistics for the campaign.
- total: (object)
Total statistics for the campaign, if campaign has been active. If statisticsDate=YYYY-MM-DDT00:00:00Z query parameter is given, then total statistics are not returned.
- numberOfHandledCustomers: required(integer)
Number of handled customers.
- numberOfCalls: required(integer)
Number of calls.
- numberOfSuccessfulCalls: required(integer)
Number of SUCCESS and REFUSAL calls.
- numberOfRefusalCalls: required(integer)
Number of REFUSAL calls.
- numberOfAmountCalls: required(integer)
Number of calls with amount.
- numberOfSkipCalls: required(integer)
Number of SKIP calls.
- numberOfRejectCalls: required(integer)
Number of AGENT_REJECTED calls.
- numberOfOperLogoutCalls: required(integer)
Number of calls where agent logged out when call was in preview/connected/wrap-up state.
- numberOfNotDialedCalls: required(integer)
Number of calls which were not dialed, for example if number was invalid.
- numberOfHangupCalls: required(integer)
Number of HANGUP calls.
- numberOfAbandonedCalls: required(integer)
Number of ABANDONED calls.
- amount: required(number)
The amount collected from SUCCESS calls.
- loginTime: required(number)
Agent login time in seconds.
- pauseTime: required(number)
Agent pause time in seconds.
- waitTime: required(number)
Agent wait time in seconds.
- previewTime: required(number)
Agent preview time in seconds.
- callTime: required(number)
Agent dialing time in seconds (in preview/progressive campaign).
- talkingTime: required(number)
Agent talking time in seconds.
- wrapTime: required(number)
Agent wrap-up time in seconds.
- numberOfCustomers: required(number)
Number of customers.
- numberOfAgents: required(number)
Number of agents.
- numberOfHandledCustomers: required(integer)
- daily: (object)
Daily statistics for the campaign if the campaign has been active on the given day. By default the current UTC day is used, unless statisticsDate=YYYY-MM-DDT00:00:00Z query parameter is given.
- numberOfHandledCustomers: required(integer)
Number of handled customers.
- numberOfCalls: required(integer)
Number of calls.
- numberOfSuccessfulCalls: required(integer)
Number of SUCCESS and REFUSAL calls.
- numberOfRefusalCalls: required(integer)
Number of REFUSAL calls.
- numberOfAmountCalls: required(integer)
Number of calls with amount.
- numberOfSkipCalls: required(integer)
Number of SKIP calls.
- numberOfRejectCalls: required(integer)
Number of AGENT_REJECTED calls.
- numberOfOperLogoutCalls: required(integer)
Number of calls where agent logged out when call was in preview/connected/wrap-up state.
- numberOfNotDialedCalls: required(integer)
Number of calls which were not dialed, for example if number was invalid.
- numberOfHangupCalls: required(integer)
Number of HANGUP calls.
- numberOfAbandonedCalls: required(integer)
Number of ABANDONED calls.
- amount: required(number)
The amount collected from SUCCESS calls.
- loginTime: required(number)
Agent login time in seconds.
- pauseTime: required(number)
Agent pause time in seconds.
- waitTime: required(number)
Agent wait time in seconds.
- previewTime: required(number)
Agent preview time in seconds.
- callTime: required(number)
Agent dialing time in seconds (in preview/progressive campaign).
- talkingTime: required(number)
Agent talking time in seconds.
- wrapTime: required(number)
Agent wrap-up time in seconds.
- numberOfCustomers: required(number)
Number of customers.
- numberOfAgents: required(number)
Number of agents.
- numberOfHandledCustomers: required(integer)
- total: (object)
Example:
{
"notHandled": 5,
"callable": 0,
"dialerName": "Queue Dialer",
"dialerType": "QueueDialer",
"total": 10,
"registered": "2020-09-25T07:07:50.243Z",
"dialerId": "88B8B41C99E6484A94F402EA5E465FC5",
"dialer": "88B8B41C99E6484A94F402EA5E465FC5",
"endDate": "2021-02-20T22:00:00Z",
"startDate": "2020-12-20T22:00:00Z",
"handled": 5,
"dialerStatus": "PASSIVE",
"maxCalls": 0,
"filtered": 0,
"dialingMode": "PREDICTIVE",
"name": "Test Campaign",
"timeZone": "Europe/Berlin",
"queueId": "63AA93F493A54C5A8597FCFA670B2382",
"status": "Passive",
"queueName": "Test Queue",
"id": "8A7C98EAF1164F2FAA93B98EECB95D76"
}
Value can be one of Passive, Active.
put /campaigns/{campaignId}/status
Value can be one of Passive, Active.
URI Parameters
- campaignId: required(string)
Body
Media type: text/plain
Type: string
Example:
Active
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
Collection of customerResultStatistics.
Get a list of statistics on customers' results in the campaign. The statistics are grouped by the combination of result, callResult, and classifier. callResult and classifier can be missing.
get /campaigns/{campaignId}/customerResultStatistics
Get a list of statistics on customers' results in the campaign. The statistics are grouped by the combination of result, callResult, and classifier. callResult and classifier can be missing.
URI Parameters
- campaignId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: customerResultStatistics
- result: required(string)
- callResult: (string)
- classifier: (string)
- count: (integer)
Number of customers that have this combination of result, callResult, and classifier.
Example:
[
{
"result": "AGENT_REJECTED",
"callResult": "AGENT_REJECTED",
"classifier": "AGENT_REJECTED",
"count": 52
},
{
"result": "DIALING",
"count": 521
},
{
"result": "REFUSAL",
"callResult": "REFUSAL",
"classifier": "Refusal",
"count": 48
},
{
"result": "SUCCESS",
"callResult": "SUCCESS",
"classifier": "Offer accepted",
"count": 741
}
]
Collection of customers.
Get a list of customers.
Add a new customer.
get /campaigns/{campaignId}/customers
Get a list of customers.
URI Parameters
- campaignId: required(string)
Query Parameters
- includeScript: (string - default: false)
includes script to result
Example:
includeScript=true
- agentId: (string)
Customers can be searched with multiple agentIds by using comma to separate IDs.
Example:
agentId=0B5F41959B1D446FA277B4784167EC2F,78F308DA7ADE42E093A150B08968CA15
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?, except for ID fields, which must be in id32 or id36 format (GUID).
Valid searchable fields: externalId, numbers, result, callResult, classifier, callCount, lastBNumber, dialingMode, previewTime, priority, timeZoneExample:
callResult=SUCCESS*
- date: (string)
Search for customers that have the date value after the given UTC time
Example:
date=2020-06-29T12:00:00.000Z
- dateEnd: (string)
Search for customers that have the date value before the given UTC time
Example:
dateEnd=2020-07-29T12:00:00.000Z
- modificationDate: (string)
Search for customers that have the modificationDate value after the given UTC time
Example:
modificationDate=2020-04-29T12:00:00.000Z
- modificationDateEnd: (string)
Search for customers that have the modificationDate value before the given UTC time
Example:
modificationDateEnd=2020-07-29T12:00:00.000Z
- attributeName: (string)
Search item by attribute name.
Example:
attributeName=classification
- attributeValue: (string)
Search by value of the attribute, attributeName parameter is mandatory in case attributeValue is given.
Example:
attributeValue=gold
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 100)
Limit number of elements by specifying a limit value for the query
Example:
100
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: customers
- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- externalId: required(string)
- numbers: required(string)
- result: (string)
- callResult: (string)
- classifier: (string)
- callCount: (integer)
- lastBNumber: (integer)
- date: (datetime)
- agentId: (string)
- dialingMode: (one of PREVIEW, PREDICTIVE)
- previewTime: (integer)
- priority: (integer)
- modificationDate: (datetime)
- timeZone: (string)
- attributes: (array of object)
Items: items
- name: required(string)
- value: required(string)
- script: (object)
- name: required(string)
- answers: required(array of object)
Items: items
- question: required(string)
- answer: required(string)
Example:
[{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "Address",
"value": "StreetAddress10"
},
{
"name": "First Name",
"value": "Kathy"
},
{
"name": "Phone1",
"value": "0215428754"
}
]
},
"script": {
"answers": [
{
"answer": "Other",
"question": "If you would now buy a new tennis racket, which of the following brands would you prefer?
},
{
"answer": "yes",
"question": "Would you be interested to visit our store so we can book an expert to introduce you these rackets in more details?"
},
{
"answer": "Within 6 months",
"question": "OK. When do you think you are going to update your racket so we can give you an call to discuss what we can offer at that time?"
}
],
"name": "Tennis Sales Script"
},
"result": "SUCCESS",
"date": "9999-12-31T23:59:59Z",
"dialingMode": "PREDICTIVE",
"lastBNumber": 0,
"callCount": 0,
"modificationDate": "2020-09-29T12:58:28.393Z",
"externalId": "10",
"numbers": "0215428754",
"id": "5C7A1B1A001848B7A86000E10E3B9D5B"
},
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "ExternalId",
"value": "7"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "Postcode",
"value": "10001"
},
{
"name": "Company",
"value": "HighCom"
},
{
"name": "Address",
"value": "StreetAddress7"
},
{
"name": "First Name",
"value": "Julie"
},
{
"name": "Phone1",
"value": "951254875"
},
{
"name": "Phone2",
"value": "951254875"
}
]
},
"result": "SUCCESS",
"date": "9999-12-31T23:59:59Z",
"lastBNumber": 0,
"callCount": 0,
"modificationDate": "2020-09-29T12:58:28.393Z",
"externalId": "7",
"numbers": "951254875;951254875",
"id": "3B3BAFB4FD1444478DBF0658EDF389CC"
}
}]
post /campaigns/{campaignId}/customers
Add a new customer.
URI Parameters
- campaignId: required(string)
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- externalId: (string)
If externalId is not given, it is generated by the system.
- numbers: (string)
Customer's phone numbers are listed in priority order and separated with semicolon (;). Customer can have up-to 3 numbers. You can define customer phone numbers either by using this field, or by specifying as attributes Phone1, Phone2 and Phone3. Note: in the case numbers are given, then the phone attributes are ignored. It is required to provide phone numbers either by this property or by attributes.
- date: (datetime)
- agentId: (string)
- dialingMode: (one of PREVIEW, PREDICTIVE)
- previewTime: (integer)
- priority: (integer)
- timeZone: (string)
- attributes: (array of object)
Attributes of the customer. Note: attributes Phone1, Phone2 and Phone3 are created based on numbers property if that is defined in data. If numbers is not specified, it is mandatory to have at least attribute Phone1.
Items: items
- name: required(string)
- value: required(string)
Example:
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "Address",
"value": "StreetAddress10"
},
{
"name": "First Name",
"value": "Kathy"
}
]
},
"externalId": "10",
"numbers": "0215428754;98521542",
"timeZone": "Europe/Helsinki"
}
}
HTTP status code 201
Returns the created id.
Body
Media type: text/html
Type: any
Example:
F5168FBDD6914C8DB1C6D0BD64563A39
Entity representing a customer.
Get the customer with customerId = {customerId}.
Delete the customer.
get /campaigns/{campaignId}/customers/{customerId}
Get the customer with customerId = {customerId}.
URI Parameters
- campaignId: required(string)
- customerId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- externalId: required(string)
- numbers: required(string)
- result: (string)
- callResult: (string)
- classifier: (string)
- callCount: (integer)
- lastBNumber: (integer)
- date: (datetime)
- agentId: (string)
- dialingMode: (one of PREVIEW, PREDICTIVE)
- previewTime: (integer)
- priority: (integer)
- modificationDate: (datetime)
- timeZone: (string)
- attributes: (array of object)
Items: items
- name: required(string)
- value: required(string)
- script: (object)
- name: required(string)
- answers: required(array of object)
Items: items
- question: required(string)
- answer: required(string)
Example:
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "Address",
"value": "StreetAddress10"
},
{
"name": "First Name",
"value": "Kathy"
},
{
"name": "Phone1",
"value": "0215428754"
}
]
},
"script": {
"answers": [
{
"answer": "Other",
"question": "If you would now buy a new tennis racket, which of the following brands would you prefer?
},
{
"answer": "yes",
"question": "Would you be interested to visit our store so we can book an expert to introduce you these rackets in more details?"
},
{
"answer": "Within 6 months",
"question": "OK. When do you think you are going to update your racket so we can give you an call to discuss what we can offer at that time?"
}
],
"name": "Tennis Sales Script"
},
"result": "SUCCESS",
"date": "9999-12-31T23:59:59Z",
"dialingMode": "PREDICTIVE",
"lastBNumber": 0,
"callCount": 0,
"modificationDate": "2020-09-29T12:58:28.393Z",
"externalId": "10",
"numbers": "0215428754",
"id": "5C7A1B1A001848B7A86000E10E3B9D5B"
}
delete /campaigns/{campaignId}/customers/{customerId}
Delete the customer.
URI Parameters
- campaignId: required(string)
- customerId: required(string)
Add array of new customers. Note: recommended maximum amount of new customers in a single request is 100. But it can vary depending on the system.
post /campaigns/{campaignId}/customers/list
Add array of new customers. Note: recommended maximum amount of new customers in a single request is 100. But it can vary depending on the system.
URI Parameters
- campaignId: required(string)
Query Parameters
- stopProcessIfInvalidEntriesFound: (boolean - default: false)
If set as true and validation of any of the customers fails, no customer is added to the campaign
Example:
stopProcessIfInvalidEntriesFound=true
Body
Media type: application/json
Type: array of object
Items: new customer
- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- externalId: (string)
If externalId is not given, it is generated by the system.
- numbers: (string)
Customer's phone numbers are listed in priority order and separated with semicolon (;). Customer can have up-to 3 numbers. You can define customer phone numbers either by using this field, or by specifying as attributes Phone1, Phone2 and Phone3. Note: in the case numbers are given, then the phone attributes are ignored. It is required to provide phone numbers either by this property or by attributes.
- date: (datetime)
- agentId: (string)
- dialingMode: (one of PREVIEW, PREDICTIVE)
- previewTime: (integer)
- priority: (integer)
- timeZone: (string)
- attributes: (array of object)
Attributes of the customer. Note: attributes Phone1, Phone2 and Phone3 are created based on numbers property if that is defined in data. If numbers is not specified, it is mandatory to have at least attribute Phone1.
Items: items
- name: required(string)
- value: required(string)
Example:
[
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "First Name",
"value": "Kathy"
},
{
"name": "Last Name",
"value": "Smith"
}
]
},
"numbers": "+52145200;"
},
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Silver"
},
{
"name": "First Name",
"value": "Bob"
},
{
"name": "Last Name",
"value": "Smith"
}
]
},
"numbers": "+52145201;"
},
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "London"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "First Name",
"value": "John"
},
{
"name": "Last Name",
"value": "Smith"
}
]
},
"numbers": "+52145202;"
},
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "Helsinki"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "First Name",
"value": "Keith"
},
{
"name": "Last Name",
"value": "Smith"
}
]
},
"numbers": "+52145203;"
},
{
"attributes": {
"attribute": [
{
"name": "City",
"value": "New York"
},
{
"name": "Classification",
"value": "Gold"
},
{
"name": "First Name",
"value": "Kate"
},
{
"name": "Last Name",
"value": "Smith"
}
]
},
"numbers": "+52145204;"
}
]
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: items
- statusCode: required(number)
Status code of one customer item. Value is 201 in case the customer was validated and created and 200 if only the validation succeeded but process was stopped. Any other value is error code.
- id: (string)
- error: (string)
Examples:
All customers added:
[{
"statusCode": 201,
"id": "0CED774B58EB4CDCBEE697232C22761B"
}, {
"statusCode": 201,
"id": "26B8737120BF4C5B86DC13719B335AAB"
}, {
"statusCode": 201,
"id": "BF64E255797B4B36B66A778E09C47A19"
}, {
"statusCode": 201,
"id": "EF47982E0F244E189669E25BBFF0445F"
}, {
"statusCode": 201,
"id": "5AB0D9BDD4E84587B85AFE598A70E50F"
}, {
"statusCode": 201,
"id": "EFFD057BE7D44ACF8A2DBFA45A79B46A"
}, {
"statusCode": 201,
"id": "BB979E48ABBB48E1B3DBEFCE2CC80411"
}, {
"statusCode": 201,
"id": "6A9021F8685A44738DE89671B456B528"
}, {
"statusCode": 201,
"id": "5A6D77C61F3943A1A53E39D76130D597"
}, {
"statusCode": 201,
"id": "BBE6C534E2274808BC7A643B339C6194"
}]
Validation failure - stopProcessIfInvalidEntriesFound=false:
[{
"statusCode": 201,
"id": "0BBBE00A20444BA1A6E9615AF40FA7E1"
}, {
"statusCode": 201,
"id": "D11CF178F2A3425EBAEF829FD7E3B008"
}, {
"statusCode": 201,
"id": "35A5A62373434047B6CCC04DB5AF0762"
}, {
"error": "Invalid numbers: '+number;'",
"statusCode": 400
}, {
"statusCode": 201,
"id": "4D6F39E59ADE49C88F56C08633950F2A"
}, {
"statusCode": 201,
"id": "AFE892D30FF7495D846AC3A09ABC9836"
}, {
"statusCode": 201,
"id": "86B7EDE8A2BF4B60A2CD0245D7EE9557"
}, {
"statusCode": 201,
"id": "06BF1776F411471CA3FB6ABD97447D09"
}]
Validation failure - stopProcessIfInvalidEntriesFound=true:
[{
"statusCode": 200
}, {
"statusCode": 200
}, {
"statusCode": 200
}, {
"statusCode": 200
}, {
"statusCode": 200
}, {
"error": "Invalid externalId: 007 : Value is not unique",
"statusCode": 400
}, {
"statusCode": 200
}, {
"error": "Invalid externalId: 007 : Value is not unique",
"statusCode": 400
}, {
"statusCode": 200
}, {
"statusCode": 200
}]
/statistics
Collection of statistics.
Get a list of outbound campaign statistics, grouped by campaignId and agentId.
get /statistics
Get a list of outbound campaign statistics, grouped by campaignId and agentId.
Query Parameters
- startDate: (string)
Include statistics from the given date onward. Hours, minutes, and seconds should be 0 because statistics are cumulated daily, using UTC time.
Example:
startDate=2020-06-29T00:00:00.000Z
- endDate: (string)
Include statistics until the given date. Hours, minutes, and seconds should be 0 because statistics are cumulated daily, using UTC time. To get statistics for one day, give the same value for both startDate and endDate.
Example:
endDate=2020-07-29T00:00:00.000Z
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?, except for ID fields, which must be in id32 or id36 format (GUID).
Valid searchable fields: campaignId, agentIdExample:
campaignId=0B5F41959B1D446FA277B4784167EC2F
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: statistics
- numberOfHandledCustomers: required(integer)
Number of handled customers.
- numberOfCalls: required(integer)
Number of calls.
- numberOfSuccessfulCalls: required(integer)
Number of SUCCESS and REFUSAL calls.
- numberOfRefusalCalls: required(integer)
Number of REFUSAL calls.
- numberOfAmountCalls: required(integer)
Number of calls with amount.
- numberOfSkipCalls: required(integer)
Number of SKIP calls.
- numberOfRejectCalls: required(integer)
Number of AGENT_REJECTED calls.
- numberOfOperLogoutCalls: required(integer)
Number of calls where agent logged out when call was in preview/connected/wrap-up state.
- numberOfNotDialedCalls: required(integer)
Number of calls which were not dialed, for example if number was invalid.
- numberOfHangupCalls: required(integer)
Number of HANGUP calls.
- numberOfAbandonedCalls: required(integer)
Number of ABANDONED calls.
- amount: required(number)
The amount collected from SUCCESS calls.
- loginTime: required(number)
Agent login time in seconds.
- pauseTime: required(number)
Agent pause time in seconds.
- waitTime: required(number)
Agent wait time in seconds.
- previewTime: required(number)
Agent preview time in seconds.
- callTime: required(number)
Agent dialing time in seconds (in preview/progressive campaign).
- talkingTime: required(number)
Agent talking time in seconds.
- wrapTime: required(number)
Agent wrap-up time in seconds.
- numberOfCustomers: required(number)
Number of customers.
- campaignId: required(string - minLength: 32 - maxLength: 32)
Campaign ID.
- campaignName: required(string)
Campaign name.
- agentId: (string - minLength: 32 - maxLength: 32)
Agent ID. Null value means case where dialer handled the customer without agent.
- agentName: (string)
Agent name. Null value means case where dialer handled the customer without agent.
Example:
[
{
"numberOfHandledCustomers": 1,
"numberOfCalls": 1,
"numberOfSuccessfulCalls": 0,
"numberOfRefusalCalls": 0,
"numberOfAmountCalls": 0,
"numberOfSkipCalls": 0,
"numberOfRejectCalls": 0,
"numberOfOperLogoutCalls": 0,
"numberOfNotDialedCalls": 0,
"numberOfHangupCalls": 0,
"numberOfAbandonedCalls": 0,
"amount": 0.0,
"loginTime": 99.195,
"pauseTime": 0.0,
"waitTime": 1.4059999,
"previewTime": 16.444,
"callTime": 0.6630001,
"talkingTime": 0.0,
"wrapTime": 80.682,
"numberOfCustomers": 1,
"campaignId": "E49625CFDF58E311B764005056A7012B",
"campaignName": "Training campaign",
"agentId": "21A144F1824E4C768868D10201608E2E",
"agentName": "Surname, First Name"
}
]