Documentation Version
Winter '16 (API version 35.0)
  • Winter '16 (API version 35.0) 35.0
  • Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English


Represents a reporting snapshot. A reporting snapshot lets you report on historical data. Authorized users can save tabular or summary report results to fields on a custom object, then map those fields to corresponding fields on a target object. They can then schedule when to run the report to load the custom object's fields with the report's data. Reporting snapshots enable you to work with report data similarly to how you work with other records in Salesforce.

Declarative Metadata File Suffix and Directory Location AnalyticSnapshot components are stored in the analyticSnapshots directory of the corresponding package directory. The file name matches the unique name of the reporting snapshot, and the extension is .analyticsnapshot.

Version AnalyticSnapshot components are available in API version 16.0 and later.


Field Field Type Description
description string A description of the reporting snapshot.
fullName string The reporting snapshot name used for API access. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters. This field is inherited from the Metadata component.
groupColumn string A column that specifies which level to extract data from the source report. It is only applicable for summary reports.
mappings AnalyticSnapshotMapping[] A list of reporting snapshot mappings. For valid values, see AnalyticSnapshotMapping.
name string Required. The display name of the reporting snapshot.
runningUser string The username of the user whose role and sharing settings are used to run the reporting snapshot.
sourceReport string Required. The report where data will be extracted from.
targetObject string Required. The custom object where data will be inserted into.


AnalyticSnapshotMapping defines the mapping for the reporting snapshot. Valid values are:

Field Field Type Description
aggregateType ReportSummaryType[] (enumeration of type string) List that defines if and how each report field is summarized. For valid values, see ReportSummaryType.
sourceField string The sourceField can be one of the following:
  • The field on the sourceReport that you want to map to the targetField in the targetObject
  • A summary of a filed on the sourceReport (for Summary reports only)
  • A field on the reporting snapshot, such as JobName, RunningUser, or ExecutionTime (set through the user interface)

Note: The sourceField must correspond to the sourceType you specify.

sourceType ReportJobSourceTypes[] (enumeration of type string) List that defines the report format for the reporting snapshot. For valid values, see ReportJobSourceTypes.
targetField string A field on the targetObject into which this particular sourceField will be inserted.


An enumeration of type string that defines the report format for the reporting snapshot. Valid values are:

Enumeration Value Description
snapshot Use this option if the sourceField contains snapshot-specific information such as JobName, RunningUser, or ExecutionTime.
summary Use this option if referencing a summary (Sum, Average, Minimum, Maximum) of a field from the sourceReport.
tabular Use this option if referencing an available column from the sourceReport.

Declarative Metadata Sample Definition

A sample XML definition of a reporting snapshot is shown below.

<?xml version="1.0" encoding="UTF-8"?>
<AnalyticSnapshot xmlns="">
    <description>my description</description>
        <targetField> myObject __c.Name</targetField>
        <targetField> myObject __c.field3__c</targetField>
    <name>my snapshot</name >