Newer Version Available

This content describes an older version of this product. View Latest

RetrievalSummaryDefinition

Represents a metadata type that stores the header information of a retrieval definition. It enables the configuration of data retrieval patterns for summarizing related records across object relationships.

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

RetrievalSummaryDefinition components have the suffix .retrievalSummaryDefinition and are stored in the .retrievalSummaryDefinitions folder.

Version

RetrievalSummaryDefinition components are available in API version 61.0 and later. Individual fields may have specific minimum API version requirements as mentioned in the field descriptions.

Fields

Field Name Description
masterLabel
Field Type
string
Description

Required.

A user-friendly name when RetrievalSummaryDefinition is created.

retrievalSummaryDefFields
Field Type
RetrievalSummaryDefField[]
Description
Collection of fields to retrieve from the root object of the retrieval definition. Each field definition specifies which field from the target object should be included in the retrieval and the order in which it should be processed.
retrievalSummaryDefObjects
Field Type
RetrievalSummaryDefObject[]
Description
Collection of rollup definitions that aggregate data from related objects. Each object definition specifies a related object, the aggregation logic to apply, and the fields to retrieve from that object. This enables hierarchical data aggregation across object relationships.
rootObject
Field Type
string
Description

Required.

API name of the primary object that serves as the starting point for the retrieval definition. This object serves as the anchor point for all retrieval and rollup operations defined in this metadata. The value must be a valid Salesforce object API name.

RetrievalSummaryDefField

Represents a field definition that specifies a single field to retrieve from a target object. Each field definition includes the field API name and a sequence number that determines the processing order.

Field Name Description
field
Field Type
string
Description

Required.

API name of the field to retrieve from the target object. This must be a valid field API name on the specified object.
sequenceNumber
Field Type
int
Description

Required.

Processing order of the field in the retrieval operation. Fields are processed in ascending sequence number order. This allows you to control the order in which fields are displayed.

RetrievalSummaryDefObject

Represents a rollup definition that aggregates data from a related object. Each rollup definition specifies the aggregation logic, the fields to retrieve, and the processing order for summarizing data across object relationships.

Field Name Description
recordAggregationDefinition
Field Type
string
Description

Required.

Reference to the aggregation definition that specifies how data from the related object must be aggregated. This parameter references a RecordAggregationDefinition.
retrievalSummaryDefFields
Field Type
RetrievalSummaryDefField[]
Description
Collection of fields to retrieve from this related object. Each field definition specifies which field should be included and in what order. This is an optional array that allows you to specify additional fields beyond those defined in the aggregation definition.
sequenceNumber
Field Type
int
Description

Required.

Processing order of the rollup operation. Rollups are processed in ascending sequence number order, allowing you to control the hierarchy of data aggregation when multiple related objects are involved.

Usage

RetrievalSummaryDefinition is commonly used in Financial Services Cloud to define patterns for retrieving and summarizing data across related objects. Typical use cases include:

  • Rollup Summarization: Aggregate data from child records to parent records, such as summing transaction amounts or counting related activities.
  • Hierarchical Data Aggregation: Retrieve and summarize data across multiple levels of object relationships, enabling complex reporting and analytics.
  • Data Consolidation: Combine information from multiple related objects into a single summary view for easier analysis and decision-making.
  • Performance Optimization: Pre-define retrieval patterns to improve query performance when accessing related data across multiple objects.

Declarative Metadata Sample Definition

The following is an example of a RetrievalSummaryDefinition component that retrieves data from an Account object and includes a rollup from related Opportunity records.

1<?xml version="1.0" encoding="UTF-8"?>
2<RetrievalSummaryDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3   <masterLabel>Account Revenue Summary</masterLabel>
4   <rootObject>Account</rootObject>
5   <retrievalSummaryDefFields>
6      <field>Name</field>
7      <sequenceNumber>1</sequenceNumber>
8   </retrievalSummaryDefFields>
9   <retrievalSummaryDefFields>
10      <field>Industry</field>
11      <sequenceNumber>2</sequenceNumber>
12   </retrievalSummaryDefFields>
13   <retrievalSummaryDefObjects>
14      <recordAggregationDefinition>OpportunityRevenueRollup</recordAggregationDefinition>
15      <sequenceNumber>1</sequenceNumber>
16      <retrievalSummaryDefFields>
17         <field>Amount</field>
18         <sequenceNumber>1</sequenceNumber>
19      </retrievalSummaryDefFields>
20      <retrievalSummaryDefFields>
21         <field>CloseDate</field>
22         <sequenceNumber>2</sequenceNumber>
23      </retrievalSummaryDefFields>
24   </retrievalSummaryDefObjects>
25</RetrievalSummaryDefinition>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>RetrievalSummaryDefinition</name>
6    </types>
7    <version>61.0</version>
8</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.