Module Reference

Outbox

One queue for every email and LINE message the app sends, with delivery status, retries and team alerts.

Outbox is the one queue every email and LINE message goes through. A Module that sends a booking confirmation, a points update or a purchase order to a supplier queues the message here, and one sender delivers it, retries it after a failure, and records what happened. The Outbox page lists every message with its delivery status, and Settings → Notifications decides which staff hear about which events. Outbox sends messages but doesn't write them: the Module that queues a message builds its text and its LINE card, and keeps the switches for its own customer messages. Booking, Membership, POS, Supply chain and others send through it.

What it handles

  • A message triggered twice. A message is queued once per sending Module and key, so a booking confirmation that fires twice is sent once. When two senders run at the same time, each waiting message still goes out exactly once. Tested: "Outbox: message queue"
  • A send that may have gone out anyway. A rate limit or an unreachable provider is retried with longer waits, up to five tries, and then the message is marked failed. A server error or a dropped connection can come after the email went out, so that message is marked Unknown and never resent on its own. Tested: "Outbox: message queue"
  • Staff fixing failed messages. Staff with outbox:retry retry a failed message, which sends at once and is audited; a message already sent can't be queued again. Staff with only outbox:read see the queue but can't act on it. A manager tied to one Location sees only that Location's and business-wide messages, and a customer's manage-booking link never shows its token in a preview. Tested: "Outbox: operator actions"
  • LINE cards LINE would reject. A card over LINE's size limit, alt text that's too long, or an image on a plain http address is refused when the message is queued, so the sending Module finds out at once and nothing is queued. Tested: "Outbox: rich messages"

What you build on top

  • Team alerts. A Module declares a kind of alert ("A booking was made") with outbox.alert-type, and Settings → Notifications lists a row for it where an admin picks who gets it by email or LINE. Each person gets it once per channel they chose. With POS on, outbox.alert-channel adds On the register, which shows the alert on that Location's registers.
  • Customer message switches. outbox.customer-message puts a Module's own customer-message controls (booking confirmations, reminders) on Settings → Notifications, while the Module keeps the setting. See Extend a Module.
  • Connections. LINE messages go out through the app's LINE connection.
  • In code. Your coding agent imports Outbox only through its public API: index.ts and server/index.ts in apps/web/src/modules/outbox/. See Build on a Module.

Limits

  • Email and LINE are the only channels. There is no SMS.
  • A message marked Unknown waits for a person. Check with the recipient, then choose Resend anyway, Mark as sent or Cancel.

Facts

Pages

WherePath
Admin/admin/outbox

Permissions

Admin holds every key. The other roles listed hold it when the app first gets the Module; after that, roles are yours to change under Settings → Roles & Permissions.

PermissionWhat it allowsOrganization roles that start with it
outbox:readView outgoing email and LINE messages and their delivery status.Admin, Manager, Viewer
outbox:retryRetry, resend, mark as sent, or cancel outgoing messages.Admin, Manager
settings:writeConfigure resources, schedules, availability, fares, blocked periods, and queue setup.Admin

Data

  • Tables: notification_person, notification_subscription, outbound_message, register_notice, register_notice_seen

Slots

Places other Modules and your app code can add to. See Extend a Module.

  • outbox.alert-type
  • outbox.alert-channel
  • outbox.customer-message

Tested workflows

  • Outbox: the drain runs only when a message is waiting
  • Outbox: message queue
  • Outbox: operator actions
  • Outbox: rich messages
  • Outbox: admin home
  • Outbox: team alerts
  • Outbox: alert and message rows follow the Modules that are on
  • Outbox: email previews
  • Outbox: email layout follows the app theme
  • Outbox × POS: register notices (with POS on)