Posts Tagged ‘Goal management’

Microsoft Dynamics CRM 2011 Fiscal Settings and Goal Management

January 19, 2011 Leave a comment

Microsoft Dynamics CRM 4.0 had the capability of defining the fiscal setting for an organization but there was a limitation that this could only be defined once and cannot be modified thereafter. Primarily the fiscal settings were used in CRM 4.0 to set salesperson quotas. In Microsoft Dynamics CRM 2011 the fiscal settings feature is revamped and it now provides user the capability of modifying fiscal settings multiple times. With deprecation of the Quotas in CRM 2011 Goal Management is one of the primary consumers for fiscal settings. This blog post explains how the fiscal periods for the organization can be set and how it interacts with the goal management.

How to configure the fiscal settings for organization

Fiscal settings can be configured by navigating to Settings-> Business Management -> Fiscal Year Settings. The following dialogue provides the options for setting values for fiscal start date, fiscal period type and various display formats. Note that as opposed to CRM 4.0 where the fiscal settings were absent in an organization until set, CRM 2011 defaults fiscal period to quarterly starting January 1. Also the various input options for the fiscal settings are now context dependent which prevents user from entering conflicting values.


Fig: CRM 2011 Fiscal setting dialogue with defaulted values 

Following are the various fields required for organization fiscal settings:

  • Start Date: When the fiscal year is going to start from. This date typically would mark the start of the financial year in sales organization. 
  • Fiscal Period Template: What is the fiscal period type? Possible options are Annually, Semiannually, Quarterly, Monthly, 4- Week period. Once the start date and period type is defined the system can calculate the start and end dates of fiscal periods for various fiscal years.

Fiscal Display options help user to define the display format for various fiscal settings. For example consider the following monthly fiscal settings with Start Date as April 10. Note that we have selected the “Name Based on” value to “End Date” and “Fiscal Period” drop down has the options specific toMonthly fiscal period template.


Fig: Fiscal dialogue having Monthly fiscal period starting 10th April.

Goals and Fiscal settings

Fiscal periods are tied closely to goal management. Sales people usually have the quarterly sales targets, Customer service representatives need to achieve their goals for the case resolutions and so on. When the new Goal form is launched, Goal is defaulted to the current fiscal period automatically. Because for current fiscal period there are fixed start and end dates, the goal start and end dates are also displayed in read only mode.

For example if we have the monthly fiscal settings are per the fig above and user clicks new goal form, following fiscal values are defaulted on goal form (on 31 Dec 2010)


Fig: New goal form defaulting dates to current fiscal period.

FiscalPeriod: December (Based on fiscal period display value “Month Name”)

FiscalYear: FY2011(Based on Prefix:FY, YearFormat:YYYY, NameBasedOn:EndDate(on 31 Dec 2010))

From (Goal Start Date): 12/10/2010 (Based on 4/10/2010 fiscal start date)

To (Goal End Date): 1/9/2010 (Based on Goal Start Date above and monthly fiscal period type)

Updating Fiscal settings for organization

Fiscal settings in MSCRM 2011 can be updated multiple times by using the same fiscal dialogue shown above and hence provides the supports for scenarios arising from mergers/acquisitions , partnership changes, financial restructuring etc. There can be goals existing in the CRM system which are already using the old fiscal settings. To better handle situations arising from fiscal changes which can lead to data inconsistency, MSCRM goal management offers the notification and realignment mechanism. For following examples consider the goal created with fiscal settings for the current (default) fiscal period. FiscalPeriod: December, FiscalYear: FY2011, From (Goal Start Date): 12/10/2010, To (Goal End Date): 1/9/2010.

Case 1: Fiscal period template remains same but the start dates changes:

CRM system administrator moves the fiscal start date ahead by 5 days i.e. from 4/10/2010 to 4/15/2010. In this case the fiscal period template remains the same but the start date has changed. Data in the goal record still retains the old values for all fiscal and date fields. When this goal record is opened the following warning message is displayed on the goal form to notify the fiscal settings change and provides user the option to realign.

Message: “The fiscal settings of your organization have changed since the time this goal was changed. You might want to realign to the new fiscal settings. ”


Fig: Fiscal change warning when the fiscal start date is changed.

Note that the “Align with Fiscal Period” ribbon button is now enabled for this goal record. Clicking this updates the new start and end dates for the goal which is now according to the current (new) fiscal settings. Realignment is optional for the goal manager based on the business need. Note that even after realignment goal fiscal period and year still remain same as there is only the change in the date. Also the warning message is now gone.


Fig: Goal form after the realigning the fiscal period.

Case 2: Fiscal period template changes:

CRM system administrator changes the fiscal period type from monthly to quarterly (3 months). In this case also the existing data is retained as is and there is a warning message on the goal.

Message: “The fiscal settings of your organization have changed since the time this goal was changed. You might want to realign to the new fiscal settings. ”


The goal manager on seeing this warning can either choose to switch to the new quarterly fiscal settings by changing the fiscal period to quarterly as shown in the above figure. Else he can convert this goal into the custom period goal by clicking on the “Goal Period Type” radio button and can retain the goal start and end date and also get rid of the fiscal change warning.

Fiscal settings upgrade

If the fiscal settings are configured for an organization in CRM 4.0 these are retained in CRM 2011 as is, otherwise the fiscal settings are defaulted to quarterly with January 1 as the start date. Additionally the existing CRM 4.0 quotas are also upgraded to CRM 2011 but the new quotas cannot be created as these are deprecated in favor of goal management.


Hemant Gaur


Goal Management: Behind the scenes

November 26, 2010 Leave a comment

What is goal management?

In today’s world, any competitive organization has well defined goals for its members – measurable, and time bound, and with a clear ownership. Goal management in Microsoft Dynamics CRM 2011 lets you set such goals for members in your organization, and also lets you track the progress being made against them. You can set goals with complex queries spanning across multiple records, goal trees spanning organizational hierarchy, monitor their progress on a day-to-day basis, and all this with perfect ease.

So while you are wondering on the immense possibilities in which you can use this feature, our PM buddy Manu has already done a great job summarizing how you can use this feature to cater end-to-end scenarios here.

And now, for those of you, who want to dig deep into this magic vault, and understand what is happening behind the scenes, so that you can build your own applications on top of this, here’s your share of the pie.

Goal Management comprises of four different entities: goal, goal metric, rollup field, and rollup query.

In colloquial language, if you say: In the Quarter 3 of FY2010, Nancy needs to bring in $250000 revenue through opportunities in New York City, this is how this information maps to goal management entities:


I can generalize the above as:

1. Goal:

     a. Who does it?

     b. How much?

     c. In what time?

2. Metric: Is sort of metadata to goal. What is the type of goal you are setting? Types can be

     a. Count: Goal based on number of records. Like number of phone calls made by David.

     b. Amount: Goals based on aggregated amounts which come from some fields in a CRM entity. Like actual revenue. This has three sub types:

          i. Money

          ii. Integers

          iii. Decimals

3. Rollup Field:

     a. The record on which goal is based.

     b. The attribute in the record which contributes towards the target set in the goal

     c. The date type attribute which is compared against the timelines of the goal to decide if a record contributes towards this goal or not.

     d. The value of state/status that the record should have in order to be able to contribute towards a goal.

4. Rollup Query: What all records contribute?

You’ll notice that there’s a slight overlap of “what all records contribute?” between rollup field and rollup query. Here’s my take on it:

If you want your records to be filtered based only on dates, and statecode/statuscode(for example: closed opportunities), then metric will suffice.

Additionally, if you want to consider only those records which are owned by the goal owner, use the ConsiderOnlyGoalOwnersRecords field set to true for this.

But if you ask for anything more than this, while filtering records, you’ll need to use rollup query to define your query. Let’s say, you want to roll up only those opportunities which are in the city of New York, and have estimated revenue greater than $10,000 and are owned by your team, and have the originating lead also owned by your team, all you need to do is: Create a rollup query which has all the above clauses, and associate it to the rollup field you want to use the query for.

Now, that we understand, what each entity is used for, it’s time for some of my developer secrets to be unveiled. Let’s talk about some of the nuances that you need to know while programming for goal:

Goal timelines:

Goals can be of two types: custom period goal and fiscal period goal.

A fiscal period goal’s timelines match the organization’s fiscal settings. For example if the organization’s fiscal period is quarterly, then you can set quarterly goals, and the start dates and end dates of these goals will align with the organization’s quarter start and end date respectively.

If you do not want to use your org’s fiscal settings, then you can choose your own dates by creating a custom period goal.

Goal Metric: Whenever you create a goal, you associate it with a metric. A metric is not just a reference in goal, but it carries its properties: metricType and goalType to the referring goal as well.

Goal Rollup:

Let us first talk about what we mean by goal rollup.

Goal entity has certain fields that we use to indicate the progress made against the goal. The gathering of this data is termed as rollup.

A goal rollup is a two phase process:

1. For each individual goal, queries are performed based on the rollup fields they are associated with, and aggregates are updated in the goal.

Let’s run this through an example:

We’ll use the out-of-box metric: Revenue for this purpose.

Let’s take the same goal for Nancy that uses the Revenue metric as an example.

If you open Revenue, it has two rollup fields:


So a rollup on Nancy’s goal above will result in two aggregate queries on opportunities:

The Actual(money) field will be updated with an aggregate for Actual Revenue of all opportunities closed as won in Q3 FY20101 in New York.

The In-Progress(Money) field will be updated with an aggregate for Est. Revenue of all opportunities active in Q3 FY2010 in New York.

2. A goal can have one or more child goals, and hence you can create trees of goals to represent goals for an organizational hierarchy. In such scenarios, a child goal contributes towards a parent goal. Let’s say, Nancy reports to David, and David to Kevin. So we have the following hierarchy:

Kevin-> David->Nancy

Hence Nancy’s goal contributes towards David’s, and David’s goal in turn contributes towards Kevin’s goal.

So in the second phase, the child goal’s contribution is rolled up to the parent goal, all the way up to the root goal of the goal tree.

Rollup only from child goals field:

While creating a goal, you can choose not to roll up any data from participating records into the goal. The rollup fields in this case will contain data aggregated only from the child goals. So the step 1 in goal rollup section above will not be executed for this goal.

When does goal rollup happen?

Goal rollup has two modes: asynchronous and synchronous.

There’s a recurring async job that performs the rollup with a frequency configurable in organization settings.

Also, there’s a Recalculate button that you can use to do the rollup for a specific goal tree on an on-demand basis.

Goal targets:

You set a target in a goal. The target can be one of the three types: money, decimal, integer, and hence we have the following target fields respectively:

1. targetmoney

2. targetdecimal

3. targetinteger

Based on the metric you are referring, you will use only one of these at any given point of time.

Goal Rollup Fields:

In order to measure how the goal owner is doing, we have a set of rollup fields: Actuals, In-Progress, and Custom.

Actuals – This indicates the actual amounts achieved so far. Example, in case of revenue goals, this can indicate all opportunities closed as won.

In Progress – This is an indicator of the amounts you expect to achieve. Example, in case of revenue goals, this can indicate all open opportunities.

Custom – In case you need to track anything else as a performance indicator, you can use this field. For example, for revenue goals, you have two indicators: open opportunities with rating = hot strongly indicate potential revenue, while those with rating = warm indicate potential revenue, but much less likely than the former. In this case, you can use the In-Progress field for one, and the custom rollup field for another case.

Each of these is again of the three type variants. So we get the matrix:

  Money Integer Decimal
Actual ActualMoney ActualInteger ActualDecimal
In Progress InProgressMoney InProgressInteger InProgressDecimal
Custom CustomRollupFieldMoney CustomRollupFieldInteger CustomRollupFieldDecimal


Once you select a metric, which has one or more rollup fields, mapping to actual, in progress or custom rollup fields in goal, then while working on goal entity, you should use the respective field from rollup field, and respective type from the metric’s goal type.

Rollup Queries:

Again, based on the metric’s goal type, you’ll have a rollup query for your actual, in-progress, and custom rollup fields. Following is the table mapping for rollup query lookup fields and goal’s rollup fields:

Rollup Query Lookup
Goal Rollup Field
RollupQueryActualIntegerId ActualInteger
RollupQueryActualDecimalId ActualDecimal
RollupQueryActualMoneyId ActualMoney
RollUpQueryInprogressIntegerId InProgressInteger
RollUpQueryInprogressDecimalId InProgressDecimal
RollUpQueryInprogressMoneyId InProgressMoney
RollUpQueryCustomIntegerId CustomRollupFieldInteger
RollUpQueryCustomDecimalId CustomRollupFieldDecimal
RollUpQueryCustomMoneyId CustomRollupField


Based on your metric’s goal type again, there will be at max three rollup queries in use at any given point.

Auto-computed Attributes:

A set of auto calculated fields have been provided for making your life easy:

Field Name
ComputedTargetAsOfTodayMoney Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is a money type goal.

ComputedTargetAsOfTodayDecimal Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is a decimal type goal.

ComputedTargetAsOfTodayInteger Indicates what should be the actual target value as of today based on the target value and the goal’s start date.

Used when goal is an integer type goal.

ComputedTargetAsOfTodayPercentageAchieved Indicates what percentage of the target should the actual be as of today based on the target value and the goal’s start date.
Percentage Indicates what is the actual achieved percentage of the goal against the target.

Uses target and actual fields to compute this.


Overriding goal rollups:

In normal course of things, goal rollups happen in background with a fixed frequency and the rollup fields are updated by the rollup job. However, if you explicitly want to override what the rollup job has calculated for the rollup fields, you can set the isoverride, and isoverridden fields = true and update the rollup fields.

If you set isoverridden to false, then the next rollup on that goal will overwrite these values with calculated values again.

Please note that you can do this only using SDK. The UI does not allow you to do this.

Goal owner vs goal manager: Looking at goal SDK, you’ll find two attributes: goalownerid, and ownerid. Goalownerid stands for the person/team for which the goal is being set. Ownerid is in traditional sense the CRM owner of the record, but since in real life scenarios, a manager governs her reportees goals, hence ownerid is named as Manager in the UI.

A goal rollup always happens in the context of goal’s manager.

Goal trees:

In a given goal tree, the following attributes will be same across the tree:

1. Goalperiodtype

2. Goalstartdate/goalenddate

3. Goalmetric

Goal currency: A goal’s currency is defaulted to organization’s currency, and is not valid for update.

Recalculate message: Goal rollup can be done synchronously using the Recalculate message. A recalculate for a goal will recalculate the entire goal tree. For code samples, you can refer to the SDK documentation.

By now you have enough insights to get started with goal management in CRM. Time to get your hands dirty!


Your friendly dev,

Nimisha Saboo