Docs to update the multi-tenancy page#1000
Conversation
✅ Deploy Preview for docs-novu ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughRewrites multi-tenancy docs to adopt a context-driven model (Tenant Context JSON), replacing subscriberId-based examples with context creation, propagation, inbox filtering, and template personalization. Minor formatting change in inbox-with-context table (emoji → text). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Dashboard
participant API
participant WorkflowEngine
participant InboxService
participant TemplateRenderer
rect rgb(230,247,255)
Note over Dashboard,API: Create/Manage Tenant Context (JSON)
end
User->>Dashboard: Define Tenant Context
Dashboard->>API: Store Context (tenantId, org, region, flags)
API-->>User: Context saved
Note over WorkflowEngine,API: Trigger workflows with Context
User->>API: Trigger Workflow (subscriber, context)
API->>WorkflowEngine: Start workflow + Context payload
WorkflowEngine->>TemplateRenderer: Render notification with context data
TemplateRenderer-->>WorkflowEngine: Rendered message
par Delivery and Inbox filtering
WorkflowEngine->>InboxService: Persist notification (subscriber, context)
InboxService-->>WorkflowEngine: Acknowledged
User->>InboxService: View Inbox (filter by context)
InboxService-->>User: Filtered messages (match context)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
18-24: Minor: Fix spacing inconsistency in table.The change from emoji to text indicators improves accessibility, but line 21 has extra leading space before "No" that creates misalignment.
-| `{ "tenant": "acme" }` | `{ "tenant": "globex" }` | No | +| `{ "tenant": "acme" }` | `{ "tenant": "globex" }` | No |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx(1 hunks)content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)
🔇 Additional comments (4)
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx (4)
1-15: Well-structured introduction to context-driven approach.The updated description and opening clearly signal the shift from subscriber identifiers to context-driven multi-tenancy. The prerequisite callout and foundational explanation set appropriate context for readers.
21-51: Clear tenant context definition with good progression of examples.The section effectively defines Tenant Context and progresses from simple to rich object examples. The callout about automatic creation and the link to Manage Contexts guide provide good context for readers.
53-87: Workflow example clearly demonstrates context application.The code example and explanation effectively show how to pass tenant context when triggering workflows. The note about automatic creation vs. reuse of existing contexts is important and well-placed.
89-120: Inbox filtering section properly aligns with companion documentation.The code example and explanation are consistent with the context-matching rules documented in the companion file. The section effectively closes the loop between workflow triggering and Inbox display.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx (1)
25-25: Fix capitalization: "if" should be capitalized after period.Line 25 has a minor capitalization issue where "if" should be "If" (starting a new sentence).
-You can create a tenant context using the Novu dashboard, API or from the <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method>. if it doesn't already exist, Novu automatically creates it. +You can create a tenant context using the Novu dashboard, API or from the <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method>. If it doesn't already exist, Novu automatically creates it.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
- GitHub Check: Build and Lint
🔇 Additional comments (4)
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx (4)
132-136: Previous incomplete sentence issue is resolved.The past review flagged an incomplete sentence around line 136. The current revision properly completes the "Dynamic logic per tenant" subsection with a clear example (line 134) and a complete Callout reference (line 136), addressing the prior concern.
53-88: Excellent refactor to context-driven model with clear workflow example.The migration from subscriberId-based examples to Tenant Context is well-executed. The workflow trigger example clearly shows:
- How to structure the context object with both ID and metadata
- That the same context is reused across workflows and inbox
- The relationship between context definition and notification isolation
The explanation at lines 55–57 (checking if context exists, reusing vs. creating) is valuable for preventing accidental overwrites.
89-121: Inbox filtering section is well-structured with practical guidance.This section effectively mirrors the workflow example, showing subscribers how to pass the same tenant context to the Inbox component for consistent filtering. The callout at line 120 linking to the Inbox with Context guide is a good touch for discoverability.
122-128: Customization section clearly distinguishes templates from workflow logic.Breaking out "Using tenant data in templates" (line 128–130) and "Dynamic logic per tenant" (lines 132–134) helps readers understand both the template-level
{{context}}helper and workflow-level conditional routing. This supports the goal of eliminating workflow duplication while maintaining tenant-specific experiences.
Summary by CodeRabbit