githubEdit

Websocket

Setup

Complete the steps mentioned in the Setup guide.

Use

Use the following code to review conversation message types that you can use with the Aisera Conversation Websocket.

Most other usage details are same as those for the Conversation API.

Sample Requests

You can use the following sample payloads to create requests using websockets with the Conversation Websocket.

  1. Basic Request

{
    "token": "<token>",
    "userId": "<userid>",
    "userEmail": "<userEmail>",
    "channelId": "<channelId>",
    "data": {
        "text": "Contact live agent",
        "sessionVars": {},
        "reqId": "1",
        "isKL": false
    }
}
  1. Interactive Requests

  1. Form Submit Requests

  1. SessionVar Requests

  1. Needs Session History Requests

  1. IsReset Requests

  1. Logout User - Finish Current Session

  1. Go Back

  1. Start Over

Websocket Client Files

Your Aisera team can provide you with a .zip package for a websocket client. If you don't receive the .zip package, you can build one using the following files.

Message Types

Postman Collection

circle-info

Postman Collections for websockets cannot currently be exported. Please refer the screenshots below to setup and test your websocket using Postman.

Websocket request and response
Websocket variables / configurations
Setting up event listeners
Websocket settings

Sample Client Implementation

The ReadMe file in the package will help you configure and run the sample client.

Last updated

Was this helpful?