You are using an older browser that might negatively affect how this site is displayed. Please update to a modern browser to have a better experience. Sorry for the inconvenience!

Reporting Snapshot for Historical Data in Salesforce


Reporting Snapshot in Salesforce

It is very common that the business users use Salesforce Reports to view their organization data frequently, but when they run the report, it would display only the most recent data available at the time of running the report. If the users need to analyze the data changes over a period of time—last few months, quarters, weeks, days, and etc, Salesforce provides a very useful feature to accomplish it, and the feature is called Reporting Snapshot.

A Reporting Snapshot lets you to report on historical data, and captures and stores data at a specific scheduled time over a period of time.

The historical reports are invaluable to every business to make decisions about the health of their business. The historical data also helps you to understand how well the business processes are working towards reaching corporate goals over a period of time.

The user can make use of this (Reporting Snapshot) option to view the reports as normal records in a custom object.

The basic rules to create Reporting Snapshot:

  1. A Custom Source Report is available with columns.
  2. Target Object (Custom Object) with fields.
  3. Reporting Snapshot – Field Mappings from the report to custom object with Schedule at a preferred time.

Source Report:

The Source Report can be either Tabular or Summary type. It is the source for the Reporting Snapshot. The Running User in the Reporting Snapshot should have the access to the Source Report.

Target Object:

The Target Object is used to store the data generated by the report. The data will be stored at the time of the scheduling. It should have at least one field to map with the Source Report. The fields are created with the same data type as the report’s columns. It’s better to create the object and name it clearly as being a Snapshot Object such as ‘Lead Trends Snapshot’.

We can generate Reports and Dashboards from the Target Object, if needed.

Reporting Snapshot:

From this option we can do the following:

  1. Define the Running User.
  2. Map fields from report to object.
  3. Schedule Reporting Snapshot
  4. View the status of historic runs

Define the Running User:

The data would be loaded into the target object as records based on the running user. The Running User’s permissions decide which data would be loaded into the object.

Mapping fields from Source Report to Target Object:

Each and every field can be mapped to the target object from source report, if the data type matches.

The fields of target object with same data type as source report would be displayed to field mapping list.

Schedule Reporting Snapshot:

To schedule the snapshot, select the ‘Email Reporting Snapshot’, if necessary. Next, for the ‘Scheduled Run’, we have to choose the following:

Frequency – Daily or Weekly or Monthly

Start and End Date – Start Date and End Date for the scheduling

Preferred Start Time – Exact start time for the schedule to run.

Viewing the success of past runs:

The ‘Run History’ option is used to view the status of past runs. It maintains a history of success runs, up to 200 records. We can find the details in ‘Row Failures’ if there is any failure in the scheduled run.

Let’s assume that we are going to create a Reporting Snapshot for the below scenario.

Scenario:

Here is the scenario to get a weekly report of the Open Leads to capture the number of leads created by the Sales agents of a company.

Solution:

  1. Creating Source Report

We have to create a Source (Custom) Report to display the Leads based on the users (Sales Agents). A report is created as Tabular type based on the Lead Owners and the Lead Status.

Here, the Lead records are created by two users. This report contains 15 records for both users.

  1. Creating Target (Custom) Object

The above data would be captured and stored in this object. The business user can view the trend data from this object as records. We can also create a tab for this target object to access the records easily. The object, currently, doesn’t have any records to display.

 

The user can add up to 100 fields to this Custom object. The data would be mapped to the target object from the source report, if the data type of the field is same as the report field data type. Otherwise, the mismatched fields will not be listed in the mapping list.

  1. Creating Reporting Snapshot

To create Reporting snapshot, we have to go Setup Data Management (under Administer)  Reporting Snapshots New Reporting Snapshot

When ‘New Reporting Snapshot’ button is clicked, the Edit Reporting Snapshot screen will appear. We have to fill in the details for the fields as below.

This will create a new Reporting Snapshot. After entering the values for the fields, we have to map the fields, by clicking ‘Save & Edit Field Mappings’.

  1. Field Mappings

Once we have created the Snapshot, then we can move on to Field Mapping to map the Source Report with Target Object at field level.

The fields can be mapped only if the data types are same as report’s field data types, otherwise the list for Source Report will show ’No fields with compatible data type’. The Source Report is created as Tabular format to map the fields.

We can also ‘Edit’ the mapping data, after they are saved. Now, the Reporting Snapshot is ready to load the data into the custom object.

  1. Schedule Reporting Snapshot

In this option, we are going to schedule the Reporting Snapshot and set a frequency to run.

The below two options are available in scheduling:

  1. Email Reporting Snapshot
  2. Scheduled Run

Email Reporting:

It’s used to send the Reporting Snapshot by email, when it loads the data from source to target. Two email specifications are available:

  1. To me – It sends an email to the user who created this Snapshot

  1. To others – It sends an email to others (Users, Public Groups, Roles, and Roles & Subordinates) we want to add additionally.

We can pick the users from Public Groups, Roles, Roles and Subordinates and Users. Select the option from left side of the list and add it to the right side list. We can add/ remove by using Add and Remove buttons respectively.

Here, we have selected both ‘To Me’ & ‘To Others’ like below

So the email will be sent to both users (me and Nikita) selected in the Email Reporting.

Scheduled Run:

This option is entirely to define the timings and the frequency of Snapshot data generation. It contains

  1. Frequency
  2. Start
  3. End
  4. Preferred Start Time

Frequency is used to indicate whether the schedule run should happen

  1. Daily or

  1. Weekly or

  1. Monthly

Start and End dates define the duration of the schedule run.

Preferred Start Time is depends on Job Queue Activity. We can pick the available time by clicking ‘Find available options…’

Now, the Reporting Snapshot is ready to run at the specified schedule. You will notice that the Reporting Snapshot would run successfully after the scheduled time, and a record would be added under the ‘Run History’ related list as below.

At the same time, we can see the records loaded in the Target Object as below.

The number of records loaded into the Target Object is same as the number records in report.

An email is also sent to the both users as below

We can create different Views to display the data, if needed.

We may face some issues while working with Reporting Snapshot. To know the details about these issues and their solutions, please refer the link Troubleshoot Salesforce Reporting Snapshots

Now, let us see some of the pros and cons of using Reporting Snapshot.

Pros:

  1. Measure the effectiveness of business for a period of time.
  2. Get the historic trend data and store the report’s data as records in an object.
  3. View the data differently, by creating the views in Target object.

Cons:

  1. Only 100 fields are allowed in the Target object.
  2. 2000 records are allowed to load at a time.
  3. Record deletion is protected.

Summary:

In summary, by using this Salesforce Reporting Snapshot feature, the business people can easily get the historical, and trend data. The data can be viewed differently by different users, by creating customs views for the Target Object. Also, we can create Reports and Dashboards for the Target Object.