| Method | update.employees |
|---|---|
| Description | Creating an employee |
| Available to | Agent, Client |
Partial updating is possible. If the data array is updated, the transferred array will completely replace the existing one.
Request parameters
| Name | Type | Required | Valid values | Description |
|---|---|---|---|---|
access_token |
string | yes | Authentication session key | |
id |
number | yes | Unique employee identifier | |
user_id |
number | no | Unique user identifier of the agent client on behalf of which the request is made Is required for the agentTo obtain a list of client users, you must use the method "get.customer_users" |
|
first_name |
string | no | Employee name | |
last_name |
string | yes | Employee last name | |
patronymic |
string | no | Employee's middle name | |
status |
enum | no |
|
The parameter will be removed shortly. Use the status_idparameter instead Employee status
|
status_id |
number | no | Unique status identifier. To get a complete list of statuses, you must use the "get.statuses" method | |
calls_available |
boolean | no | true, false |
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directionsAvailability for calls |
allowed_in_call_types |
array | no |
|
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directionsWhat types of incoming calls are allowed to an employee?
|
in_external_allowed_call_directions |
array | no |
|
What call directions are an employee allowed for incoming external calls?
|
in_internal_allowed_call_directions |
array | no |
|
What call directions are an employee allowed for incoming internal calls?
|
allowed_out_call_types |
array | no |
|
The parameter will be removed shortly. Use the parameters instead: out_external_allowed_call_directions, out_internal_allowed_call_directionsWhat types of outgoing calls are allowed to an employee?
|
out_external_allowed_call_directions |
array | no |
|
What call directions are an employee allowed for outgoing external calls?
|
out_internal_allowed_call_directions |
array | no |
|
What call directions are an employee allowed for outgoing internal calls?
|
email |
string | no | Employee email address | |
call_recording |
enum | no |
|
Call recording status Depends on the component
|
schedule_id |
number | no | Activity graph | |
| Trainer | ||||
coach |
object | no |
Trainer for employeeDepends on the component
|
|
coach_always_enabled |
boolean | no | true, false |
When this option is activated, all incoming calls from the employee will be
be duplicated to his coach.
The |
coach_id |
number | no | Unique trainer identifier | |
| Groups in which the employee belongs | ||||
groups |
array | no | List of unique identifiers of groups in which it belongs employee | |
| Phones | ||||
phone_numbers |
array | yes | 10 pieces | Employee phone list
It is important to understand that when creating a new employee the number may already exist with another employee and if new parameters are passed to the number, they will be We also updated an existing number. |
phone_id |
number | no | Unique employee phone identifier from "get.employees#phone_id"
We indicate this in cases where we want to change an existing number. If we do not specify, then the search is performed by phone number (phone_number): |
|
phone_number |
string | yes | Employee phone number
Update logic: |
|
channels_count |
number | no | From 1 to 150 | Number of lines on the phone |
dial_time |
number | no | From 1 to 100 | Phone dialing time |
status |
enum | no | active, inactive |
Number status. |
| Internal number | ||||
extension |
object | no | Employee internal number | |
extension_phone_number |
string | yes | Maximum length 5 | Extension number |
extension_voice_mail_enabled |
boolean | yes | true, false |
If all numbers specified for this employee in phone list is busy, then the caller will prompted to leave a voice message. |
extension_queue_enabled |
boolean | yes | true, false |
If all numbers specified for this employee in phone list is busy, the caller will be put in a queue to redial the phones in the list and will wait for the first one vacant number. |
| Is the employee a chat operator | ||||
operator |
object | no | Workplace operator Depends on the component |
|
operator_display_name |
string | no | Operator name in chat | |
operator_login |
string | yes | Employee login to enter the Workplace application operator" | |
operator_password |
string | yes | Minimum length 8 | Employee password for logging into the Workplace application operator" |
operator_position_id |
number | no | Employee position in signature | |
operator_offline_message_enabled |
boolean | no | true, false |
Is it allowed to process applications |
operator_invite_to_chat_enabled |
boolean | no | true, false |
Is it allowed to invite to chat |
operator_chat_enabled |
boolean | no | true, false |
Is it allowed to participate in chats with visitors |
operator_sites |
array | no | List of unique site identifiers for which it is available employee | |
JSON request structure```json
{ "jsonrpc":"2.0", "id":"number", "method":"update.employees", "params":{ "access_token":"string", "user_id":"number", "first_name":"string", "last_name":"string", "patronymic":"string", "status": "enum", "calls_available":"boolean", "allowed_in_call_types": "array", "in_external_allowed_call_directions": "array", "in_internal_allowed_call_directions": "array", "allowed_out_call_types": "array", "out_external_allowed_call_directions": "array", "out_internal_allowed_call_directions": "array", "email":"string", "groups":[ "group_id" ], "call_recording":"enum", "schedule_id":"number", "coach":{ "coach_always_enabled":"boolean", "coach_id":"number" }, "phone_numbers":[ { "phone_number":"string", "channels_count":"number", "dial_time":"number", "status":"enum" } ], "extension":{ "extension_phone_number":"string", "extension_voice_mail_enabled":"boolean", "extension_queue_enabled":"boolean" }, "operator":{ "operator_login":"string", "operator_display_name": "string", "operator_password":"string", "operator_position_id":"number", "operator_offline_message_enabled":"boolean", "operator_invite_to_chat_enabled":"boolean", "operator_chat_enabled":"boolean", "operator_sites":[ "site_id" ] } } }
### JSON response structure```json
{
"jsonrpc":"2.0",
"id":"number",
"result":{
}
}
List of returned errors
See the section "List of errors for methods with the update verb"