Updated on 2023-09-27 GMT+08:00

Signing In to the Platform by an Agent

The agent only signs in to the CCS and does not sign in to the media server. Therefore, no license is occupied.

Prerequisites

None

Function

This interface is used by an agent to sign in to the platform. The agent only signs in to the CCS (the voice call function is enabled) and does not sign in to the media server. Therefore, no license is occupied.

Interface Method

The request method must be set to PUT. This interface supports only the PUT method.

URI

https://ip:port/agentgateway/resource/onlineagent/{agentid}/loginex

In the URL, ip indicates the IP address of the CC-Gateway server, and port indicates the HTTPS port number of the CC-Gateway server.

Table 1 Parameter in the URI

No.

Parameter

Data Type

Mandatory (Yes/No)

Description

1

agentid

string

Yes

Agent ID. The value ranges from 101 to 59999.

Method Name in Logs

loginEx

Request Description

  • Message header
    Table 2 Parameter in the request message header

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    Content-Type

    string

    Yes

    Coding mode of the message body. The default value is application/json; charset=UTF-8.

  • Message body
    Table 3 Parameters in the message body

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    password

    string

    Yes

    Agent password. The value can contain a maximum of 32 characters and can be empty.

    2

    phonenum

    string

    No

    Agent phone number. The value can contain a maximum of 24 characters.

    3

    autoanswer

    boolean

    No

    Whether to enable automatic answering. The default value is true.

    4

    autoenteridle

    boolean

    No

    Whether to enter the idle state automatically. The default value is true.

    5

    releasephone

    boolean

    No

    Whether an agent enters the non-always-off-hook state (the phone is hung up after the call ends) after the agent hangs up. The default value is true.

    6

    agenttype

    int

    No

    Type of the agent who signs in. The default value is 4. The options are 4 (PC+phone agent) and 11 (PC+phone video agent).

    7

    status

    int

    No

    Status after an agent signs in. The default value is 4.

    3: busy

    4: idle

    5: wrap-up

    8

    ip

    string

    No

    Agent IP address. The default value is 127.0.0.1 and can contain a maximum of 15 characters. IPv6 addresses are not supported.

    9

    entryIp

    string

    No

    IP address of the gateway to which the agent client application connects.

    10

    phonelinkage

    boolean

    No

    Whether to enable phone linkage (connection and hardphone linkage control).

    The default value is false.

    11

    checkInWebm

    boolean

    No

    Whether to sign in to the WebM media server.

    The default value is true.

    12

    checkInMailm

    boolean

    No

    Whether to sign in to the MailM server.

    The default value is false.

    13

    vcPhoneNumber

    string

    No

    VC number. The value contains a maximum of 24 characters.

    14

    listenStatus

    boolean

    No

    Whether an inspector listens to the sign-in and sign-out operations of an agent.

    The default value is false.

Response Description

Table 4 Parameters in the message body

No.

Parameter

Value Type

Description

1

message

string

Description.

2

retcode

string

Error code. The options are as follows:

  • 0: success
  • Other values: failure

3

result

Map

Object in the returned result after a successful query.

For details about the parameters of this object, see Table 5.

Table 5 Parameter description of result

No.

Parameter

Value Type

Description

3.1

vdnid

string

VDN ID.

3.2

workno

string

Agent ID.

3.3

mediatype

string

Whether the agent successfully signs in to the media server of a specific type. T indicates success and F indicates failure. The three characters indicate CTI Server, WebM, and MailM, respectively. The voice business can be processed only after the agent successfully signs in to the CTI Server. The text chat business can be processed only after the agent successfully signs in to the WebM. Currently, the agent cannot sign in to the MailM.

3.4

loginTime

string

Sign-in time.

3.5

isForceChange

string

Whether to forcibly change the password. If the parameter is set to true, the agent must change the password after sign-in.

NOTE:

The value false may cause security risks. Exercise caution when using this value. The value true is recommended, indicating that the password must be changed upon the next login.

3.6

serverName

string

Cluster name of the CC-Gateway to which an agent signs in.

3.7

timeRemaining

string

Remaining password validity period.

An empty string indicates that the agent password never expires. The value ranges from 0 to 180 days.

NOTE:

An empty string may cause security risks. Exercise caution when using an empty string. A value within the value range is recommended to ensure that the password is changed periodically.

Triggered Event

If the status parameter is set to 3 (busy) during sign-in, the following events are triggered:

  • AgentOther_InService
  • AgentState_Ready
  • AgentState_SetNotReady_Success

If the status parameter is set to 4 (idle) during sign-in, the following events are triggered:

  • AgentOther_InService
  • AgentState_Ready

If the status parameter is set to 5 (wrap-up) during sign-in, the following events are triggered:

  • AgentOther_InService
  • AgentState_Ready
  • AgentState_Work

Error Code

  • 100-001
  • 100-002
  • 100-003
  • 100-004
  • 100-007
  • 100-012
  • 100-015
  • 100-016
  • 110-016
  • 999-001

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter
    {
        "password": "",
        "phonenum": "40038",
        "status": "4",
        "releasephone": "false",
        "agenttype": "4"
    }
  • Response parameter
    {
        "message": "",
        "retcode": "0",
        "result": {
            "vdnid": 1,
            "workno": "291",
            "mediatype": "TTF",
            "loginTime": "1471585949806",
            "isForceChange": "false",
            "serverName": "AgentGateway",
            "timeRemaining": "9"
        }
    }