How To Generate Short-Codes Consumer Side (quick version)


The short-code service enables you to easily implement a work-flow to escalate to co-browse sessions!

The gateway is responsible for generating a random code, and ensuring that each code points to a random, unique support session. If you would like to alter the length of the code generated, navigate to Live Assist > General Administration, and change the Short CID Length setting.

Here is an example repository for quickly generating short-codes consumer side. Please note this is not bes practices as ideally you'd want to hide the REST API endpoint server-side, but this is the quickest way to get up and running with shortcodes.


  1. The consumer & agent are likely already in a communication channel. This could be an IM chat, normal phone call, a call managed by the Client SDK or some other means of conversation!
  2. The decision is made to co-browse, and so the agent directs the consumer how to initiate things from their side. The exact process will be down to your implementation, but probably involves some button or link being clicked.
  3. Event triggers the consumer-side JavaScript code to send an HTTP PUT request to the gateway. The gateway responds with JSON payload in the 200 OK, detailing the generated short code.
  4. The consumer-side JavaScript immediately sends this code back to the gateway, encoded as an HTTP GET parameter. The gateway responds with session configuration data - comprising of a session token and correlation ID.
  5. Consumer-side app initiates the co-browse only session by passing the config received above, through to AssistSDK.startSupport(...).
  6. The consumer-side app presents the code in the UI so the consumer can read it to the agent.
  7. The agent enters the code to their app, which then uses the Assist Agent SDK to join the same session that the consumer has joined.

The key lines of javascript to follow these steps are:


Have more questions? Submit a request