Many people use workflows in Microsoft Dynamics CRM to trigger and send record-based notifications—for exa/ul>
Many people use workflows in Microsoft Dynamics CRM to trigger and send record-based notifications—for exa/ul>
I want the metric to be a “Count” metric, and I call the metric “No. of Cases.” The goal metric link is typically located in the Sales area of Microsoft Dynamics CRM.
2. Add the rollup field
From the Metric record, select the rollup field grid and click “add new rollup field.”
Select “Actual” for the Rollup Field, Case for the record type. I didn’t select a state or status, because I want to count all cases created, not just a specific status. For date field, select “Created on,” because we want to get a count of all cases created during the goal’s time period.
3. Create the goal
Link the “No. of Cases” metric created in step 1 to the goal in the “Goal Metric” lookup field, then select the desired time period in the “time period” section of the goal form. Set the target to the threshold level at which you wish to be alerted. In our example, I select 3, since I want to be alerted if there are 3 or more cases during the goal period.
Scroll down to the “Goal Criteria” section of the goal form. Set “Record Set for Rollup” to “All.”
Note—this is probably the most common reason why goals don’t rollup as expected—this field defaults to “owned by goal owner,” which will just count records owned by the user who owns the goal. In our example, we changed it to “all,” because we want to count all cases created by all users during the goal time period.
4. Create the Rollup Query
So far we have created a metric which counts the cases created, and a goal which defines the time period during which to count the cases, but we need to do one final thing—we need to create a filter that will filter the rollup to just the type of cases we want to count. In our example, cases, where the priority is “high.”
From the goal record, click the lookup button for “rollup query.” From the lookup dialog, select “new” to create a new rollup filter.
The rollup query allows you to create an advanced find filter that will filter the rollup to a subset of records—in our example, priority = ”High.” Remember, you don’t need to specify date ranges or record statuses in rollup queries—those are specified by he goal and goal metric records.
This also means that if you want to have several goals based on the number of cases, you only need to create one metric, number of cases, and you can associate it with multiple goals with different goal time periods or rollup query filters. This makes goal management easy, as you can reuse all components except for the goal header.
Now that your goal is complete, CRM will automatically calculate the number of cases that meet the criteria that you have specified. This rollup happens by default every 24 hours. You can force the rollup to happen by selecting the goal and clicking the “Recalculate” button in the ribbon.
Now the Goal record will show the total cases during the time period that meet the criteria, as well as the percentage of the target number achieved.
Creating the notification workflow
No “Recalculate” button in the ribbon.
Now the Goal record will show the total cases during the time period that meet the criteria, as well as the percentage of the target number achieved.