Update employees
Updating an employee
Method | update.employees |
---|---|
Description | ::Creating employee:: |
Who has access | Agent, Customer |
You can update partially. If a bulk of data is updated, it will replace an existing one.
Parameters of a request
Title | Type | Required | Valid value | Descriprion |
---|---|---|---|---|
access_token |
string | yes | Authentication session key | |
id |
number | yes | Employee's unique ID | |
user_id |
number | no | Unique user ID of a customer or an agent who makes request. Is mandatory for an agentTo get a list of customer users use the method "get.customer_users" |
|
first_name |
string | no | Employee's first name | |
last_name |
string | yes | Employee's last name | |
patronymic |
string | no | Employee's patronymic | |
status |
enum | no |
|
Employee's status
|
allowed_in_call_types |
array | no |
|
Types of incoming calls allowed to an employee
|
allowed_out_call_types |
array | no |
|
Types of outgoing calls allowed to an employee
|
email |
string | no | Employee's email | |
call_recording |
enum | no |
|
Status of call recording Depends on the component "recording" |
schedule_id |
number | no | Activity schedule | |
calls_available |
boolean | no | true , false |
Parameter will be deleted shortly. Instead, use the parameters: allowed_in_call_types, allowed_out_call_typesDefault value is "true" . Availability for calls
|
Coach | ||||
coach |
object | no | Coach for an employee Depends on the component |
|
coach_always_enabled |
boolean | no | true , false |
Default value is "false" . As you enable this option, all emloyee's calls will also be duplicated for his or hers coach.
Value |
coach_id |
number | no | Coach unique ID | |
Groups an employee belongs to | ||||
groups |
array | no | List of unique IDs of groups an employee belongs to. | |
Phone numbers | ||||
phone_numbers |
array | yes | 10 | List of employee's phone number
List of employee's phone numbers.It is important to know that when you create a new employee, his or hers number may already be attributed to another employee. In this case, when new parameters are set for this new number, they will be also updated for the existing number. |
phone_number |
string | yes | Employee's phone number | |
channels_count |
number | no | from 1 to 150 | Number of phone lines |
dial_time |
number | no | from 1 to 100 | Dialing time |
status |
enum | no | active , inactive |
Phone number status. |
Extension number | ||||
extension |
object | no | Employee's extension number | |
extension_phone_number |
string | yes | Maximum lrngth is 5 | Extension number |
extension_voice_mail_enabled |
boolean | yes | true , false |
Default value is "false" .In case all the numbers in an employee's phone numbers list are busy, a caller can leave a voice message. |
extension_queue_enabled |
boolean | no | true , false |
Default value is "false" .In case all the numbers, attributed to an employee in a list, are busy, a caller can get in line for a redial to phone numbers in a list. Than, he or she will wait for the first number to become available. |
Whether an employee is a chat operator or not | ||||
operator |
object | not | Workplace operator Depends on the component |
|
operator_display_name |
string | yes | Operator's name as displayed in chats | |
operator_login |
string | yes | Operator's login for the app "Operator's workplace" | |
operator_password |
string | yes | Maximum length is 8 | Operator's password for the app "Operator's workplace" |
operator_position_id |
number | no | Employee's position | |
operator_offline_message_enabled |
boolean | no | true , false |
Default value is "false" . Authorized to process offline messages or not |
operator_invite_to_chat_enabled |
boolean | no | true , false |
Default value is "false" . Authorized to invite to join chats or not |
operator_chat_enabled |
boolean | no | true , false |
Default value is "true" . Authorized to participate in chats with visitors or not |
operator_sites |
array | no | List of websites unique IDs and addresses that have access to an employee. |
JSON request structure
{
"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",
"allowed_in_call_types": "array",
"allowed_out_call_types": "array",
"email":"string",
"groups":[
"group_id"
],
"call_recording":"enum",
"calls_available":"boolean",
"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 reply structure
{
"jsonrpc":"2.0",
"id":"number",
"result":{
}
}