From Bright Pattern Documentation
Jump to: navigation, search
(Updated via BpDeleteTranslateTags script)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
<translate>
+
 
 
= setStatus =
 
= setStatus =
 
Requests an agent routing state change (with or without a reason code). setStatus uses a callback function with command CHANGE_STATE to set the agent state and reason.
 
Requests an agent routing state change (with or without a reason code). setStatus uses a callback function with command CHANGE_STATE to set the agent state and reason.
Line 9: Line 9:
 
== Request ==
 
== Request ==
 
=== Syntax ===
 
=== Syntax ===
  window.bpspat.api.setStatus(status,reason_code="")
+
  window.bpspat.api.setStatus('status', 'reason')
  
 
For example:
 
For example:
  window.bpspat.api.setStatus('READY')
+
  window.bpspat.api.setStatus('NOT_READY', 'Lunch')
  
 
=== Parameters ===
 
=== Parameters ===
Line 24: Line 24:
 
| string
 
| string
 
| required
 
| required
| Specifies the agent state to be set
+
| The agent state to be set
 
|-
 
|-
| reason_code
+
| reason
| number
+
| string
 
| optional
 
| optional
| Specifies the reason for agent state change
+
| The reason for agent state change
 
|}
 
|}
  
 
== Response ==
 
== Response ==
Empty.
+
Empty. In response to the request, the agent status is changed.
 
 
In response to the request, the agent status is changed.
 
 
 
 
 
 
 
  
</translate>
+
To get a response object, use method [[Embedded-agent-desktop-api-specification/Methods/getState |  getState]].

Latest revision as of 04:02, 29 May 2024

• 5.19 • 5.3 • 5.8


setStatus

Requests an agent routing state change (with or without a reason code). setStatus uses a callback function with command CHANGE_STATE to set the agent state and reason.

Note that the agent must be logged in to Agent Desktop in order to use setStatus.

See the Embedded Agent Desktop Specification's Use Cases section for ways to use this method.

Request

Syntax

window.bpspat.api.setStatus('status', 'reason')

For example:

window.bpspat.api.setStatus('NOT_READY', 'Lunch')

Parameters

Parameter Data Type Required/Optional Description
status string required The agent state to be set
reason string optional The reason for agent state change

Response

Empty. In response to the request, the agent status is changed.

To get a response object, use method getState.

< Previous | Next >