Grants access to Live Chat system collections. This object is always accessible as a global value in scripts:

const cu = await  System.users.getCurrentUser();
await System.lines.sessions. assignToOperator(cu); 

Hierarchy

  • LinesCollections

Properties

Readonly channels

channels: LineChannels

Channels (messengers).

Readonly clients

clients: LineClients

Clients.

Readonly lines

lines: Lines

Live Chats.

Readonly metrics

metrics: LineMetrics

Metrics.

Readonly sessions

sessions: LineSessions

Sessions.

Methods

getOperatorStatus

  • The method returns an operator’s status.

    Returns one of the values OperatorStatusType:

    const user  = await System.users.getCurrentUser();
    const operatorStatus = await System. lines.getOperatorStatus(user); 
    

    Parameters

    • user: UserItemRef

      User whose status needs to be obtained.

    Returns Promise<OperatorStatusType>

setOperatorStatus

  • The method is used to change an operator’s status.

    Example:

    const user = await System.users.getCurrentUser();
    await System.lines.setOperatorStatus(user, OperatorStatusType.offline); 
    

    Parameters

    Returns Promise<void>