Return to main navigation Page
In release 2015 R2, the feature called Email Template Editor was renamed Email Designer.
Contact your Customer Success Manager to upgrade to the latest release of CPQ Cloud.
The emailGenerator REST API allows an external system to send a REST call to request an HTML Email Designer email from CPQ Cloud based on simple parameters.
When executed correctly, the external system will receive the URL of the generated HTML email in the Location header of the REST response from CPQ Cloud.
The call must contain HTTP Basic Authentication with valid CPQ Cloud FullAccess credentials in the header, as well as the Commerce Process, Email Designer template, Transaction ID, and language that the email will be generated by specified in the body.
POST—Returns the URL of an HTML email generated by an Email Designer template.
GET— Returns schema for the resource (REST call does not require a payload).
||The base URL of the CPQ Cloud site.|
|Headers||Accept (Basic Authentication with valid CPQ Cloud FullAccess credentials)|
(Parameters Bolded and Red)
"processVarname":"[Process Var Name]",
The variable name of the Commerce Process.
All Commerce Processes’ variable names are listed in the REST API metadata schema. See the Email Generator REST API Metadata section for more information.
The name of the Email Designer Template.
All Email Designer template names (and the Commerce Processes they are in) are listed in the REST API metadata schema. See the Email Generator REST API Metadata section for more information.
||The Transaction ID of the Transaction from which the email will be generated.|
The language code of the language in which the email will be generated.
All language codes are listed in the REST API metadata schema. See the Email Generator REST API Metadata section for more information.
|HTTP Methods||POST, GET (Does not require a payload)|
204 – Success
POST—The URL of the generated email will be in the response’s Location header.
GET—The schema of the resource will be in the response body.
400 – Bad request
An error message will say whether the Commerce Process variable name, Transaction ID, template, language, or a combination of those parameters were not found, or if there was an error deploying or generating the template.
401 – Unauthorized
Valid CPQ Cloud FullAccess credentials were not provided in the header.
|Sample URI Endpoint||
|Sample Payload (Parameters Bolded and Red)||
"templateName":"Discount Approval Template",
In addition to getting the schema through a GET call, when writing emailGenerator REST API calls, admins can access the resource’s metadata schema through the Interface Catalogs.Navigate to the Interface Catalogs by clicking Admin to go to the Admin Home Page and then clicking Interface Catalogs in the Integration Platform section. Clicking the emailGenerator resource will open the metadata schema in a new window.
The metadata schema includes all possible Commerce Process variable names (
processVarname), Email Designer template names (
templateName), and language codes (
in each corresponding description object that can be used in a REST
call to the emailGenerator API, and should be used to inform REST calls
that are being written. The following screenshot shows a sample
emailGenerator resource metadata schema.
For more information on the Interface Catalogs, see Interface Catalog.