Templates
Templates
Templates are ready-made message and document content used by business rules and the escalation mechanism. They can include variables that are automatically populated with issue data.
Template management is available under Configuration → Templates.
Template types
| Type | Description | Editor |
|---|---|---|
| HTML email message | HTML code editor with preview | |
| SMS | Short text message | Text editor with character counter |
| PDF document attached to an email | HTML code editor with preview | |
| Webhook | JSON body sent to a webhook | Text editor with JSON rules |
The template type is set at creation and cannot be changed afterwards.
Template settings
- Template type — email, sms, pdf, or webhook
- Name — multilingual template name
- Description — multilingual template description
- Content — edited separately for each language
For email and PDF templates an additional option Partial template is available. Partial templates are fragments embedded inside other templates — they cannot be used on their own.
Variables
Variable placeholders can be inserted into template content and are automatically substituted during sending. Variables are available through the Insert keywords panel in the editor.
System variables
Format: {{variable_name}}
{{current_date}}— current date{{current_time}}— current time{{logged_first_name}}— logged-in user's first name{{logged_last_name}}— logged-in user's last name{{logged_email}}— logged-in user's email address{{logged_position}}— logged-in user's position{{logged_phone}}— logged-in user's phone number
Issue, customer, and related entity variables
Variables correspond to application fields defined in the system:
{{issue_<field_code>}}— value of an issue field{{customer_<field_code>}}— value of a customer field{{distributor_<field_code>}}— value of a distributor field{{service_<field_code>}}— value of a service field
Special issue variables are also available:
{{issue_system_url}}— link to the issue in the system{{issue_status_url}}— link to the public status page{{issue_status_link_qr_code}}— QR code image linking to the status page{{issue_internal_number_barcode}}— barcode image with the issue number
For issues created from Allegro returns the variables {{allegro_return_number}}, {{allegro_return_status}}, {{allegro_return_reasons}}, {{allegro_buyer_login}} and {{allegro_waybill}} are available.
Partial templates
Another partial template can be embedded inside an email or PDF template:
The include syntax is generated automatically by the editor when you select a template from the variables panel — no need to type it manually.
The list of available partial templates is shown in the variables panel.
Webhook template
A template of type Webhook is the JSON body sent by the Sending webhook rule action to a webhook. The editor is plain text, with a summary of the rules below shown above it.
Rules
- The result must be valid JSON. Check it with Send test on the webhook — with the chosen template and issue.
- A field value is one variable with the
|jsonfilter. The filter adds the quotes and escapes special characters (quotes, line breaks,&), so you don't write your own quotes:{"customer": {{ customer_name|json }}, "number": {{ issue_internal_number|json }}} - Several variables in one text are joined into one expression in parentheses with
~. Variables inside are written without curly braces and without|json, and the|jsonfilter goes once, at the end:{"text": {{ ("Issue " ~ issue_internal_number ~ " – " ~ customer_name)|json }}} - Don't put a variable inside quotes.
{"text": "Issue {{ issue_internal_number }}"}only works until the issue data contains a quote or a line break — then the JSON is no longer valid and the message is not sent. - The variables panel inserts the right form for you. Outside an expression it inserts
{{ variable|json }}; when the cursor is inside parentheses with~, it inserts just the variable name with the missing~.
All variables known from email templates are available. Starter Templates contain ready-made patterns for a generic webhook, Slack, Google Chat and Microsoft Teams.
If the template does not produce valid JSON for a given issue, the rule sends nothing and the system log gets a WEBHOOK_INVALID_PAYLOAD error. The maximum size of the data sent is 256 KB.
Starter templates
When creating a template, the Starter templates feature is available — ready-made patterns to select as a starting point for editing.
Where templates are used
- Issue messages — when sending an email or SMS from an issue, a template can be selected as the basis for the message content
- Document generation — PDF templates enable generating documents (e.g. reports, confirmations) available for download from the issue
- Business rules — email, SMS and webhook sending actions reference a template; PDF templates can be attached as email attachments
- Escalations — each issue type can have an email template assigned for escalation notifications
FAQ
Can a template contain HTML?
Yes, email and PDF templates support HTML. SMS templates support plain text only.
How do I preview a template?
The email and PDF editors have a preview mode accessible via the Preview tab — the rendered HTML is shown there.
What is a partial template?
A partial template is a reusable content fragment (e.g. a footer or header) embedded in other templates using the {% include %} tag. It cannot be sent on its own.
Can a template include a QR code or barcode?
Yes. The variables {{issue_status_link_qr_code}} and {{issue_internal_number_barcode}} generate QR code and barcode images that can be inserted into an HTML template.
Can the template type be changed after creation?
No. The template type is fixed at creation and cannot be changed.
How do I know which variables are available?
The full list of variables is shown in the Insert keywords panel in the template editor. Variables include issue and customer fields defined in the application fields configuration.