The comparison filter dialog in Gearset has traditionally been used to filter the metadata types and items to be compared in order to reduce the number of results and reduce comparison times. This can be accomplished simply by checking or unchecking the items you wish to include or exclude.
Filtering to the subset of CPQ configuration you wish to compare requires a slightly different mechanism and involves the use of SOQL queries to specify which records should be retrieved for comparison.
SOQL queries and filtering related items behavior
SOQL queries are applied on a per object basis
If only the parent object has a SOQL query applied, then any related items will be automatically filtered out from the comparison. For example, filtering out
Product2configuration via a SOQL query will also filter out related items such as product options and features from the comparison results.
However, related items will not be filtered out if a SOQL query has been specified for a related object(s). For example, having a SOQL query on
ProductOptionwill display the results for both in the comparison results.
SOQL queries on Lookup Objects is not supported.
Using SOQL queries to pre-filter CPQ records for comparison
Choose your CPQ enabled orgs as the source and target of your comparison
Manage custom filtersdialog
Go to the CPQ item tab (Advanced Approvals and Billing are also supported)
Enter your SOQL query into the input field provided and click
Test SOQL query
The number of records matching your query will be displayed for your source and target. Any syntax errors with your query or problems retrieving the results will also be displayed.
When you've finished configuring the metadata and CPQ records to include in your comparison, click OK and start your comparison
You can save SOQL queries as part of your metadata custom comparison filters to help create templates for reuse in future comparisons.
Example query format
WHERE clause conditions are needed when using a SOQL query to filter records. For example, the query format that you'd use in Gearset would therefore take the following format:
CreatedDate > 2022-07-01T00:00:00Z AND CreatedDate < 2023-01-01T00:00:00Z
Family = 'Hardware' OR Family = 'Miscellaneous'
ProductCode LIKE 'USB%'
Description != null
IsActive = True