From Bright Pattern Documentation
< 5.8:Embedded-agent-desktop-api-specification | Methods
Revision as of 04:13, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
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.