Bosca / Communications

Event Templates

Emails that render themselves

A transactional email doesn't ship its own copy. It names an event, and the matching template renders at send time with that event's data — so the words, the layout, and the links come from a document you can change without touching code.

From event to email

Name the event, not the message

Application code sends a message that references an event key, not a block of HTML. A registry resolves that key to the right template at send time, so the code that fires an email never has to know how the email looks.

  • An event key resolves to a template through a registry, at send time.
  • The same send can go to email and push from one message.
  • Change the template and the next send picks it up — no redeploy.
resolve
event order.shipped
template store / shipping-notice

Rendered per recipient

Personal, down to the footer

When a message goes to one person, the template renders with their data — and the unsubscribe and preferences links in the footer are minted just for them, so a single click works without a login. Out comes a subject, an HTML body, a plaintext alternative, and any inline images.

  • Rendered at send time with the event's payload and the recipient's details.
  • One-click unsubscribe and preferences links, tokenized per recipient.
  • HTML and a plaintext alternative, plus inline images, every time.
rendered email
Your order is on its way
HTMLtext2 inline images
one-click unsubscribe · minted for this recipient

Versions & rollback

Ship a version, pin a version

Templates are published as versioned artifacts, and a project can pin the exact version it sends. If a change goes wrong, roll the pin back to a known-good version — no redeploy, no scramble, just the previous template taking over on the next send.

  • Each render records the published version that produced it.
  • Pin a version per project to control exactly what goes out.
  • Roll back by moving the pin — the fix is live on the next send.
store · versions
v6draft
v5last published
v4pinned · sending now

Keep exploring

More on Communications