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.
Force.com 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.
Force.com AnalyticSnapshot components are available in API version 16.0 and later.
|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.|
|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:
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:
|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.|
A sample XML definition of a reporting snapshot is shown below.
<?xml version="1.0" encoding="UTF-8"?> <AnalyticSnapshot xmlns="http://soap.sforce.com/2006/04/metadata"> <description>my description</description> <groupColumn>INDUSTRY</groupColumn> <mappings> <aggregateType>Average</aggregateType> <sourceField>SALES</sourceField> <sourceType>summary</sourceType> <targetField> myObject __c.Name</targetField> </mappings> <mappings> <sourceField>ExecutionTime</sourceField> <sourceType>snapshot</sourceType> <targetField> myObject __c.field3__c</targetField> </mappings> <mappings> <sourceField>INDUSTRY</sourceField> <sourceType>tabular</sourceType> <targetField>testObject__c.Name</targetField> </mappings> <name>my snapshot</name > <runningUser>firstname.lastname@example.org</runningUser> <sourceReport>myFolder/mytSummaryReport</sourceReport> <targetObject>myObject__c</targetObject> </AnalyticSnapshot>