Tag: charts

  • Tracking Pipeline Development Over Time in CRM 2015

    Tracking Pipeline Development Over Time in CRM 2015

    We’ve come to part 3/3 in the Smarter Sales Process article trilogy. In the earlier posts we talked about customizing the lead qualification process and using calculated fields for opportunity estimated revenue, to get more out of Dynamics CRM 2015 than what the standard sales related functionality offers. To close things off, let’s have a look at how we can gain more insight into the data in our sales opportunity pipeline and particularly how it has developed over a period of time.

    Capture the Sales Pipeline Trend

    With the data that Dynamics CRM collects about sales opportunities we can easily draw charts about how many deals were won or lost at any given time, presenting these as a monthly trend of both estimated and actual revenue. It’s also very simple to visualize the current contents of our sales pipeline by looking at the open opportunity records via standard visualizations like the… well, pipeline chart, obviously!

    What we can’t do quite so easily is to present how the sales pipeline has developed over time. For example, has the number of opportunities in a particular stage of the sales process gone up/down, or how the total estimated revenue from open opportunities is developing. An average CRM user may not understand why such a visualization wouldn’t be included in the application by default, but for a system customizer that knows the data model and behavior of Dynamics CRM this should be fairly obvious. The fundamental difference between closed opportunities and open opportunities is that for the former we have a permanent record of when they were closed and with what values, whereas the records that are currently in an open status represent transient data. It will change over time, based on the future actions that CRM users will take.

    So, what’s the problem with such data? The fact that an open opportunity may have been open last week or even ten weeks ago makes it impossible for us to draw a chart that would show a weekly number of records, since only a single record exists in the database, even though it might need to appear in the bar for each week in a chart showing the size of the pipeline on a weekly level. While technically we would have the information needed to project the number of opportunities that have been open at a given time by looking at their creation date, this would be a more complex exercise than what the ASP.NET charts in Dynamics CRM allow us to draw (although I wouldn’t be surprised if CRM Chart Guy would prove me wrong on this one).

    At the end of the day CRM is an operational system focused on managing individual records and transactions, which means it doesn’t bother archiving copies of records in their historical state. Sure, we have the audit log that will keep a record of the individual changes to tracked fields, but that’s data which isn’t accessible for reporting. But the question to ask is: if we wanted to capture such historical data for our analysis purposes, could we do that with Dynamics CRM? Sure we could! In fact, already back in 2008 when CRM didn’t yet have a built-in auditing capability, CRM MVP Guy Riddle showed us how the use of custom entities and workflows allowed us to build our very own audit log feature to capture changes for record field values.

    CRM_opportunity_count_by_week_and_stage

    Sure, our use case here is a bit different, since we’re not looking to only capture entries on when a record changes. To provide us visibility into how the sales pipeline has developed over time, we would need to capture a snapshot of the pipeline status at predetermined intervals.

    Scheduling Snapshots of CRM Data

    One of my favorite features in CRM 2015 version is Rollup Fields, which I’ve already covered in a number of earlier posts on this blog (including the gotchas you need to be aware of). This feature also comes in handy if we want to build a custom snapshot entity to store the count or sum of records related to it. In this scenario for monitoring sales pipeline development, which I presented in my MSDynamicsWorld.com webcast “A Non-Developer’s Guide to Smarter Sales Processes in Microsoft Dynamics CRM 2015”, what we’ll do is make a 1:N relationship between our custom Snapshot entity and the opportunity entity. This in turn will allow us to create Rollup Fields that will summarize the count and revenue of the related opportunities onto the Snapshot record. By having a snapshot per each stage of our sales process, we will get the attributes needed for drawing the kind of chart shown above, to visualize the trend of opportunity count and estimated revenue development per week.

    The detailed steps for the required customizations can be found from the following SlideShare presentation:

    The one missing ingredient that we still need to think about is how to automate the capture of these snapshots. What Dynamics CRM still doesn’t offer out-of-the-box is the ability to schedule recurring workflow processes in an easy way, to perform an automated task every X days. Luckily there are workarounds for scheduling such bulk data processing tasks with using nothing but the CRM platform, and one of the best solution’s I’ve come across is the Scheduling recurring Dynamics CRM workflows with FetchXML solution from Lucas Alexander. I’ve already shown you how to use this solution for monitoring Rollup Field Values with workflows and the same logic can be applied in this scenario, too. Only this time we don’t send a weekly email blast to CRM users, rather we’ll just create new snapshot records to store the opportunity count and total estimated revenue per sales stage.

    CRM_scheduled_process_opportunity_snapshot

    Alright, that concludes my Smarter Sales Process for CRM 2015 series, at least for now. As mentioned at the start, do check out part 1 and part 2, as well as the YouTube recording of the live demos if you’re interested for more details on the topic. Hopefully these examples have given you some new ideas on what kind of solutions you can build with the Dynamics CRM 2015 customization tools. If you’ve got any thoughts on what kind of no-code customization scenarios you’d be interested in seeing in the Surviving CRM blog in the future, please feel free to leave a comment!

  • Turn the flat Dynamics CRM 2011 charts into 3D

    We’ve got charts and dashboards!” Yes, ok, so that’s the common initial reaction to one of the most visible new features of Microsoft Dynamics CRM 2011. After playing around with the OOB charts in CRM 2011 Beta and building a few of your own personal charts with the simplified editor that’s available right in the end-user UI, the next reaction is likely to be “I wish I could do more with these charts“.

    The good news is: you absolutely can! The bad news? It requires a bit of XML editing. Now don’t go running away all scared, because it doesn’t take a .NET developer to perform some basic tweaks into the CRM 2011 charts. Heck, even I was able to figure it out after an hour of surfing around the documentation and blog posts on Microsoft Chart Controls for .NET 4.

    In this quick example I will take the a custom chart I built in the solution customization UI for CRM 2011 and inject some more parameters into it to enhance the presentation. The first thing we’ll need to do is select the chart you want to modify in CRM and click Export Chart to grab the XML definition for the chart.

    Open the XML file in the editor of your choice and have a look at the structure. Inside the <presentationdescription> tag you’ll find details about the <Chart> in question. What we’ll want to do in this example is insert more attributes inside the <ChartArea> tags. From MSDN Library we can find the following piece of information:

    The Chart control supports 3D charts. To use 3D charts, set the respective chart area’s Area3DStyle.Enable3D property to True.

    So, we know we’ll want to have the <Area3DStyle> tag in there with some parameters. In my chart we can apply the following addition into the chart definition XML:

    <ChartAreas>
    <ChartArea BorderColor=”White” BorderDashStyle=”Solid”>
    <AxisY IsLabelAutoFit=”False” TitleForeColor=”59, 59, 59″ TitleFont=”{0}, 10.5px” LineColor=”165, 172, 181″ IsReversed=”False”>
    <MajorGrid LineColor=”239, 242, 246″ />
    <LabelStyle Font=”{0}, 10.5px” ForeColor=”59, 59, 59″ />
    </AxisY>
    <AxisX IsLabelAutoFit=”False” TitleForeColor=”59, 59, 59″ TitleFont=”{0}, 10.5px” LineColor=”165, 172, 181″ IsReversed=”False”>
    <MajorGrid Enabled=”False” />
    <MajorTickMark Enabled=”False” />
    <LabelStyle Font=”{0}, 10.5px” ForeColor=”59, 59, 59″ />
    </AxisX>
    <Area3DStyle Enable3D=”True” LightStyle=”Realistic” WallWidth=”5″ IsRightAngleAxes=”true” />

    </ChartArea>

    Once we save the XML file and import it into a new CRM chart, the results will be the following:

    There you go, that’s all there’s to it. Or more specifically, that’s just the beginning of what the visualizations in Dynamics CRM 2011 are capable of. Have a look at the MSDN Library for Visual Studio 2010 on articles about using Chart Controls or browse the Chart Controls for .NET Framework forum for questions and answers on how to work with the charts available in CRM 2011. Downloading the Sample Environment for Microsoft Chart Controls might also be a good place to start.