Loading...

Obtaining Time Spent Hours on Cases for an Entitlement (Dynamics 365 Customer Service)

Obtaining Time Spent Hours on Cases for an Entitlement (Dynamics 365 Customer Service)
Featured image of post Obtaining Time Spent Hours on Cases for an Entitlement (Dynamics 365 Customer Service)

The partner consultancy I run, SOLO Cloud Solutions, uses Dynamics 365 Customer Engagement as our internal CRM system to manage potential sales opportunities and customer caseloads. I’m a firm believer in “eating your own dog food” when it comes to the technology solutions our organisation supports and, by ensuring we use the very same tools we are proponents of to our end customers, we can best understand the benefits and, sometimes, frustrations that come with these systems and, all being well, appear credible to our end customers when recommending a particular solution to adopt. With this in mind, our business can benefit significantly on the one hand - by leveraging features such as Entitlements or SLA’s to ensure we can keep track and respond quickly to our customer’s needs - and, on occasion, grapple with issues and frustrations on the other hand. This reality doesn’t distract from my real favour for Dynamics 365 as a business solution; it’s just a natural expectation of any software system a business chooses to adopt. 😉

To illustrate this point more plainly, let me share a real frustration we faced involving the system and how we got around it. For some of our customers, we track the number of hours we consume on each Case via an Entitlement. These Cases can cover two types of issues:

  1. Break/Fix where the solution isn’t working due to a fault on our side or via Microsoft. Our support agents will typically pick these up and work through to resolution.
  2. Enhancement or change requests requiring a modification to an existing solution. In all cases, these will be passed along to an appropriate consultant (maybe even me!) to progress and implement accordingly.

Under the support agreements, we do not typically deduct/consume hours for issues where the system has broken. As we have dedicated colleagues to handle support issues, this is “soaked up” as part of our support agreement. We only then need to potentially charge, track and (potentially) invoice the customer for work that sits outside of this and, typically, requires the expertise of a trained consultant to satisfy. So, for the latter scenario, colleagues logging Cases in the system need to press the appropriate Do Not Decrement Entitlement button to ensure hours are not deducted from the Entitlement:

So far, so good - all of this is native functionality in the application and an absolute doddle to set up. Things start getting a bit trickier when we need to report back to customers on how we’ve consumed hours for both scenarios. Scenario 2) presents little difficulty in obtaining, but 1) proves, as far as I know (answers on a postcard if you disagree), more irksome generate. However, as they say, where there is a will, there’s a way. 😁 Using a bit of FetchXML wizardry, we can look to construct a query similar to the one below to generate the information we need for both scenarios, with a clear flag field to indicate whether the hours fit into scenario 1) or 2):

<fetch aggregate="true">
  <entity name="incidentresolution">
    <attribute name="totaltimespent" alias="incidentresolutionsum" aggregate="max" />
    <link-entity name="activitypointer" from="activityid" to="activityid" link-type="inner">
      <link-entity name="incident" from="incidentid" to="regardingobjectid" link-type="inner" alias="incident">
        <attribute name="incidentid" alias="incidentid" groupby="true" />
        <attribute name="decremententitlementterm" alias="decremententitlementterm" groupby="true" />
        <filter>
          <condition attribute="entitlementid" operator="eq" value="094b0dcc-df24-ec11-b6e6-000d3a0cb337">
            <value>094b0dcc-df24-ec11-b6e6-000d3a0cb337</value>
          </condition>
        </filter>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

Using arguably the best XrmToolBox app, we can then get a result back that looks like this:

From there, we can then sum up all of the True values to determine the hours consumed for scenario 2); everything else will be a break/fix issue.

Now, there’s a couple of things to remember with this solution:

  • You will need to update the value used in the entitlementid condition to match your environment and Entitlement…in case that wasn’t obvious. 😀
  • It’s expected we always associate a Case to an appropriate Entitlement for the customer. This has the benefit of ensuring that we can always tag the correct SLA. For reporting purposes, this also provides a common attribute for us to filter on for each period we are concerned with (for us, we typically have an Entitlement per calendar quarter for each customer).
  • Our primary table used is the incidentresolution table, which indicates we’ve resolved the Case. We then implement grouping and aggregation to return the maximum totaltimespent value from this, representing the actual amount of time spent on the Case and accounting for any scenarios where the Case may have been re-opened.
  • For this approach to work, we instruct our agents to raise and close Tasks, via the Timeline control, on the Case row for all actions they perform, recording the amount of time it takes to complete each one in the process. This ensures that the time rolls up correctly when the Case is closed.

But apart from that, this solution works well for our purposes and makes it quick and easy to generate the information we need during our quarterly reviews with customers. As stated, it’s a shame that we have to revert to a more complex query to get this information, but I’m willing to admit that our particular scenario may be somewhat niche. Hopefully, if you’ve found yourself in the same boat from a requirements standpoint, then this approach will help you as well. And it goes a long way to proving the point over the potential versatility of the Dynamics 365 Customer Service application. Provided, of course, you know what you’re doing… 😅

Published on:

Learn more
The CRM Chap
The CRM Chap

Anything and everything to do with the #PowerPlatform, #MSDYN365, #Azure and more!

Share post:

Related posts

How to give permissions to Power BI reports to view from Dynamics 365 Customer Service

Hello Everyone,Today I am going to show how to manage access to Power BI Reports which are published on the Dynamics 365 Customer Service.Let'...

4 days ago

Interview Questions and Answers Dynamics 365 CE and Power Platform – Ultimate Guide

In today's business landscape, Dynamics 365 Customer Engagement (CE) and the Power Platform have emerged as game-changing tools that have tran...

12 days ago

{Do you know} Get automatic prompts from Copilot on Dynamics 365 Customer Service

This post highlights how Dynamics 365 Customer Service can get automatic prompts from Copilot, improving customer service interactions. Copilo...

14 days ago

{How to} Customize how records are sorted in the Dynamics 365 Customer Service inbox

If you're looking to customize how records are sorted in the Dynamics 365 Customer Service inbox, this tutorial can guide you through the proc...

15 days ago

{How to} Bring your own entity into the inbox on Dynamics 365 Customer Service

In this post, Malla Reddy Gurram (@UK365GUY) provides a step-by-step guide on how to bring your own entity into the inbox on Dynamics 365 Cust...

16 days ago

{How to} Enable Customer support swarming(preview) on Dynamics 365 Customer Service Hub

If you want to enable customer support swarming (preview) on Dynamics 365 Customer Service Hub, this tutorial is perfect for you. The author p...

16 days ago

Back to Basics # 72: Limit Special Characters Using a Webresource in Dynamics CRM

Recently we got a requirement to restrict user to enter special characters. Step 1 : Use the below method for restricting special characters S...

21 days ago

{Do you know} Implement Anywhere365 Solution for Omnichannel features on Microsoft Dynamics 365 Customer Service and Microsoft Teams

Hello Everyone,Today I am going to share my experience on the Anywhere365 Solution which is useful for Omnichannel Feature implementation on D...

26 days ago

{How to} Use Copilot to generate knowledge drafts from cases in Dynamics 365 Customer Service

In this informative post, you'll learn how to leverage Copilot in Dynamics 365 Customer Service to create knowledge drafts from cases. Copilot...

1 month ago

20 Most commonly used JavaScript Scenarios with Sample code Snippet in Form Script Dataverse/ Dynamics 365 CE

JavaScript is a powerful tool for developers working with Dataverse (formerly known as Common Data Service) and Dynamics 365 Customer Engageme...

1 month ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy