Skip to content

Commit 8e665c7

Browse files
os-zhuangclaude
andauthored
docs(configure): say which channels render a Notification Template (#247)
The page described Templates as the render stage for every delivery — pipeline step 3 and the Notification Templates section. Traced on objectstack origin/main: only the email and SMS channels read sys_notification_template (both take the NotificationTemplateStore and call renderNotification). The inbox channel is registered without that store; it writes sys_inbox_message from the notification's own title/body, and its notify-template path renders a sys_email_template row through IEmailService.renderTemplate instead. Since a notification with no explicit channels goes to inbox alone, the delivery an admin is most likely looking at is the one that ignores the template row they are editing. Enumerates the three channels, names sys_email_template only as the object the inbox template path consults (the Email page owns it), and describes today's wiring without forecasting a seam. Claude-Session: https://claude.ai/code/session_016TUrhcggSFrYctvp5dsV1A Co-authored-by: Claude <noreply@anthropic.com>
1 parent 376b29e commit 8e665c7

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

‎content/docs/configure/notifications.mdx‎

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ emit() + explicit audience → Notification Event → recipients, filtered b
2525
read it.
2626
3. **Routing** — For each event, ObjectOS expands the audience the producer
2727
passed into recipients, checks whether each recipient allows that topic on
28-
that channel (**Preferences**), and renders the message for the recipient's
29-
channel and locale (**Templates**).
28+
that channel (**Preferences**), and hands each accepted delivery to its
29+
channel, which renders it. What a channel renders *from* differs by channel:
30+
email and SMS render **Notification Templates**; the in-app inbox does not
31+
(see [What each channel renders](#what-each-channel-renders)).
3032
4. **Inbox Message** (`sys_inbox_message`) — The materialized, per-user result
3133
the recipient actually sees in their inbox.
3234

@@ -41,7 +43,7 @@ For a single event, these are the inputs that decide who gets what:
4143
|---|---|
4244
| The audience passed to `emit()` | *Who receives this?* — the producer names the recipients, and this is the only input that puts anyone on the list |
4345
| Notification Preference | *Does this recipient allow it here?* — the per-user mute/allow for the topic and channel, applied to every (recipient × channel) pair |
44-
| Notification Template | *How is it written?* — the subject and body to render for the recipient's channel and locale |
46+
| Notification Template | *How is it written?* — the subject and body rendered on the **email** and **SMS** channels. The in-app inbox does not read these rows; see [What each channel renders](#what-each-channel-renders) |
4547
| Notification Subscription | *Who declared standing interest?* — admin-authored rows, **not consulted when an event is routed** |
4648

4749
A recipient reaches the inbox when the producer's audience resolves to them and
@@ -155,9 +157,10 @@ value first.
155157

156158
At **Setup → Configuration → Notification Templates** (`sys_notification_template`).
157159

158-
A per **(topic × channel × locale)** render template. Templates turn an event
159-
payload into the subject and body a recipient reads, in their locale and for
160-
their channel.
160+
A per **(topic × channel × locale)** render template, read by the **email** and
161+
**SMS** channels: a template turns an event payload into the subject and body
162+
those channels send. The in-app inbox does not read these rows — see
163+
[What each channel renders](#what-each-channel-renders).
161164

162165
| Field | Purpose |
163166
|---|---|
@@ -175,6 +178,23 @@ capabilities you run, so most of your work is editing template content or
175178
toggling `is_active`, `enabled`, and preference defaults rather than creating
176179
records from scratch.
177180

181+
### What each channel renders
182+
183+
Rendering happens per channel, and only two channels read the rows above:
184+
185+
| Channel | Renders from |
186+
|---|---|
187+
| **Email** | The Notification Template matching (topic, `email`, locale). With no matching active row, the notification's own title and body are sent as-is |
188+
| **SMS** | The Notification Template matching (topic, `sms`, locale), with the same fallback |
189+
| **In-app inbox** | **Not a Notification Template.** The inbox row is written from the notification's own title and body — the topic, when the producer set no title. When the notification names an email template instead, the inbox renders that one: a `sys_email_template` row resolved by (name, locale) through the email service, which [Email](/docs/configure/email#templates) documents. Without an email service able to render it, that delivery fails rather than falling back |
190+
191+
> **Warning:** `inbox` is the **default** channel — a notification that names no
192+
> channels is delivered there and nowhere else. So the delivery an admin is
193+
> most likely looking at is the one that never reads a Notification Template:
194+
> editing a template row here changes what email and SMS send, and changes
195+
> nothing about the in-app message. This page describes the wiring as it
196+
> stands; it does not forecast an inbox seam to these rows.
197+
178198
## Where to go next
179199

180200
| Task | Page |

0 commit comments

Comments
 (0)