Analytic Snapshots - walkthrough
Jun 12, 2008
So, you may have read the marketing page the for the feature:
Analytic Snapshots - Salesforce Features
And maybe even heard about it at Dreamforce Europe - the time machine enabling you to both look back over time, and to go back to a point in time and look at it.
So - how does it work?
You have to do 3 things:
- choose what data you want to snapshot
- choose how often you want to keep the data
- build a report on that data
- create the Analytic Snapshot
ok, there's 4. But 2 of those are just about thinking! You probably do that anyway...
What data do you want to snapshot?
Well, if you want to look at pipeline, you probably want to look at opportunities. You may also want to look at products.
If you want to look at how your support organization is doing, you want to store cases.
If are looking at how your marketing organization is dealing with incoming business, then leads might be a good choice.
You might also have custom objects that change over time - status changes, numbers change, you can snapshot it.
And what data do you want to store in the snapshot?
When looking at the set of data you have, you probably want to capture the data that's changing that you care about - for instance, the opportunity's amount, stage, and custom fields.
You might also want to duplicate the owner information - to make sure visibility on the snapshot data is the same as on the source data.
You might also want to copy across references to other records - for instance, the account for the opportunity, the contact for the case, or the campaign for the leads. This will let users using the snapshot for reporting get the historical data related to this contact or
If you are in EE or UE and can have many snapshots, then you could snapshot multiple levels of data - for instance, not just the top 50 open opportunities, but the products for those opportunities as well.
An example:
I want to store details of open deals, every Monday morning. I forecast and close business monthly, so I want to get a snapshot of how the pipeline is changing during the month. I have the following list of fields on opportunity that I want to copy across:
- Opportunity Name
- Opportunity Amount
- Opportunity Stage
- Opportunity Close Date
- A custom picklist tracking the type of install needed - "Installation Type"
- A custom field for "Number of Installers"
I want to make sure I get owner information and copy it across, and I want the account and opportunity to be linked to the snapshot record, so I can do reports like:
- Account and deal snapshots
- Opportunity and deal snapshots
as well as reporting just a snapshot or set of snapshots.
Step 1 - create a CRT
Since the report has to have many lookup fields with IDs, I make a Custom Report Type, with the primary object as Opportunity
I go to the page layout step, and add in fields available through lookups to get the owner ID, the opportunity ID and the account ID. To bring in lookups, you need IDs.
(for information on creating a CRT, see the help and training in salesforce, or CRT-related articles on this site)
Step 2 - create the custom object to store the data
The next step is to create the custom object to hold all this data. We are going to need 1 field for each of the fields named above (Opportunity Name, Amount, Stage, Close Date, a Picklist for my Installation Type, and a number field for "number of installers". I will also need:
- A date field for when the snapshot was run
- a lookup to Opportunity (to see the current state, and to make the history a related list of opportunities)
- a lookup to account
For the owner, I'm going to have the owner transfer across, so we don't need a custom field for that.
Step 3 - create a report
Now we make the report - I use my CRT and build a tabular report containing all those columns named above.
and save this report somewhere public
Step 4 - Create the analytic snapshot
Finally the new bit! Almost 2 pages later!
I create an analytic snapshot, and use the wizard to create an analytic snapshot
And create a new snapshot:
(here, I have a choice of running user because my user has "modify all data" in this org"). I save this and select to edit the field mappings:
So we've mapped all the fields. You can see the lookups had to have their values taken from the IDs of the corresponding objects.
The last field - snapshot date, I'm going to pick "Execution time" from the "about this snapshot" group of fields. That will give me the time this snapshot was run.
Now we save that.
Now we can schedule (this UI is just like scheduling everything else). We can schedule for every Sunday night, and we'll have the status of the pipeline as of that Sunday.
That's it, just go report on the snapshot!
Reports on the snapshot
Now we can go report on the snapshot. Here's an example of a crosstab with date across, grouped by stage. I can see the changes in stages as the opportunities move around:
Then if I want I can drill around an see the details of the history for that month, then using the lookup to Opportunity, get to the current state of those opportunities.

Thank you for the step by step instructions! Saved me tons of time research. This is definitely the most helpful blog I've found on SFDC site.
Posted by: atse | May 16, 2009 at 01:27 PM
Just a follow up question on this great post on analytic snapshots - is it possible to have different times to run the snapshot than 12, 3, and 6 AM ?
I need to run a snapshot at the end of the month. I can make it work with the snapshots, but it'd be nicer to run it at the end of the day.
Posted by: Benjamin Irvine | July 01, 2009 at 05:46 PM
Those are the slots available to your organization as an Enterprise Edition customer. Currently, Enterprise has 3 slots a day, and those are limited to off-peak times.
Unlimited edition has 1 slot every hour in the day.
We constantly review limits like these to see where they can be raised, but currently we can't raise the number of slots.
Midnight would seem to be the closest to your end of day...
Posted by: Tom Tobin | July 02, 2009 at 12:17 PM
Is it possible to map an ID field from a summary report snapshot? As an example, I'd like to group opportunities by owner and save the summary results to a custom object via a snapshot. I'd like to store the owner field as a lookup field in the custom object bu can't figure out a way to accomplish this. I can only map it to a text field.
Posted by: JD | November 30, 2009 at 08:55 AM
If you created a field which is a lookup to another object, or the owner field, you can map the ID of that object, or the ID of a user to that field.
So, you would:
1) add in owner ID as a field in the report (you may need a CRT to bring in Owner ID)
2) add in the lookup to user in the target object
3) map the ID field to the lookup field.
Posted by: Tom Tobin | November 30, 2009 at 09:21 AM
Tom, I love reading these instructions but unfortunately I can't see the images? Not sure why. Might be on my end. I was wondering if you might be able to email me the information?
My email is jmclaughlin@hsp.com
I would REALLY appreciate it.
Posted by: Jillian | February 17, 2010 at 11:24 AM
It looks like the images were removed when the blogs were moved to the new sites community page
The new copy of the article is here (with images)
http://sites.force.com/blogs/ideaView?c=09a30000000D9xo&id=087300000006tqZ&returnUrl=%2Fapex%2FideaList%3Fc%3D09a30000000D9xo%26category%3DFor%2BAnalytics%26sort%3Dpopular
Posted by: Thomas Tobin | February 17, 2010 at 11:27 AM
this works! thank you so much !
Posted by: Jillian | February 18, 2010 at 09:06 AM
Tom
Great blog. I am wondering if this specific example you showed could also be done by reporting on top of Opportunity History. Would we be able to get Stage, Modified Date and Amount from there?
Posted by: Andy | August 31, 2011 at 06:25 PM
...and we're back.
Yes, if the source is opportunity history, you can get historical stage, historical date, and historical amount, as well the current stages, dates, and amounts....
Posted by: Thomas Tobin | September 08, 2011 at 07:18 PM