From Bright Pattern Documentation
< 5.19:Embedded-agent-desktop-sdk-specification‎ | Events
Revision as of 22:57, 3 October 2018 by Tracy (talk | contribs) (Created page with "<translate> = Agent Status = The Agent Status method is used to request an agent's state and interaction information, as well as to change an agent's state. == getState == ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.3 • 5.8

<translate>

Agent Status

The Agent Status method is used to request an agent's state and interaction information, as well as to change an agent's state.

getState

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

Example

window.bpspat.api.getState(callback)
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 >