Search Templates

Searches, filters, sorts, and paginates Sales Configuration Templates, supporting field-level filtering (AND logic), free-text search (OR logic), tag-based filtering, and multi-field sorting.

  • Resource URL: /services/apexrest/<namespace>/v1/cpq/templates/search
  • HTTP Method: POST
  • Content-Type: application/json
  • Response Format: JSON
ParameterTypeRequiredDescription
filterObjectNoFilter criteria applied with AND logic.
offsetIntegerNoNumber of records to skip. Default value is 0.
pageSizeIntegerNoNumber of results per page. Default value is 20.
searchObjectNoSearch criteria applied with OR logic across specified fields.
sortbyArrayNoArray of sort clauses.
PropertyTypeDescription
criteriaArrayArray of filter criterion objects. All criteria are combined with AND logic.
criteria[].fieldStringThe API name of the field to filter on. Supports SalesConfigTemplate__c fields and relationship fields through TemplateQuoteId__r and TemplateOrderId__r.
criteria[].operatorStringThe comparison operator.
criteria[].valuesStringThe value(s) to compare against. For IN and NOT IN, provide comma-separated values.
OperatorDescriptionExample Values
=Equals"Approved"
!=Not equals"Draft"
INValue is in list"Draft,Approved"
NOT INValue is not in list"Obsolete"
LIKEPattern match (auto-adds % wildcards)"Enterprise"
>Greater than"2024-01-01"
>=Greater than or equal"100"
<Less than"500"
<=Less than or equal"1000"

To filter templates by tag IDs, use the special field name tagIds with the IN operator.

You can filter on fields from the related Quote or Order

Only TemplateQuoteId__r (Quote) and TemplateOrderId__r (Order) relationships are supported.

PropertyTypeDescription
fieldsStringComma-separated list of field names to search across. Use Tags to include tag name matching. All fields are searched with OR logic using LIKE matching.
valueStringThe search term. Automatically wrapped with % wildcards for LIKE queries.
PropertyTypeDescription
fieldStringThe API name of the field to sort by.
directionString"ASC" (ascending) or "DESC" (descending). Default: "ASC".

|

Success Response (200):