Skip to content

Docs to update the multi-tenancy page#1000

Merged
Aviatorscode2 merged 2 commits intomainfrom
MRK-1110-tenancy
Nov 3, 2025
Merged

Docs to update the multi-tenancy page#1000
Aviatorscode2 merged 2 commits intomainfrom
MRK-1110-tenancy

Conversation

@Aviatorscode2
Copy link
Contributor

@Aviatorscode2 Aviatorscode2 commented Oct 31, 2025

Summary by CodeRabbit

  • Documentation
    • Reworked multi-tenancy docs to emphasize a context-driven approach with clearer, tenant-boundary guidance and step-by-step instructions.
    • Added sections: how multi-tenancy works with Contexts, defining/applying tenant context in workflows, filtering the Inbox by tenant, using tenant data in templates, and dynamic per-tenant logic.
    • Updated examples and guidance to use Contexts; adjusted Inbox display table to use plain "Yes"/"No" indicators.

@Aviatorscode2 Aviatorscode2 requested a review from ChmaraX October 31, 2025 11:25
@linear
Copy link

linear bot commented Oct 31, 2025

@netlify
Copy link

netlify bot commented Oct 31, 2025

Deploy Preview for docs-novu ready!

Name Link
🔨 Latest commit c2e48f0
🔍 Latest deploy log https://app.netlify.com/projects/docs-novu/deploys/69049ee5ad663b00085dff93
😎 Deploy Preview https://deploy-preview-1000--docs-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

Rewrites 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

Cohort / File(s) Summary
Multi-tenancy documentation rewrite
content/docs/platform/inbox/advanced-concepts/multi-tenancy.mdx
Full rewrite: replaces subscriberId-based approach with context-driven multi-tenancy; introduces Tenant Context concept and JSON examples; shows context creation (dashboard/API/Inbox), applying context in workflows, inbox filtering by tenant context, using tenant data in templates, and tenant-specific conditional logic; removes prior component imports and FAQ accordion; adds contextual callouts and links to Contexts guides.
Inbox with context formatting
content/docs/platform/inbox/configuration/inbox-with-context.mdx
Small formatting change in a table: replaces emoji indicators (✅/❌) with plain text ("Yes"/"No") in the Displayed? column.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Focus review on conceptual accuracy and consistency with existing Contexts docs (tenant context structure, propagation examples).
  • Verify code snippets and links in multi-tenancy.mdx.
  • Confirm the minor table formatting change in inbox-with-context.mdx.

Possibly related PRs

Suggested reviewers

  • ChmaraX
  • DianaHackmamba

Poem

🐰 I tuck a context in every note,

tenant fields in JSON coat.
No more IDs strewn in the hay,
Context guides the inbox way.
Hop on—notifications bloom today! 🌸

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "Docs to update the multi-tenancy page" is related to the changeset as it references the document being modified. However, the title uses generic and non-descriptive language that fails to convey the primary nature of the changes. The pull request fundamentally restructures the multi-tenancy documentation to shift from tenant-isolation by identifiers to a context-driven multi-tenancy approach, introducing new sections and conceptual frameworks. The generic phrase "update the multi-tenancy page" does not meaningfully communicate this significant conceptual shift, leaving teammates unclear about what aspects or principles this PR addresses. Consider revising the title to be more specific and descriptive of the main change. A stronger title might be something like "Docs: Restructure multi-tenancy guide to emphasize context-driven approach" or "Docs: Refactor multi-tenancy documentation to use context-based patterns," which would better convey the primary focus and intent of the changes to future reviewers.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch MRK-1110-tenancy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a382188 and 5a6f5e4.

📒 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5a6f5e4 and c2e48f0.

📒 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.

@Aviatorscode2 Aviatorscode2 requested a review from scopsy October 31, 2025 16:50
@Aviatorscode2 Aviatorscode2 merged commit 061b42c into main Nov 3, 2025
6 checks passed
@Aviatorscode2 Aviatorscode2 deleted the MRK-1110-tenancy branch November 3, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants