---
schema_version: "1"
id: 96182ba790924b103c282a36ea2e707ed6983d6079bf47dc12d9ae3c8192bf48
title: Save Template
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/standard_cart/std_comms-save-template.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/std_comms-save-template.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e7bd7b325f899c31b2353daa39ce6bdb6ba9d59dd3718b280c7e321678f09cdc
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Save Template

Creates a new Sales Configuration Template by cloning an existing Quote or Order.

## Resource Information

- **Resource URL:** `/services/apexrest/<namespace>/v1/cpq/templates`
- **HTTP Method:** POST
- **Content-Type:** application/json
- **Response Format:** JSON

## Request Body

| Parameter    | Type    | Required | Description                                                                    |
| ------------ | ------- | -------- | ------------------------------------------------------------------------------ |
| cartId       | String  | Yes      | The ID of the source Quote, Order, or Opportunity to save as a template.       |
| templateName | String  | Yes      | The name for the new template.                                                 |
| description  | String  | No       | A description of the template.                                                 |
| category     | String  | No       | The category for the template (defaults to "General" if not provided).         |
| asyncMode    | Boolean | No       | Set to true to run the clone operation asynchronously. Default value is false. |
| pricing      | Boolean | No       | Set to true to execute pricing on the cloned cart. Default value is false.     |
| validation   | Boolean | No       | Set to true to execute validation on the cloned cart. Default value is false.  |

## Example REST Request

```
{
  "cartId": "0Q0xx0000004CabCAE",
  "templateName": "Enterprise Fiber Bundle",
  "description": "Standard fiber bundle with router and installation for enterprise customers",
  "category": "Enterprise",
  "asyncMode": false,
  "pricing": false,
  "validation": false
}
```

## Example REST Response

Success Response (200):

```
{
  "success": true,
  "errorCode": "INVOKE-200",
  "error": "OK",
  "result": {
    "messages": [],
    "records": [
      {
        "templateId": "a1Bxx0000004XyzDEF"
      }
    ]
  }
}
```

Success Response - Async Mode (200):

```
{
  "success": true,
  "errorCode": "INVOKE-200",
  "error": "OK",
  "result": {
    "messages": [],
    "records": [
      {
        "templateId": "a1Bxx0000004XyzDEF",
        "jobId": "7071T00000ABCDEFGH"
      }
    ]
  }
}
```
