Omnichannel

Prev Next

With the Rocket.Chat Omnichannel feature, you can talk to your website visitors, regardless of the channel they choose to connect with you.

Omnichannel endpoints are of two types:

  • Endpoints requiring authentication: The workspace admins and managers use the endpoints that require authentication with a login method.

  • Endpoints not requiring authentication: Visitors can use the endpoints that require no authentication. These endpoints require a visitor token, which is like an authentication parameter for visitors. Visitors can register themselves by providing a unique random string as the token, which can be used for similar endpoints.

This section includes the following endpoints:

  • Create and manage livechat users—agents and managers.

  • View agent analytics details.

  • Manage livechat visitors and rooms.

  • View and manage livechat appearance and functionalities such as triggers, business hours, priorities, and canned responses.

The Livechat Widget API allows you to further customize and integrate Livechat widget functionalities.

The livechat room object

Omnichannel conversations happen in livechat rooms. A trimmed example from Get or Create Livechat Rooms:

{
  "room": {
    "_id": "kCJDd5peKiZnGJLPq",
    "fname": "Mary",
    "t": "l",
    "v": {
      "_id": "47Dajwh9DjpnTAugW",
      "username": "guest-165",
      "token": "8s7e9ony6ctl27e1qf8kue",
      "status": "offline"
    },
    "departmentId": "CAJioQNAvLnYWTy8i",
    "open": true,
    "msgs": 7,
    "ts": "2021-07-09T20:12:19.795Z",
    "lm": "2021-07-09T20:20:58.755Z"
  },
  "success": true
}

Fields you use most often:

  • _id: The livechat room ID, passed as rid in most room endpoints.

  • t: The room type — always l for livechat rooms.

  • v: The visitor in the conversation, including the visitor token that authenticates visitor-side calls.

  • departmentId: The department handling the conversation.

  • open: Whether the conversation is still active.

Common workflows

Run a conversation from the visitor side

  1. Register the visitor with a unique token string.

  2. Get or create the livechat room using that token.

  3. Close the room when the conversation ends.

Manage the queue as an agent or manager

  1. List livechat rooms to see open, queued, and on-hold conversations.

  2. Forward a room to another agent or department, or put it on hold.

  3. Update agent status to control availability.

Conventions

  • Visitor-side endpoints authenticate with the visitor token instead of the X-Auth-Token/X-User-Id headers.

  • Agent and manager endpoints require Omnichannel permissions such as view-l-room or the livechat agent and manager roles; each endpoint page lists its requirements.

  • List endpoints support count, offset, and sort query parameters.