Friday, January 31, 2014

Can we have report of data trending in Salesforce? Hmmmm, Salesforce
only report current data? But, is there anyway to store historical data
so we can use it for reporting?

Yes, if you are using Salesforce Enterprise or Unlimited edition, you can configure Analytic Snapshot
to store historical data, but to note, do not expect old historical data
will be available after you configured analytic snapshot. Only
historical data for specific analytic snapshot will be available after
be configured properly and run.

User with "Manage Analytic Snapshots" permission able to create and
configured analytic snapshot. Each edition have limited number of
analytic snapshot can be created, so used it wisely.

Here is summary to create and configured analytic snapshot:

1. Create source report, this report type should be only tabular or summary.
Please note, number of records will be created in target object will be
the same with how many records in report result. For tabular report, it
will be one to one, and for summary report, it will be by group summary
or grand summary. If you choose grand summary, it will always create
only 1 record in target object.

2. Create target object, this would be a custom object in Salesforce. Make sure target object must not be included in a WORKFLOW.

3. Create fields in target object, by default analytic snapshot
will give us 3 information that we can capture into fields in target
object: Analytic Snapshot Name, Analytic Snapshot Running User,
Execution Time. Try to create field name similar or represent data will
be created from source report.

5. Map Fields from Source Report to Target Object, in this step
if your source report type is summary, you need to select grouping
level. Applicable source report field will be available for each target
object, it is based on field type.

6. Create Schedule, you can set to email analytic snapshot to
yourself, other user or to a group. And select frequency on daily,
weekly and monthly basis. Available start time will be show in this
screen.

After analytic snapshot has been run for few times, you can build report to show the trend.

For more information on analytic snapshot, click Salesforce documentation.

Monitoring
Lastly, you can monitor ALL Analytic Snapshot in your Salesforce
instance from Setup - Administration Setup - Monitoring - Scheduled
Jobs. Create new view with Type equal to 'Analytic Snapshot'. It will
show the Job Name, Submitted By, Submitted Date, Started Date, and Next
Scheduled Run. If Next Scheduled Run is blank, meaning that 'Analytic
Snapshot' is no longer active.