Salesforce Analytic Snapshots - Why should you use them?
One of the underused areas of salesforce.com is Analytic Snapshots. An Analytic Snapshot is a way of periodically saving data from your salesforce org so it can be examined for trends. For example, suppose you have $5M in Opportunities in your pipeline and you have a report that breaks the pipeline by the Stage – a very typical pipeline report used in many salesforce organizations. You may have a fairly good intuitive feel for how much is typically in your pipeline, but can you remember how much you typically have in every one of your Stages? Probably not, but it might be useful information to have. With an analytic snapshot you could write a report which would show you the trend of the amount in each Stage of your pipeline.
Here’s how it works:
- Create a custom object, “Pipeline Snapshot”. The object has a field for each summary level of your pipeline report, plus a field for any dollar fields being summed at the summary levels. For example, your Pipeline report might have summary levels for Region, Territory, and Sales Rep and also include a sum of the Amount and Expected Amount fields. Your custom object would have fields for Region, Territory, Sales Rep, Amount and Expected Amount.
- Add another field to the custom object, “Run Date”.
- Create an Analytic Snapshot – it will ask you to define the object to which the snapshot should add records when it runs (the custom object you just created above) and what report should be run to add records. That would be your normal pipeline report.
- Schedule the snapshot to run on the 1st of every month.
Every month when the snapshot runs it will save a copy of what your pipeline data looked like at that time. You can then write your trend reports against the custom object showing the change in your pipeline distribution over time. The trend reports make for great dashboards, also.
Limitations: You can only add 2,000 rows to the custom object in one execution of an analytic snapshot. Remember, you are writing records at the summary level only. In the example above you would be writing one record for each Sales Rep (assuming no Sales Rep operates in more than one Region or Territory), which should be less than 2,000 records for most organizations. If you run into a situation where you are hitting the 2,000 record limit you could split the report into two reports and schedule them both to feed into the same custom object on the same day. You would still get all the records you need into the custom object for trend reporting, it would just be fed from two separate reports and snapshots instead of one.