USD – Workon / LookupQueteItem Actions

Unified Service Desk (USD) for Dynamics 365 can be used in my many circumstances. One might be answering service requests from your customers, this will commonly involve agents “working” a queue of cases. In this post I will look at a couple of actions that can help in this scenario.

Imagine you are in a service scenario, an agent may select a case from a CRM queue or alternatively may open it directly from a case view. In either scenario, if the case is in a queue we would want to show the current operator as working on that case. So that someone else doesn’t also commence work on the same job. When they complete the case it will be removed from the queue but if they exit the case without resolving it we’d want it to automatically available again in the queue.

There are a couple of USD actions that can help in this situation. WorkOn and LookupQueueItem.

LookupQueueItem allows us to find details of the queue item for the opened record (e.g. case). WorkOn lets us show the current operator as working on that queue item. (We can also use WorkOn to release the queue item.)

To illustrate how these actions might be used let’s look at an example, first of all a quick video. In this video I give an example of how your Unified Service Desk solution might operate.

The steps involved to create the required functionality were ….

I already had the ability to select and open cases from a queue view or simply a case view. Both of these approaches to opening a case were actually from the same hosted control that I’d called “My Work”. To add the queue management functionality demonstrated in my video I followed the steps below;

  1. Create a LookupQueueItem action.
  2. Create a WorkOn action.
  3. Create a WorkOn action to release the queue item.
  4. Alter my window navigation rule, to show I am working on the case.
  5. Alter my SessionClose event, to release the queue item.

Step One – Create a LookupQueueItem action

The first step was to create an action that would look up the Id of the queue item. In my example I only had cases in my queue but obviously a queue can contain many different types of entity. So I wanted to create an action that would work with any entity type, assuming I might want to queue other items at some point.

The result of this action is to create replacement parameters for the details of the queue item. You can then use these later. I have shown the results of running this action in the debugger below. In my example I was trying to get the Id of the queue item. So [[queueitem.Id]].

The action I created is shown below;

Field Details
Name CRM Global Manager – LookupQueueItem
Order 10

The order was significant as later I want to ensure this action executes before my WorkOn action.

Hosted Control CRM Global Manager
Action LookupQueueItem
Data Id=[[$Context.Id]]

Type=[[$Context.LogicalName]]

Basically I am setting the pararmeter Id to the Id of the entity I want to locate in the queue. And type to its type. Such as incident, phonecall etc.

I used $Context as then my change was not linked to a specific entity type.

Step Two – Create a WorkOn action

Now I wanted to use the queue item ID to show that I was working on that item. I have given an example of this below.

Field Details
Name CRM Global Manager – WorkOn
Order 20

The order was significant as later I want to ensure this action executes after my LookupQueueItem action

Hosted Control CRM Global Manager
Action WorkOn
Data Id=[[queueitem.Id]]
Condition “[[queueitem.Id]]”!=””

I added this condition as it will be possible for me to open a case that isn’t in a queue. Having this condition will ensure that situation does not cause a problem.

Step Three – Create a WorkOn action to release the queue item

A further action was required to release the queue item, this will happen if I close the session and the queue item has not been resolved.

Field Details
Name CRM Global Manager – WorkOn (Remove)
Order I didn’t care about the order this time!
Hosted Control CRM Global Manager
Action WorkOn
Data Id=[[queueitem.Id]]

Action=Remove

Condition “[[queueitem.Id]]”!=””

I added this condition as it will be possible for me to open a case that isn’t in a queue. Having this condition will ensure that situation does not cause a problem.

Step Four – Alter my window navigation rule, to show I am working on the case.

I already had a window navigation rule that will open cases from a tab I’d created called “My Work”. This same tab could include a view of the queue(s) that I work with or a list of cases.

Tip: I had similar navigation rules for other entity types that could be opened from my queue item view. Meaning I plan to include those later!

I opened my window navigation rule and opened the “Actions” view from the navigation bar. It was then simply a case of adding the actions we created in step one and two. (Notice their order forces a logical sequence!)

Step Five – Alter my SessionClosed event, to release the queue item.

The final part of my jigsaw was to release the queue item if not resolved. If the case is resolved the queue item will automatically get removed, so I didn’t need to worry about that. But I did want to release the queue item if the session was closed and the case hadn’t been resolved.

On Global Manager, we have an event that is triggered every time a session is closed. So I simply needed to alter that to release the queue item. You can see below that I’ve added my WorkOn (Remove) action to the SessionClosed event.

Hopefully you’ll agree this is a simple configuration and one you can hopefully adapt to how queues are used in your environment.
J

One thought on “USD – Workon / LookupQueteItem Actions

  1. Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s