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 Information

  • Resource URL: /services/apexrest/<namespace>/v1/cpq/templates/search
  • HTTP Method: POST
  • Content-Type: application/json
  • Response Format: JSON

Request Body

Parameter Type Required Description
filter Object No Filter criteria applied with AND logic.
offset Integer No Number of records to skip. Default value is 0.
pageSize Integer No Number of results per page. Default value is 20.
search Object No Search criteria applied with OR logic across specified fields.
sortby Array No Array of sort clauses.

Example REST Request: Full Search

{
  "filter": {
    "criteria": [
      { "field": "Status__c", "operator": "=", "values": "Approved" },
      { "field": "Category__c", "operator": "IN", "values": "Enterprise,Premium" }
    ]
  },
  "search": {
    "fields": "Name,Description__c,tags",
    "value": "fiber"
  },
  "sortby": [
    { "field": "Name", "direction": "ASC" }
  ],
  "pageSize": 10,
  "offset": 0
}

Example REST Response

Success Response (200):

{
  "success": true,
  "errorCode": "INVOKE-200",
  "error": "OK",
  "result": {
    "records": [
      {
        "Id": "a1Bxx0000004XyzDEF",
        "Name": "Enterprise Fiber Bundle",
        "vlocity_cmt__Description__c": "Standard fiber bundle for enterprise customers",
        "vlocity_cmt__Status__c": "Approved",
        "vlocity_cmt__Category__c": "Enterprise",
        "Tags": ["Enterprise", "Fiber"],
        "vlocity_cmt__EffectiveOneTimeTotal__c": 299.99,
        "vlocity_cmt__EffectiveRecurringTotal__c": 89.99,
        "vlocity_cmt__PriceList__r": {
          "Id": "a3Dxx0000002GhiJKL",
          "Name": "Standard Price List",
          "vlocity_cmt__CurrencyCode__c": "USD"
        }
      }
    ],
    "messages": []
  },
  "totalCount": 1,
  "offset": 0,
  "pageSize": 10,
  "totalPages": 1
}