Skip to content

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 agent
To 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
  • available
  • break
  • do_not_disturb
  • not_at_workplace
  • not_at_work
  • unknown
Employee's status
  • available - Available
  • break - On a break
  • do_not_disturb - Do not disturb
  • not_at_workplace - Not at workplace
  • not_at_work - Not at work
  • unknown - Unknown
allowed_in_call_types array no
  • internal
  • external
Types of incoming calls allowed to an employee
  • internal - internal calls to company's employees
  • external - external calls beyond the company
allowed_out_call_types array no
  • internal
  • external
Types of outgoing calls allowed to an employee
  • internal - internal calls to company's employees
  • external - external calls beyond the company
email string no Employee's email
call_recording enum no
  • all - for all calls;
  • in - only incoming calls;
  • out - only outgoing calls;
  • off - switched off
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_types
Default value is "true". Availability for calls
Coach
coach object no Coach for an employee
Depends on the component "trainer"
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 "true" can be set if the parameter "coach_id" is given.
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 "consultant"
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":{

  }
}

List of returning errors

Refer to "List of errors for methods with the verb update"