---
schema_version: "1"
id: f41ad6d12fc19f7d74beaf05a3aff4b27a510cbe6bad4dc911183ad5d4e8fd6e
title: Delete Template
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-delete-template.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-delete-template.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b33ca5ebbbaa479920fb713eff09f5bf0c9013fb23e53dea1bb63f58d11e043b
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Delete Template

Deletes a Sales Configuration Template, with an option to also delete the underlying template Quote or Order.

## Resource Information

- **Resource URL:** `/services/apexrest/<namespace>/v1/cpq/templates/{templateId}`
- **HTTP Method:** DELETE
- **Content-Type:** application/json
- **Response Format:** JSON

## URL Parameters

| Parameter            | Type    | Required | Description                                                                      |
| -------------------- | ------- | -------- | -------------------------------------------------------------------------------- |
| templateId           | String  | Yes      | The SalesConfigTemplate\_\_c record ID.                                          |
| deleteTemplateRecord | Boolean | No       | If true, also deletes the underlying template Quote or Order and its line items. |
| forceDelete          | Boolean | No       | If true, allows deletion of templates in Approved status.                        |

## Example REST Request

`DELETE /services/apexrest/vlocity_cmt/v1/cpq/templates/a1Bxx0000004XyzDEF?deleteTemplateRecord=true&forceDelete=false`

## Example REST Response

Success Response (200):

```
{
  "success": true,
  "errorCode": "INVOKE-200",
  "error": "OK",
  "result": {
    "messages": [],
    "records": [
      {
        "deletedTemplateId": "a1Bxx0000004XyzDEF",
        "deletedTemplateRecordId": "0Q0xx0000004CabCAE"
      }
    ]
  }
}
```

## Response Parameters

| Parameter               | Type   | Description                                                                                                                                |
| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| deletedTemplateId       | String | The ID of the deleted SalesConfigTemplate\_\_c record.                                                                                     |
| deletedTemplateRecordId | String | The ID of the deleted underlying Quote or Order (only present when deleteTemplateRecord was true and the record was successfully deleted). |
