| copyright |
|
||
|---|---|---|---|
| lastupdated | 2025-09-10 | ||
| keywords | event-notifications, event notifications, about event notifications, templates, code engine | ||
| subcollection | event-notifications |
{{site.data.keyword.attribute-definition-list}}
{: #en-code-engine-notification-template}
{{site.data.keyword.codeenginefull_notm}} is a serverless platform that runs your containerized workloads, including web apps, micro-services, event-driven functions, or batch jobs. {{site.data.keyword.codeengineshort}} represents a service destination, where an incoming notification can be consumed programmatically. For example, an incoming notification about an event can trigger a {{site.data.keyword.codeengineshort}} destination to a backend microservice to act based on the content of the incoming notification. {: shortdesc}
For more information on the Code Engine destination, see Code Engine.
{: #en-construct-code-engine-template}
Construct the template block. Make sure that the template is a well-formed JSON that adheres to the Handlebars template syntax and semantics.
Handlebars is a templating language that allows for dynamic content generation within templates. Handlebars can be used to customize notification messages by using template variables and conditional logic.
To learn more about Handlebars integration and the various helpers offered, see Handlebars Integration. {: note}
{: #en-code-engine-template-example}
{: #en-code-engine-job-templates}
{
"run_env_variables": [
{ "name": "region", "value": "{{data.region}}","type": "literal"},
]
}See Create a Job run to find more parameters that you can integrate into the template.
{: #en-code-engine-template-functions-applications-templates}
For function and application templates, you can define them as per your requirement.