Events
The preceding sections, on Hosted Controls and Action Calls, are useful in understanding the out-of-the-box behavior of Live Assist, but they don’t offer much insight into how that behavior could be modified or extended.This will become clearer as we introduce the concept of Events.
Events are what Hosted Controls use to signal to other components that something interesting has occurred.For example, maybe a contact record has finished loading, or an agent has just grabbed a new chat off the queue.Perhaps another Hosted Control would like to take action in response to these occurrences, but Hosted Controls have no direct knowledge of one another; they can, however, communicate by raising Events.
Like Action Calls, an Event must be associated with a Hosted Control - typically, the Hosted Control where something “interesting” occurred.But an Event can also be associated with one or more Action Calls; this is how other components are able to “react” to an event as it happens: Hosted Control A triggers an event, and as a result, we invoke an Action Call on Hosted Control B.
Given this description, we can start to think about extensibility in terms of calling actions in response to events.We will begin this discussion with a list of events that are triggered by Live Assist Hosted Controls.If you have another USD application, simply invoke its action calls in response to Live Assist events, and you have an integration.
But extensibility works both ways: you can also invoke Action Calls on Live Assist Hosted Controls in response to Events triggered by other Hosted Controls.We will also explore how this mechanism is leveraged to create some tight integrations with Live Assist right out of the box.
Live Assist Events
Chat Activity
Name |
Description |
Result Actions |
---|---|---|
ActiveClosed |
Invoked when the Chat Activity Hosted Control is closed |
|
BrowserDocument Complete |
Invoked when the Chat Activity page has finished loading |
|
PageLoadComplete |
Invoked any time a frame within the Chat Activity page has loaded |
|
PopupRouted |
Invoked after the Chat Activity window has been routed using a window navigation rule |
|
RefreshRequested |
Invoked whenever a refresh is requested on the Chat Activity page |
|
Saved |
Invoked whenever a Chat Activity record is saved |
Chat Context
Name |
Description |
Result Actions |
BrowserDocument Complete |
Invoked when the Chat Context page has finished loading |
|
PopupRouted |
Invoked after the Chat Activity window has been routed using a window navigation rule |
Chat Control
Name |
Description |
Result Actions |
BrowserDocument Complete |
Invoked when the Chat Context page has finished loading |
|
PopupRouted |
Invoked after the Chat Activity window has been routed using a window navigation rule |
|
NotifyNoVisitorQueued |
Invoked to remove the notification for visitors queued |
|
NotifyVisitorMessageReceived |
Invoked to show notification for a new message received. | |
NotifyVisitorQueued |
Invoked to show notification for a new chat queued. | |
EngagementAttributesAvailable |
Invoked whenever a new chat is accepted in USD and this will contain the engagement attribute data in JSON string format. |
Chat Search Page
Name |
Description |
Result Actions |
ActiveClosed |
Invoked when the Chat Search Page Hosted Control is closed |
|
BrowserDocument Complete |
Invoked when the Chat Search Page has finished loading |
|
PageLoadComplete |
Invoked any time a frame within the Chat Search Page has loaded |
|
PopupRouted |
Invoked after the Chat Search Page window has been routed using a window navigation rule |
|
RefreshRequested |
Invoked whenever a refresh is requested on the Chat Search Page |
|
Saved |
Invoked whenever a Chat Search is saved |
Co-browse Control
Name |
Description |
Result Actions |
BrowserDocument Complete |
Invoked when the Cobrowse Control page has finished loading |
|
PopupRouted |
Invoked after the Co-browse Control window has been routed using a window navigation rule |
Presence Control
Name |
Description |
Result Actions |
PopupRouted |
Invoked after the Co-browse Control window has been routed using a window navigation rule |
Other Interesting Events
One way to extend the Live Assist application is to listen for events triggered by Live Assist components, and take action accordingly.This approach also works in the opposite direction: you can listen for events triggered by other components, and invoke actions on Live Assist objects.For example, you may wish to associate action calls with one (or all) of the events listed below.
Name |
Hosted Control |
Result Actions |
Description |
DesktopReady |
CRM Global Manager |
|
Invoked after all the initialization is complete during the agent desktop startup. This event is invoked only once at the agent desktop startup, and you could use this event to set themes and do other startup actions. |
SessionNew |
CRM Global Manager |
|
Invoked when a new session is created. |
BrowserDocument Complete |
Dashboard |
|
Invoked when the Dashboard has finished loading |
Advanced: Finding More Events
Within you Dynamics 365 CRM you can view the complete list of Active Events.
If you Select: Settings > Unified Service Desk > Events you can review all the registered Events:
If you click on an event, you can see specifics parameters of each Event:
Using Events and Actions
Many of the workflows you see in the USD happen as a result of chaining events and actions: one component triggers an event, which results in an action call, which triggers further events, and so on.In fact, by piecing together some of the events and actions listed above, you can understand what happens when an agent grabs an authenticated chat.
The act of clicking on “Grab a Chat” results in 3 Action Calls on the Chat Hosted Control:
- Chat Session Switch
- Opening New Chat
- Chat Activity Created
The last of these, Chat Activity Created, results in no further events, but the other two action calls start the “Event Chains” described below.The first chain sets up a USD session, and the second one initiates the chat conversation.
Chat Session Switch
Event |
Hosted Control |
Actions |
Chat Session Switch |
Chat Control |
|
Session New |
CRM Global Manager |
|
Opening New Chat
Event |
Hosted Control |
Actions |
Opening New Chat |
Chat Control |
|
Chat Session Created |
Chat Control |
|
Browser Document Complete |
Contact |
|
Save for the first Action Call listed above, Invoke Chat Action Call, the other actions take place in the new USD session that was created in the previous “Event Chain”.
Summary
The Unified Service Desk (USD) is comprised of Hosted Controls, Action Calls, and Events.Live Assist delivers several of each “out of the box”, but you can extend the functionality of Live Assist in one of two ways:
- Invoke your own Action Calls in response to Live Assist Events.
- Invoke Live Assist Action Calls in response to your own Events.