From Bright Pattern Documentation
(Created page with "<translate> = setStatus = Requests an agent routing state change (with or without a reason code). == Syntax == window.bpspat.api.setStatus(status, reason_code="") For examp...") |
(Updated via BpDeleteTranslateTags script) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
= setStatus = | = setStatus = | ||
− | Requests an agent routing state change (with or without a reason code). | + | 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 this specification's [[Embedded-agent-desktop-sdk-specification/UseCases/ChangeAgentState | Use Cases]] section for ways to use this method. | ||
− | == Syntax == | + | == Request == |
− | window.bpspat.api.setStatus(status, reason_code="") | + | === Syntax === |
+ | window.bpspat.api.setStatus(status,reason_code="") | ||
For example: | For example: | ||
window.bpspat.api.setStatus('READY') | window.bpspat.api.setStatus('READY') | ||
− | == Parameters == | + | === Parameters === |
{|border="1" style="border-collapse:collapse" cellpadding="5" | {|border="1" style="border-collapse:collapse" cellpadding="5" | ||
| '''Parameter''' | | '''Parameter''' | ||
Line 27: | Line 30: | ||
|} | |} | ||
− | == | + | == Response == |
− | + | Empty. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | In response to the request, the agent status is changed. |
Latest revision as of 04:02, 29 May 2024
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 this specification's Use Cases section for ways to use this method.
Request
Syntax
window.bpspat.api.setStatus(status,reason_code="")
For example:
window.bpspat.api.setStatus('READY')
Parameters
Parameter | Data Type | Required/Optional | Description |
status | string | required | Specifies the agent state to be set |
reason_code | number | optional | Specifies the reason for agent state change |
Response
Empty.
In response to the request, the agent status is changed.