Set interaction status
post
/engagement/api/agent/{fqSiteName}/v1/setInteractionStatus
This operation sets the agent's interaction status.
Request
Supported Media Types
- application/json; charset=utf-8
Path Parameters
-
fqSiteName: string
The fully qualified site name.
Header Parameters
-
X-AID: string
A header element containing the agent account identifier.
-
X-JSESSIONID: string
A header element containing the unique session identifier returned in the create automated agent session call.
The request completed successfully.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.ActivitySignalChangeRequest
Type:
Show Source
object
-
clientId:
integer(int64)
The client identifier.
-
engagementId:
integer(int64)
The unique identifier of the chat engagement.
-
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. -
sequenceNumber(optional):
integer(int64)
The client application defined transaction sequence number.
-
sneakPreview(optional):
string
The text that is displayed in the sneak preview.
-
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.
-
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: 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" ]
The current state of the sneak preview functionality from the end user's perspective. -
timeCreated(optional):
integer(int64)
The time the request was created in milliseconds.
-
visibility(optional):
string
Allowed Values:
[ "NONE", "ALL", "NOT_ENDUSER" ]
The visibility of the request.
Response
Supported Media Types
- application/json; charset=utf-8
200 Response
The request completed successfully.
Root Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.ActivitySignalChangeResponse
Type:
Show Source
object
-
chatActivitySignalChangeResult(optional):
object com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatActivitySignalChangeResult
-
chatSystemError(optional):
object com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
-
clientId(optional):
integer(int64)
The unique identifier of the agent client, created to identify the agent during this agent session.
-
clientIdString(optional):
string
The unique identifier of the agent client in string format, created to identify the agent during this agent session.
-
clientSendTime(optional):
integer(int64)
The time when the client request was received in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sequenceNumber(optional):
integer(int64)
The client application defined transaction sequence number.
-
sequenceNumberString(optional):
string
The client application defined transaction sequence number as a string.
-
serviceFinishTime(optional):
integer(int64)
The time when the chat server completed processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
serviceStartTime(optional):
integer(int64)
The time when the chat server began processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sessionId(optional):
string
The unique identifier of the agent session.
Nested Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatActivitySignalChangeResult
Type:
Show Source
object
-
clientId:
integer(int64)
The client identifier.
-
clientIdString:
string
The client identifier as a string.
-
engagementId:
integer(int64)
The unique identifier of the chat engagement.
-
engagementIdString:
string
The engagement identifier as a string.
-
mode:
string
Allowed Values:
[ "LISTENING", "RESPONDING" ]
The activity signal mode. -
sneakPreview(optional):
string
The sneak preview text.
-
sneakPreviewInterval(optional):
integer(int32)
The sneak preview interval.
-
sneakPreviewState(optional):
string
Allowed Values:
[ "NONE", "ENABLED", "DISABLED", "SITE_UNAVAILABLE", "SERVICE_UNAVAILABLE" ]
The sneak preview state.
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
Type:
Show Source
object
-
errorCondition(optional):
string
The error condition.
-
text(optional):
string
The error text.
-
type(optional):
string
The error type.
400 Response
The validation of the request object failed.
Root Schema : schema
Type:
object
403 Response
The agent 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 set the agent's interaction status during an engagement.
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/setInteractionStatus?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1618317020415, "sequenceNumber" : 14, "engagementId": 642, "clientId": 47, "mode": "RESPONDING", "sneakPreviewState": "ENABLED", "sneakPreviewInterval": 1, "sneakPreview": "Some sneak preview text.", "sneakPreviewFocus": true}'
Request Body Example
The following shows an example of the request body in JSON format.
{ "engagementId": 642, "clientId": 47, "mode": "RESPONDING", "sneakPreviewState": "ENABLED", "sneakPreviewInterval": 1, "sneakPreview": "Some sneak preview text.", "sneakPreviewFocus": true, "timeCreated" :1618317020415, "sequenceNumber" : 13 }
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.
{ "chatActivitySignalChangeResult": { "engagementId": 642, "engagementIdString": "642", "clientId": 47, "clientIdString": "47", "mode": "RESPONDING", "sneakPreviewState": "ENABLED", "sneakPreviewInterval": 1, "sneakPreview": "Some sneak preview text." }, "chatSystemError": null, "clientSendTime": 1621872165581, "serviceStartTime": 1648136115031, "serviceFinishTime": 1648136115059, "sessionId": "node01j9pve9wgs1s2d5yd93qqs6nw0", "clientId": 47, "clientIdString": "47", "sequenceNumber": 13, "sequenceNumberString": "13" }