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 

ParameterTypeRequiredDescription
templateIdStringYesThe SalesConfigTemplate__c record ID.
deleteTemplateRecordBooleanNoIf true, also deletes the underlying template Quote or Order and its line items.
forceDeleteBooleanNoIf 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):

1{
2  "success": true,
3  "errorCode": "INVOKE-200",
4  "error": "OK",
5  "result": {
6    "messages": [],
7    "records": [
8      {
9        "deletedTemplateId": "a1Bxx0000004XyzDEF",
10        "deletedTemplateRecordId": "0Q0xx0000004CabCAE"
11      }
12    ]
13  }
14}

Response Parameters 

ParameterTypeDescription
deletedTemplateIdStringThe ID of the deleted SalesConfigTemplate__c record.
deletedTemplateRecordIdStringThe ID of the deleted underlying Quote or Order (only present when deleteTemplateRecord was true and the record was successfully deleted).