---
schema_version: "1"
id: cbd91018d11b68add3c4d04a441951366eb90bad65c743945ec1a86cd5c71d16
title: Search Templates
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-search-template.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-search-template.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c7bd50a2c4e3fbf956b86a229dcba6a321ddb60fd8ebb9586fcdfbfc6d37564e
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# 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
}

```
