logo

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 NameRequiredTypeDescriptionLimitation
from_numberYesStringCaller number (customer number)
to_numberYesStringCalled number (relay number)
variablesNoJSONCustom 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 NameTypeDescription
codeIntegerExecution result code
1000 # represents success

Example

curl https://demo.udesk.cn/open_api_v1/callcenter/web_callback?email=admin@udesk.cn&timestamp=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 NameRequiredTypeDescriptionLimitation
pageNoIntegerPage number, starting from 1, default is 1
per_pageNoIntegerNumber of items per page, default 10, maximum 100

Return Results

Attribute NameTypeDescription
codeIntegerExecution result code, 1000 represents success
itemsArrayNumber list, see Data Structure-Relay Number for details
metaObjectPagination information, see Common Data

Example

curl https://demo.udesk.cn/open_api_v1/callcenter/callout_number_list?email=admin@udesk.cn&timestamp=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 NameRequiredTypeDescription
agent_emailYesStringCustomer service email

Return Results

Attribute NameTypeDescription
codeIntegerExecution result code, 1000 represents success
agent_work_stateStringCustomer service online status Value explanation
agent_call_stateStringCustomer service call status Value explanation
agent_work_state_desStringChinese 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&timestamp=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 NameRequiredTypeDescription
agent_emailYesStringCustomer service email
agent_work_stateYesStringCustomer service online status Value explanation

Return Results

Attribute NameTypeDescription
codeIntegerExecution result code, 1000 represents success

Example

curl https://demo.udesk.cn/open_api_v1/callcenter/agent_state?email=admin@udesk.cn&timestamp=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

AttributeDescriptionExampleType
idNumber ID1Integer
numberNumber'01086465044'String
nameNumber Name'udesk number'String
memoNumber Memo'test number'String
typeNumber Type"udesk"String
provinceProvince"Beijing"String
supplierSupplier"udesk"String
pstnOperator"cmcc"String
call_limitConcurrency Limit100Integer

pstn Value Explanation

ValueChinese Name
cmccChina Mobile
unicomChina Unicom
telecomChina Telecom

type Value Explanation

ValueChinese Name
udeskudesk Number
no_udeskNon-udesk Number

agent_work_state Value Explanation

ValueChinese Name
offlineOffline
idleIdle
busyBusy
restingResting
neatenNeatening
Customized break status codeCustom Break Status Code

agent_call_state Value Explanation

ValueChinese Name
offNot in call
ringRinging
inIn call