Templates are requested via a single end point: goss.CommsTemplateManager.GetTemplate.
Request Parameters
| Name | Type | Description |
|---|---|---|
| application | String, required | The name of the application |
| template | String, required | The name of the template |
| variation | String, required | The name of the variation |
| lang | String, optional | The name of the language version. Either "EN", "CY" or "GD". Defaults to "EN" if not provided |
Example Request
function(params, credentials) {
let template = this.invokeEP('goss.CommsTemplateManager.GetTemplate', {
"application": "Job Applications",
"template": "Standard Reply",
"variation": "1",
"lang": "EN"
});
return template;
}
Response
The result object includes status information, and the template's subject, body and SMS message.
| Name | Type | Description |
|---|---|---|
| success | Boolean | true if everything went ok |
| inactive | Boolean | true if the template has been flagged as inactive |
| fallback | Boolean | false if a template has been found, true if a "fallback" has been used |
| subject | String | The subject line of the template |
| body | String | The template body |
| smsmsg | String | The SMS message |
Example Response
{
"jsonrpc": "2.0",
"id": 600,
"result": {
"success": true,
"inactive": false,
"fallback": false,
"subject": "Thanks for your application",
"body": "<p>Hi {{form_NAME}},</p>\n<p>Thanks for applying for the {{form_ROLE}}.</p>\n<p>We'll be in touch soon.</p>",
"smsmsg": ""
}
}
Using the Template
This is an example workflow Mail Task using the response from a call to get a template. The response from the end point has been stored in the

