From Bright Pattern Documentation
< 5.19:Embedded-agent-desktop-sdk-specification‎ | Methods
Revision as of 16:55, 4 October 2018 by Tracy (talk | contribs) (Created page with "<translate> = Agent State = Agent State is used to request an agent's state and interaction information, as well as to change an agent's state. Use either the ''getState'' or...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.3 • 5.8

<translate>

Agent State

Agent State is used to request an agent's state and interaction information, as well as to change an agent's state. Use either the getState or setStatus method.

getState

getState can be called any time to request information about an agent's current state and interactions.

Request

window.bpspat.api.getState(callback)

Object-Type

data (JSON)

Response

callback = function(data) {
	data.agent_id: "john.smith";
	data.status: "Not Ready";
	data.reason: "Lunch"
	data.interactions: [ {
		data.item_id: "123123123";
		data.global_id: "asd234asdf234df"
		data.phone_number: "55511122233"
		data.service: "Customer Support"
		data.screenpop_data: "Case: 123123"
		data.attached_data: {a:b, c:d}
		data.service: "Customer Support";
 		}, ...
	]
}

setStatus

Use the setStatus method to request an agent routing state change (with or without a reason code).

Example

window.bpspat.api.setStatus(status, reason_code="")



</translate>

< Previous | Next >