Request Chat

This method initiates a chat session. It provides values of all or some of the expected parameters, and it may also contain the phone number of the mobile device. Depending on the scenario entry configuration, a callback can be initiated automatically to the specified number as soon as the chat request is delivered to the agent.

Notes:

  • The Request Chat method may return the ID and parameters of an existing chat session if there are any currently existing chat sessions associated with this specific client. For example, the client app created a chat session, which was then closed or crashed, then restarted before the session timed out on the server.
  • The is_new_chat response attribute is specified if the chat is a new session or existing session. The client application will handle these differently (e.g., if in an existing session the app may request session history and show the previous content.
  • If the associated mobile/web scenario entry is not configured for automatic callback, the agent can still use this number to call the mobile user manually, either upon the agent's own initiative or when asked to do this via a chat message from the mobile user.
  • The parameter from may be used to specify either the device owner’s name or phone number. It will be placed in the scenario variable $(item.from).
  • Parameters returned in the parameters attribute are propagated into the scenario variable $(item.externalChatData).
  • Optionally, Estimated Wait time (EWT) (in seconds) may be returned but could be missing if the server does not have enough data to estimate the EWT value. This might be important for the clients with strict JSON serialization (i.e., the client app may fail deserializing the JSON if the attribute is missing).

Returns

CodeDescription
200Chat session properties (content type: application/json)

Errors

CodeDescription
403Forbidden
503Service Unavailable
Language
Credentials
Bearer
Click Try It! to start a request and see the response here!