Skip to main content

Message Templates

Message Templates are shared, versioned Scriban templates that workflow actions can reference instead of carrying their own inline template text. Edit a template once and every workflow action that links to it picks up the new content automatically, the next time it runs.

Overview​

Notification and Render Template workflow actions need template content: a notification body, or formatted output for a downstream action. The two HTTP actions send the body their integration endpoint defines, which carries its own version history, so they do not link to a message template. Writing that content inline, directly in the action, works fine for a one-off. But when several workflows send the same shipment confirmation, or several actions post the same JSON shape to the same integration, keeping that content in sync by hand becomes error-prone.

Message Templates solve this by giving template content its own identity, separate from any single action. From the Templates tab of the Workflows page (/workflows/templates) you can:

  • Create and edit shared templates with a full editor, including live preview and variable browsing
  • Review the full version history of a template and roll back to an earlier version
  • See which workflow actions currently reference a template before you change or delete it

Permissions​

PermissionWhat It Allows
View WorkflowsSee the Message Templates list and view template details
Manage WorkflowsCreate, edit, and delete templates

This is the same permission pair that gates Workflows and Workflow Executions. It is hidden from the Operator role by default, and for the beta Manage Workflows is held by the Admin role only, so a Contributor can read templates but not change them. See Users, Roles & Access Scopes.

The Message Templates List​

ColumnDescription
NameTemplate name
Content typeText, Markdown, JSON, or XML
VersionThe current version number
EngineThe rendering engine (Scriban today)
DescriptionOptional notes about what the template produces and where it's used
Created / UpdatedAudit timestamps (hidden by default)
ScopeAccess scope (shown when multiple scopes are active)

Search matches template name or description. Every column can be shown or hidden from the column chooser on the grid header, and your choices are remembered between sessions.

Creating a Template​

Templates live on the Templates tab of the Workflows page (/workflows/templates). Choose Template from that page's Add menu to open the editor workspace at /message-templates/new. The layout is the same editor used for inline templates inside workflow actions, but full-size: an activity strip on the left toggles four side panels, and the template editor itself is always visible.

  • Details: Name, Description, Content type, and (if your organization has more than one site scope and the site catalog policy allows it) an Availability choice between Shared across your organization or one site only. New templates open here, since the template needs a name before anything else matters.
  • Variables: Browse or search available variables by group, then click one to insert it at the cursor. Covers the scan event, its tags, mapped inventory items, catalog items, and any custom fields defined on your item types, the same variable set available inside a workflow action's template editor.
  • Preview: Renders the template against sample data automatically as you type (after a brief pause), with a manual refresh available too. Sample custom field values use your organization's real field keys, shaped to each field's declared type (a Number renders as a number, a Boolean as true/false), so the previewed JSON actually parses. If a path in your template finds nothing, an info banner beneath the preview lists it by line number, since Scriban renders a typo and a genuinely empty value the same way; a custom field your schema defines but this particular sample item leaves blank is not flagged, because that's a data gap rather than a mistake in the template.
  • Starters: A catalog of starting-point templates filtered to your selected content type. Applying a starter replaces the current editor content (with a confirmation if you've already written something), and you can switch content type in Details to see other starters.

Only one side panel is open at a time; click its icon again to close it and give the editor more room. Editing an existing template opens with all panels closed, for maximum editing space.

Versioning​

A template's history is append-only: every edit that changes the rendered output (content or content type) creates a new version rather than overwriting the last one. The current version is always the highest version number.

When you save a change that creates a new version, Tagnet prompts for an optional comment (for example, "Added lot number column") before saving; cancel the prompt and the save is aborted. Saves that only touch the name, description, or scope, without changing content, skip this prompt since they don't create a new version.

Viewing History and Rolling Back​

Open a template's detail page and switch to the Versions tab to see every version: its number, content type, timestamp, author, and comment. Click View on any version to see its content inline.

To restore an earlier version, click Roll back. This does not delete anything or rewrite history: it creates a new version that copies the target version's content, so rolling back to v3 when you're on v7 produces a new v8 with v3's content. The full history, including the version you rolled back from, stays intact and visible.

Using a Template in a Workflow Action​

On a Notification or Render Template action (or an HTTP action configured before endpoints existed, for its own body), choose between:

  • Inline Template: write the template directly in the action, as before.
  • Shared Template: link a template managed on the Templates tab of the Workflows page. The dropdown is filtered to templates matching the action's content type and shows each one's current version number.

An action linked to a shared template always renders the template's current version at execution time. If someone rolls back or edits the shared template after your workflow was saved, the workflow picks up the change automatically on its next run, no re-save required. If the linked template is deleted, the action fails at run time with a clear error rather than during workflow save, so deleting a template does not retroactively break a workflow's configuration; deleting the template does, however, immediately break its next scheduled use.

Tip: Because linking is by template, not by version, a shared template is the right choice when several actions or workflows should always send the same content and stay in sync. Use an inline template when the content is specific to that one action and unlikely to be reused elsewhere.

Viewing Template Details​

Click any row (or choose Details from the row actions menu) to open the template's own page. The Overview tab shows:

  • Basics: Name, current content type, current version number, and description
  • Content: The current version's rendered content
  • Used by: Every workflow action currently linked to this template, by workflow and action name. An action on a disabled workflow shows a Disabled chip, since it won't actually execute until that workflow is turned back on

Deleting a template that's in use shows a warning naming the affected workflows before you confirm, since those actions will fail until they're reassigned to a different template or switched to inline content.

Best Practices​

  • Use shared templates for anything reused: If two or more workflows send the same notification wording or post the same payload shape, make it a shared template instead of maintaining copies.
  • Check "Used by" before editing: A template's Overview tab shows exactly which workflow actions depend on it, so you can judge the blast radius of a change before saving.
  • Add a version comment for non-trivial changes: Future you (or a teammate) will thank you when scanning the version history for what changed and why.
  • Prefer rollback over manual re-entry: If a recent change causes problems, roll back to the last known-good version instead of retyping it from memory.
  • Keep inline templates for one-offs: Not every template needs to be shared. If content is specific to a single action and unlikely to be reused, inline keeps it simpler to find and edit.