Wednesday, March 24, 2021

Salesforce Reporting Snapshot - Historical reports

Reporting Snapshot 

It is a very common Scenario in the business that users use Salesforce Reports to view their organization data to make decisions, but when they run the report, it would display only the most recent data available at the time of running the report.

But the Organization wants to see the reports that will give an actual picture of the data not limited to the Current but the historical Data.

If the organization needs to analyze the data changes over a period of time Like (last few months, quarters, weeks, days, and etc). Salesforce provides a very useful feature to achieve it, and the feature is called Reporting Snapshot.

A report is scheduled for the specific time frequency and salesforce stores the data in the New object for the current date & time.

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 is the standard salesforce reports either in tabular or summary type. 

The report should contain the fields(as columns) that need to track for historical data.

Target Object:

The target object is the new custom object which is used for storing the report runtime data. Target object will have the fields where we can map the reports columns and sore the data.

This Target object will be used for the report/Dashboard to get visualize the historic data.

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:

Scenario:

Here is the scenario to get all the Closed won leads per week to capture the number of leads closed by the Sales agents of a company.

Solution:

  1. Creating Source Report:
           a. Create a report with required columns

            
            b. Save the report in any folder.

        2. Target Object
                a. Create New custom object with enable reporting. 

                b. Create Fields with similar type and lengths to store the exact data.Like
                        - Opportunity Name   -  Text(80)
                        - Amount - Currency (16,2)
                        - Expected Revenue - Currency (16,2) 
Note: fields need to create for columns which user want to see in history report.

  1. Creating Reporting Snapshot
To create the reporting snapshot Navigate to 
Setup > Analytics > Reports & Dashboards and click on Reporting snapshots.




                - Click New Reporting Snapshot and Fill the following information

                    Reporting Snapshot Name: Name of the reporting snapshot

                    Running User: the User whom you want to run the report.



                    Source Report: Select the report which you have created with proper columns.

                    Target Object: New object which we created above.



            Click Save & Edit Fields mappings

            Map the fields and click Save


Schedule Reporting Snapshot: 

Schedule the report with frequency for the execution and store. To create the schedule Go to reporting snapshot detail page. 

Click Edit from the schedule reporting snapshot section 


          Email Reporting snapshot: Select the user as logged in(created by) user and/or select the user by selecting other.

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.



Save the Schedule.


The schedule will execute with selected frequency and create records in the custom object with current data. on every execute it will create new target records with point in time data.


Now user can Create a new report with Target object all the historic data and group by the dates. 

No comments:

Post a Comment

 New Visitor Log Entry flow with Community: Visitor Log