Change activity status
post
/engagement/api/consumer/{fqSiteName}/v1/activity
This operation sends an activity change message to indicate the end user's current activity, such as 'RESPONDING' or 'LISTENING'.
Request
Supported Media Types
- application/json; charset=utf-8
Path Parameters
-
fqSiteName: string
The name of the site returned by the call to establish a session.
Query Parameters
-
pool: string
The pool ID specified in the Establish Sessions response or provided in an RNEngagementConfigurationChangedMessage system message.
Header Parameters
-
SessionId: string
The unique identifier of the consumer session.
The object containing the request information.
Root Schema : com.rightnow.chat.rest.consumer_api.model.requests.v1.PostActivityChangeRequest
Type:
Show Source
object
-
clientRequestTime(optional):
string
The local time of the requesting client in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
clientTransactionId(optional):
integer(int64)
The unique identifier of the client transaction. The value specified in this field is echoed back in the response object. It is used to link requests to responses.
-
mode:
string
Allowed Values:
[ "LISTENING", "RESPONDING" ]
The current activity of the user. When the value is 'LISTENING', it indicates that the end user is listening (not typing). When the value is 'RESPONDING', it indicates that the end user is typing a response. -
sneakPreviewFocus(optional):
boolean
Indicates whether the end user chat is in the agent's focus. If true, then the end user chat is in focus. If false, then the end user chat is not in focus. The default value is false.
-
sneakPreviewText(optional):
string
The text that is displayed in the sneak preview.
Response
Supported Media Types
- application/json; charset=utf-8
200 Response
The request completed successfully.
Root Schema : com.rightnow.chat.rest.consumer_api.model.responses.v1.PostActivityChangeResponse
Type:
Show Source
object
-
clientId(optional):
integer(int64)
The unique identifier of the client.
-
clientIdString(optional):
string
The unique identifier of the client as a String.
-
clientRequestTime(optional):
string
The local time of the requesting client in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
clientTransactionId(optional):
integer(int64)
The unique identifier of the client transaction. The value specified in this field is echoed back in the response object. It is used to link requests to responses.
-
clientTransactionIdString(optional):
string
The unique identifier of the client transaction as a String.
-
engagementId(optional):
integer(int64)
The unique identifier of the chat engagement.
-
engagementIdString(optional):
string
The unique identifier of the chat engagement as a String.
-
mode:
string
Allowed Values:
[ "LISTENING", "RESPONDING" ]
The current activity of the user. When the value is 'LISTENING', it indicates that the end user is listening (not typing). When the value is 'RESPONDING', it indicates that the end user is typing a response. -
serviceFinishTime(optional):
string
The time when the request processing completed in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
serviceStartTime(optional):
string
The time when the request processing started in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sneakPreviewInterval(optional):
integer(int32)
The number of milliseconds that the end user is required to wait between sending sneak preview messages.
-
sneakPreviewState(optional):
string
Allowed Values:
[ "NONE", "ENABLED", "DISABLED", "SITE_UNAVAILABLE", "SERVICE_UNAVAILABLE" ]
The current state of the sneak preview functionality from the end user's perspective.
- NONE: Sneak preview state is not set (or undefined)
- ENABLED: Sneak preview is enabled on the end user interface
- DISABLED: Sneak preview is disabled on the end user interface
- SITE_UNAVAILABLE: Sneak preview is enabled on the end user interface but is disabled for the site
- SERVICE_UNAVAILABLE: Sneak preview is enabled on the end user interface but is disabled globally
-
sneakPreviewText(optional):
string
The text that is displayed in the sneak preview.
400 Response
The validation of the request object failed.
Root Schema : schema
Type:
object
403 Response
The consumer session identifier is unknown.
Root Schema : schema
Type:
object
404 Response
The resource was not found.
Root Schema : schema
Type:
object
500 Response
An error occurred in the chat server while processing the request.
Root Schema : schema
Type:
object
Examples
The following example shows how to send an activity change message by submitting a POST request using cURL:
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/consumer/day119_181100_sql_238h/v1/activity?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'SessionId: 192hyto5qomm8r8rpzzmuzsa6' -d '{"mode":"LISTENING"}'
Request Body Example
The following shows an example of the request body in JSON format.
{ "mode":"LISTENING" }
Response Header Example
The following shows an example of the response header.
Status: 200 OK Content-Type: application/json;charset=utf-8
Response Body Example
The following shows an example of the response body in JSON format.
{ "engagementId": 34, "engagementIdString": "34", "mode": "LISTENING", "sneakPreviewState": "DISABLED", "sneakPreviewInterval": 3000, "sneakPreviewText": null, "clientRequestTime": null, "clientTransactionId": null, "clientTransactionIdString": null, "serviceStartTime": "2018-10-23T13:46:57.709Z", "serviceFinishTime": "2018-10-23T13:46:57.726Z", "clientId": 34, "clientIdString": "34" }