Skip to content

Settings — Signature Template Editor

The Signature template editor (/settings/signatures/:id) is the visual authoring surface for a single staff-signature template. It captures the HTML body, scope (org-wide or division), default flag, and renders a live preview against either generic example data or a real org user.

This is the page that opens when you click Edit on a row of Settings ▸ Staff Signatures, or when you finish creating a new template from the list-page slide-out.

Settings Signature Editor — Acme Financial Group demo tenant

A standard PageHeader sits above the inline editor row, providing the help and docs icons. The page title here is intentionally static (Edit Signature Template) — the editable template-name field lives in the row below as an inline <Input> so admins can rename without leaving the page.

Below the PageHeader:

  • Back-to-list button (with unsaved-changes guard)
  • Template-name <Input> (editable; this is the visible “title” of the template being edited)
  • Delete (admin-only, with confirm dialog)
  • Save

A RichTextEditor component for the signature body. Toolbar exposes bold, italic, links, lists, and an Insert merge variable picker. Server-side sanitization happens on save; client-side sanitization happens on every render via DOMPurify as defense in depth.

Below the editor:

  • Division scope — dropdown bound to Settings ▸ Divisions; blank = org-wide
  • Default — boolean toggle; only one template per org can hold this flag

A live render of the template:

  • Generic preview (default) — uses hardcoded example values for every token
  • Preview as — pick any user from a 100-row directory dropdown to render against their actual profile

When the template uses tokens like {{credentials}} that resolve at email-send time (not at copy-to-clipboard time), the page surfaces a small notice explaining the deferred-render semantics.

The supported set is fixed in code. Common tokens:

TokenSourceDeferred?
{{full_name}}users.name_first + name_lastNo
{{title}}employee_profiles.titleNo
{{email}}users.emailNo
{{phone}}employee_profiles.phoneNo
{{headshot_url}}employee_profiles.headshot_urlNo
{{org_name}}org.nameNo
{{org_logo_url}}org.logo_urlNo
{{org_address}}org.addressNo
{{credentials}}Active credentials at send timeYes

Deferred tokens are documented with a notice on the page so admins know the difference between “what shows in the preview” and “what shows when an email actually goes out.”

  • Org-wide = blank division, available to assignment for any user
  • Division-scoped = only assignable to users in that division
  • Default = the one template the platform falls back to when no explicit assignment + no division match

The default is exclusive — toggling it on for one template automatically toggles it off for the previous default. There must always be at most one default; the platform refuses an attempt to clear the only default without designating a new one.

RoleViewEditDeleteSet default
Owner / Admin
Member
Viewer
ActionEvent
Savesignature_template.updated
Set defaultsignature_template.default_set
Deletesignature_template.deleted

Events surface in Settings ▸ Audit Log.

The render flow on every fetch from /signatures/me:

  1. Resolve the user’s signature template via the assignment fallback (explicit user > division default > org default)
  2. Substitute every supported merge token against the user’s profile + org metadata
  3. HTML-escape every substituted value (#108.1)
  4. Resolve deferred tokens at email-send time, not at this render
  5. Sanitize via DOMPurify before sending

The same pipeline is used for the live preview on this page — “Preview as” mode runs steps 1-3 against the chosen user, with the deferred-token notice shown for any unresolved deferred tokens.

SymptomMost likely causeFix
Token literal shownTypo or unsupportedUse Insert merge variable
Preview empty for real userUser profile incompleteDifferent user, or fill profile
Save failsEmpty nameType a name
Cannot deleteTemplate assignedReassign under Settings ▸ Team
Default toggle won’t stickRace with another adminRefresh and re-toggle