Start Web Callback Interface
This interface is used to initiate a web callback, which first calls the customer and then calls the customer service agent (considered as an incoming call).
Request Method
POST /callcenter/web_callback
Request Parameters
Parameter Name | Required | Type | Description | Limitation |
---|
from_number | Yes | String | Caller number (customer number) | |
to_number | Yes | String | Called number (relay number) | |
variables | No | JSON | Custom variables (can be used in the intelligent routing ivr path as variables, and the value of variables can only be strings or numbers) | |
Return Results
Attribute Name | Type | Description |
---|
code | Integer | Execution result code 1000 # represents success |
Example
curl https://demo.udesk.cn/open_api_v1/callcenter/web_callback?email=admin@udesk.cn×tamp=1494474404&sign=6892f1b794071c260e1b1eac15df588fc919c9e86eb742affaa742ad6c03cb52&nonce=2d931510-d99f-494a-8c67-87feb05e1594&sign_version=v2 \
-X POST \
-H 'content-type:application/json' \
-d '
{
"from_number": "13666666666",
"to_number": "01086465040",
"variables": {
"key1": 123,
"key2": "13200000000"
}
} '
Return
{
"code": 1000
}
Get Call Center Relay Number List
This interface is used to obtain the list of relay numbers for the call center.
Request Method
GET /callcenter/callout_number_list
Request Parameters
Parameter Name | Required | Type | Description | Limitation |
---|
page | No | Integer | Page number, starting from 1, default is 1 | |
per_page | No | Integer | Number of items per page, default 10, maximum 100 | |
Return Results
Attribute Name | Type | Description |
---|
code | Integer | Execution result code, 1000 represents success |
items | Array | Number list, see Data Structure-Relay Number for details |
meta | Object | Pagination information, see Common Data |
Example
curl https://demo.udesk.cn/open_api_v1/callcenter/callout_number_list?email=admin@udesk.cn×tamp=1494474404&sign=6892f1b794071c260e1b1eac15df588fc919c9e86eb742affaa742ad6c03cb52&nonce=2d931510-d99f-494a-8c67-87feb05e1594&sign_version=v2
Return
{
"code": 1000,
"items": [
{
"id": 1,
"number": "01086465044",
"name": "Demo",
"memo": "Memo",
"type": null,
"province": "New York",
"supplier": null,
"pstn": null,
"call_limit": 10
},
{
"id": 2,
"number": "66666666",
"name": "fakenumber",
"memo": "fake",
"type": null,
"province": null,
"supplier": null,
"pstn": null,
"call_limit": 10
},
{
"id": 3,
"number": "05712620039",
"name": "udesk number ·",
"memo": "demo·",
"type": null,
"province": null,
"supplier": null,
"pstn": null,
"call_limit": 10
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"total_records": 3
}
}
Get Customer Service Call Center Status
This interface is used to obtain the status of the customer service call center.
Request Method
GET /callcenter/agent_state
Request Parameters
Parameter Name | Required | Type | Description |
---|
agent_email | Yes | String | Customer service email |
Return Results
Attribute Name | Type | Description |
---|
code | Integer | Execution result code, 1000 represents success |
agent_work_state | String | Customer service online status Value explanation |
agent_call_state | String | Customer service call status Value explanation |
agent_work_state_des | String | Chinese description of customer service call status |
Example
curl https://demo.udesk.cn/open_api_v1/callcenter/agent_state?agent_email=agent@udesk.cn&email=admin@udesk.cn×tamp=1494474404&sign=6892f1b794071c260e1b1eac15df588fc919c9e86eb742affaa742ad6c03cb52&nonce=2d931510-d99f-494a-8c67-87feb05e1594&sign_version=v2
Return Results
{
"agent_work_state": "resting",
"agent_call_state": "ring",
"agent_work_state_des": "Lunch break",
"code": 1000
}
Set Customer Service Call Center Status
This interface is used to set the status of the customer service call center.
Request Method
POST /callcenter/agent_state
Request Parameters
Parameter Name | Required | Type | Description |
---|
agent_email | Yes | String | Customer service email |
agent_work_state | Yes | String | Customer service online status Value explanation |
Return Results
Attribute Name | Type | Description |
---|
code | Integer | Execution result code, 1000 represents success |
Example
curl https://demo.udesk.cn/open_api_v1/callcenter/agent_state?email=admin@udesk.cn×tamp=1494474404&sign=6892f1b794071c260e1b1eac15df588fc919c9e86eb742affaa742ad6c03cb52&nonce=2d931510-d99f-494a-8c67-87feb05e1594&sign_version=v2
-X POST
-H 'content-type: application/json'
-d '{
"agent_email": "agent@udesk.cn",
"agent_work_state": "idle"
}'
Return Results
{
"code": 1000
}
Data Structure-Relay Number
Attribute | Description | Example | Type |
---|
id | Number ID | 1 | Integer |
number | Number | '01086465044' | String |
name | Number Name | 'udesk number' | String |
memo | Number Memo | 'test number' | String |
type | Number Type | "udesk" | String |
province | Province | "Beijing" | String |
supplier | Supplier | "udesk" | String |
pstn | Operator | "cmcc" | String |
call_limit | Concurrency Limit | 100 | Integer |
pstn Value Explanation
Value | Chinese Name |
---|
cmcc | China Mobile |
unicom | China Unicom |
telecom | China Telecom |
type Value Explanation
Value | Chinese Name |
---|
udesk | udesk Number |
no_udesk | Non-udesk Number |
agent_work_state Value Explanation
Value | Chinese Name |
---|
offline | Offline |
idle | Idle |
busy | Busy |
resting | Resting |
neaten | Neatening |
Customized break status code | Custom Break Status Code |
agent_call_state Value Explanation
Value | Chinese Name |
---|
off | Not in call |
ring | Ringing |
in | In call |