Tuesday, August 14, 2007

Using Scribe to monitor queues in Microsoft CRM

Recently, we were working on a project, and one of the requirements the client had was to automatically notify the appropriate users when new items entered each of the queues in Microsoft CRM. The purpose was to ensure that the users monitored the queues in a timely fashion, without having to be logged into CRM or having to remember to check the queues every 5 minutes.

I was thinking of having a developer create a Windows service that ran queries against the queue and queueitem tables, determined if any new items had entered the queue since the last time the service ran, and if so, send notifications to the appropriate people for each queue. Each queue would require its own e-mail message and recipients.

However, this solution required custom programming, and we did not have the time or budget to go this route. Therefore, the only way we could do this was to use workflow rules.

Now, using workflow rules might seem like a good solution...until it's time to implement. Here's the problem we experienced:

Workflow rules are based on a specific entity. In our case, we needed to create similar workflow rules for 6 entities: task, e-mail, fax, phone call, service activity, and case.

So, if we had 6 entities that could be assigned to queues, and we had 5 queues to which these 5 entities could be assigned, that translates into 30 workflow rules! What a royal pain in the rear to create and maintain!

You might think that we could have created workflow rules for the queue entity, and you would be wrong. Queues and queue items are not valid for workflow rules.

Unfortunately, workflow rules were our only option, so that's what we did.

However, since then, I have discovered a much better way.

I just completed my training and certification in Scribe Insight. During the training, I realized that this product could be used to do exactly what our client wanted. Basically, monitor selected queues every 5 minutes. If one or more queue items have entered the queue since the last time the monitoring service ran, then send the appropriate e-mails to the appropriate users.

Here's how to do this using Scribe Insight (click on each image to see an enlarged version):

1. Within the Scribe Console, create a new Collaboration or use an existing Collaboration.

2. For each queue that you want to monitor, create a monitor.

3. Create a source connection to the Microsoft CRM database.
Scribe Monitor - Step 2 - Source Connection





4. Configure the source so it uses a query against the Queue and Queueitem tables. Be sure the Filters tab includes the queue name(s) and the queueitem enteredon field > :LastRunDateTime (variable).
Scribe Monitor - Step 3 - Alert Criteria




Scribe Monitor Filters











5. Set the Monitor Interval (e.g., every 5 minutes)
Scribe Monitor - Step 4 - Monitor Interval







6. Activate the Monitor
Scribe Monitor - Step 5 - Activation






7. Set the Alerting Options
Scribe Monitor - Step 6 - Alerting





8. Assign Items to Queues and Check Alert Log
Scribe Alert Log












That's it! Overall, a very simple process. So if you have 5 queues, you would probably need 5 Scribe monitors. However, this would depend on who is monitoring each queue. If one person is monitoring all 5 queues, you could get away with just one Scribe monitor.

Questions? Thoughts? Suggestions? Please post a comment.

9 comments:

Anonymous said...

Nice one bro...

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Suprised you didn't take it to the point of having the alert e-mail the appropiate person. Scribe does have that as an option. We have set up customers with that configuraiton.

I do love Scribe.

Michael Cross said...

Pierre,

Good point. In retrospect, I think I should have covered that option. I simply just skipped it. Maybe I'll cover this in a separate blog post.

Thanks for commenting!

Michael Cross
Microsoft Dynamics CRM Consultant

http://www.navint.com
http://navintmicrosoftcrm.blogspot.com/

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Nice pictorial presentation... thanks for sharing...

Anonymous said...

how did u create the workflow rules initially in crm before using scribe? I am faced with the same dilemma and i dont have scribe as an option

Michael Cross said...

Unfortunately, I never figured out a supported way using workflow. There are widgets available that you can install on a user's desktop that will notify the user, but the widgets do not use workflow.

I'm sure you can create a custom application using .NET programming, as well.