As CRM Online consultants at xRM (www.xrm.com), we listen to the needs of our clients and then make their vision a reality. This goes beyond implementing requests verbatim. It is important to take in the requirements, understand the driving factors behind them, and deliver a solution that meets the objectives beyond the explicit request of the client.
Recently a client expressed a need to differentiate revenue between first-time and repeat customers. Technically, a simple option set would accomplish this. The requested label of the field was “Client Type,” and the options were simply “New” and “Existing.” However, this solution would lead to less-than-reliable data as it would require user input to set the value. The client was concerned that in adopting a new CRM platform, users would often forget or not have time to verify whether the opportunity was new or repeat business. Fortunately, we settled on a simple way to systematically track repeat business by using a custom rollup field and a workflow.
For those of you uninitiated, a rollup field calculates an aggregate value computed over the child records related to a parent record. In this example, we use a rollup field to count the number of won opportunities related to an account. The process is quite simple.
From the entity in question, Account in this scenario, create a new field. (See below.) In the Type section, select “Whole Number” as the Data Type and “Rollup” as the Field Type. Next, click the Edit button.
Note that once you click the Edit button, CRM Online creates the field and the Data Type field can no longer be modified.
The Rollup Field window opens. (See below.) In the RELATED ENTITY section, we choose the entity on which we want to perform the calculation, “Opportunities (Account)” in this example, which means any Opportunity records related to the Account record that has the rollup field. Next, we can optionally specify any filters. In this situation, we define an existing customer as any Account with one or more won opportunities. Therefore, we filter the Opportunities with “If Status equals ‘Won’”. Lastly, we set the aggregation, which will count the number of Opportunities that pass the filter, and then we click Save and Close.
It’s important to understand that rollup fields operate on an asynchronous process, and the roll-up is performed every hour. A rollup calculation can be manually triggered by clicking the refresh icon in the actual rollup field on the form.
For testing purposes, it can be good to place the newly created field on the form somewhere to verify that it is calculating correctly. However, the field does not need to be present on any form for the Workflow that we will design shortly to function properly.
Before we can create the workflow, we need the “Client Type” field to exist. The customer in this example wanted the field to reside on the Opportunity entity. This is a simple option set where the values are “New” and “Existing”.
Once the necessary fields are in place, we can design the Workflow. This workflow is triggered whenever a new Opportunity record is created.
The first step is a Check Condition that checks if the Parent Account of the Opportunity has a Won Opportunities value greater than zero.
If the Won Opportunities is greater than zero, then the workflow updates the Client Type to “Existing”. Otherwise, the Client Type is set to “New”.
This workflow takes the human error component out of properly categorizing repeat business per these specifications. There is not only one way to design this workflow. The requirements of the scenario should dictate how the workflow should be written. What defines a repeat customer? Is there more than one way to establish a customer in CRM Online than with a won Opportunity? What other kinds of automation can be implemented from this logic? These are all important questions that need to be answered. As expert CRM Online consultants, xRM can help you achieve the optimal solutions.
You can learn more tips, tricks, and tutorials for Microsoft Dynamics CRM, please check out our xRM blog and our Success Portal. If you would like to receive training from our team of experts, please inquire about our QuickStart Training.