Welcome to Zuora Product Documentation

Explore our rich library of product information

Grouping keys configuration

Grouping keys configuration to control how Charge Segments roll up into Salesforce Opportunity Products using preset and custom key fields.

Grouping keys determine how Charge Segments are combined into Opportunity Products.

  • 0 keys: Each Charge Segment creates its own Opportunity Products (1:1 mapping).

  • 1–3 keys: Segments that share the same key values are rolled up into a single Opportunity Product.

Available preset keys (6):

KeySourceWhat It Does
Charge NumberCharge SegmentClosest to 1:1 charge-to-Opportunity Products mapping.
Quote Rate Plan (QRP Id)Quote Rate Plan Charge → QRPGroup by rate plan. useful for aligning with order actions/amendments.
Product (Product2 Id)QRP → ProductGroup all charges for same product.
Product TypeProduct2.zqu__ProductType__c

Group by:

standalone

hard_bundle

Product CategoryProduct2.zqu__Category__c

Group by product classification such as:

Base Products

Add On Services

Miscellaneous Products

Custom Keys (up to 4 slots):

SlotSource Object
Custom Field 1Charge Segment

Custom field requirements:

  • The field type must be groupable (Text, Picklist, Id, Number).

  • Long Text Area or Rich Text fields are not supported.

  • The running user must have read access to the underlying field.

  • Do not select the same field in more than one custom key slot.

Example configurations:

Use caseKeysResult
Detailed line itemsCharge Number~1 Opportunity Products per charge
Product rollupProductAll charges for the same product → 1 Opportunity Product
Revenue recognitionProduct + Product TypeGrouped by product and category
Regional rollupProduct + custom Region fieldGrouped by product and region
Note:

Grouping keys can be exported from one Salesforce org and imported into another using Data Loader or Workbench.

To export, query the source org:

SELECT zqu__KeyType__c, zqu__PresetField__c, zqu__CustomFieldApiName__c, zqu__SourceObject__c, zqu__SortOrder__c, zqu__IsActive__c, zqu__QuoteType__cFROM zqu__OppProdSyncGroupingKey__cWHERE zqu__IsActive__c = trueORDER BY zqu__SortOrder__c ASC

To import, delete existing active grouping keys in the target org first, then insert the exported rows. Grouping keys do not have a unique external ID, so upsert is not supported — use delete-then-insert instead.

Note:

Custom grouping keys that reference a custom field (Key Type = Custom) require that the same custom field exists and is accessible on the target org's Charge Segment object.