Skip to content

Commit 499c433

Browse files
authored
Merge pull request #878 from novuhq/fix/concepts_pages_part_02
fix: topics, environments, preferences, tenants
2 parents ec6379a + f5d8305 commit 499c433

File tree

9 files changed

+279
-137
lines changed

9 files changed

+279
-137
lines changed

content/docs/platform/concepts/endpoint.mdx

Lines changed: 0 additions & 57 deletions
This file was deleted.

content/docs/platform/concepts/environments.mdx

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ Use the development environment to test new notification workflows, validate cha
1212

1313
## Production Environment
1414

15-
The production environment is your live environment where notifications are sent to real users.
15+
The production environment is your live environment where notifications are sent to real users. Use the production environment for production use cases, and other environments for non-production use cases.
1616

1717
## Custom Environments
1818

19-
<Callout type="info">Custom environments are available in Business and Enterprise plans</Callout>
19+
<Callout type="info">Custom environments are available in Team and Enterprise plans.</Callout>
2020

2121
Create custom environments to match your development workflow:
2222

23-
1. Go to the Environments page in your dashboard
24-
2. Create environments like `Staging` or `QA`
25-
3. Assign unique colors to easily distinguish between environments
26-
4. Sync changes between environments just like with development and production
27-
28-
The sync process works the same way as between development and production environments.
23+
1. Go to the [Environments page](https://dashboard.novu.co/environments) in Novu dashboard
24+
2. Click on the `Create environment` button on the top right.
25+
3. A popup will appear. Enter names like `Staging` or `QA`.
26+
4. Assign unique colors to easily distinguish between environments.
27+
5. Click on `Create environment` button on the bottom right.
28+
6. New environment will be created and will be available in the environments list.
2929

3030
## What's Unique to Each Environment?
3131

3232
Each environment maintains its own separate:
3333

34-
- Subscriber list
35-
- Notification workflows
36-
- Message history
34+
- Subscribers
35+
- Topics
36+
- Workflows
37+
- Webhooks
38+
- Integrations
39+
- API keys (application identifier and secret key)
3740
- Activity feed
38-
- Integration settings
39-
- Notification feeds
40-
- Brand assets and settings
4141

4242
## Environment Credentials
4343

@@ -46,6 +46,7 @@ Each environment has two unique identifiers:
4646
1. **Application Identifier**
4747

4848
- Public ID for client-side apps
49+
- Used with <Method href="/platform/inbox/overview">{`<Inbox />`}</Method>
4950
- Unique per environment
5051
- Safe to expose in frontend code
5152

@@ -56,9 +57,18 @@ Each environment has two unique identifiers:
5657

5758
**Best Practice**: Configure these credentials in your application based on the active environment, similar to how you manage other service credentials.
5859

59-
## Promoting Changes to Production
60+
## Promoting workflows between environments
61+
62+
One workflow can be synced to another environment using the `Sync Workflow` option in workflow actions. While syncing, Novu will give option to which environment to sync the workflow to. If workflow with same identifier is already present in the destination environment, it will be overwritten with the source workflow.
63+
64+
Steps:
6065

61-
You can move changes from development to production in two ways:
66+
1. Go to the [Workflows page](https://dashboard.novu.co/workflows) in Novu dashboard
67+
2. Click on the three dot menu in the workflow row
68+
3. If you have more than two environments, hover over the `Sync Workflow` option to see the destination environment, then click it.
69+
4. If you have only two environments, Click on the `Sync to <Environment Name>` option. Here `Environment Name` is the name of another environment.
70+
5. The workflow will be synced to the destination environment.
6271

63-
1. Using the Dashboard's sync interface
64-
2. Using the Sync API in your CI/CD pipeline
72+
<Callout type="info">
73+
Currently, a single workflow can be synced to another environment.
74+
</Callout>

content/docs/platform/concepts/preferences.mdx

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,68 @@ Novu provides a way to store subscriber preferences. This allows subscribers, yo
1414

1515
## Workflow channel preferences
1616

17-
When creating a new workflow, you can specify default preferences for your subscribers via code or in the Dashboard. These preferences will be used during notification delivery unless the subscriber overrides via the preferences page in `<Inbox/>`.
17+
Each workflow has its own channel preferences. By default, all channel preferences are enabled. If disabled, the subscriber will not receive notifications for that channel step.
1818

19-
<img src="/images/preferences/preferences.png" alt="Preferences" className="rounded-lg border" />
19+
Steps to manage workflow channel preferences:
2020

21-
## Subscriber channel preferences per workflow
21+
1. Go to the [Workflows page](https://dashboard.novu.co/workflows) in Novu dashboard
22+
2. Click the workflow you want to manage channel preferences for
23+
3. A node-based editor will appear. On the right side of the editor, click the `Configure channel preferences` option
24+
4. Click on the All Channels checkbox to enable or disable all channels for the workflow
25+
5. You will be able to change the preferences for only those steps which are present in the workflow. Non existing channel steps will be disabled.
26+
6. The `Mark as critical` toggle will make this workflow critical. Read more about [critical workflows](#critical-workflows)
27+
28+
<Callout type="info">
29+
If a workflow has only `in-app` and `email` steps, then it will have only `in-app` and `email` preferences.
30+
</Callout>
2231

23-
`<Inbox/>` displays the available preferences per workflow, allowing subscribers to modify them for each channel. Critical workflows will be excluded from the list.
32+
![Workflow channel preferences](/images/concepts/preferences/workflow-channel-preferences.png)
2433

25-
<img
26-
src="/images/preferences/inbox-workflow-preferences.png"
27-
alt="Inbox Workflow Preferences"
28-
className="rounded-lg border w-[400px]"
29-
/>
34+
### Critical workflows
35+
36+
In some cases, you don't want the subscriber to be able to unsubscribe from mandatory notifications such as Account Verification, Password Reset, etc...
3037

31-
<Callout type="info">Inbox displays only channels used by the current workflow.</Callout>
38+
In those cases, you can mark a workflow as `critical` in the workflow channel preferences. Critical workflows are not displayed in subscriber preferences, so subscribers cannot change preferences for that workflow.
3239

3340
## Subscriber global preferences
3441

3542
Subscribers can set global channel preferences, which override individual settings. For instance, if there are 10 workflows, and a subscriber wants to disable SMS notifications for all of them, they can do so with via global preferences.
3643

37-
<img
38-
src="/images/preferences/inbox-global-preferences.png"
39-
alt="Inbox Global Preferences"
40-
className="rounded-lg border w-[400px]"
41-
/>
44+
![Preferences](/images/inbox/[email protected])
4245

43-
## Critical workflows
46+
## Subscriber channel preferences per workflow
4447

45-
In some cases, you don't want the subscriber to be able to unsubscribe from mandatory notifications such as Account Verification, Password Reset, etc...
48+
For each workflow, subscriber has its own channel preferences. Subscriber can manage these preferences from the <Method href="/platform/inbox/react/components/preferences">{`<Inbox />`}{" "}</Method> Preferences view.
49+
50+
![Subscriber channel preferences](/images/concepts/preferences/subscriber-workflow-preferences.png)
51+
52+
<Callout type="info">Inbox displays only channels present in the current workflow.</Callout>
53+
54+
## Priority of preferences
55+
56+
Since there are three types of preferences, the priority order is as follows:
57+
58+
Workflow channel preferences > Subscriber global preferences > Subscriber channel preferences per workflow
59+
60+
Examples:
61+
62+
1. If the `email` channel is disabled in workflow channel preferences, global and subscriber preferences are ignored, and subscribers will not receive email notifications for this workflow.
63+
2. If the `in-app` channel is enabled in workflow channel preferences but the workflow is marked as critical, subscribers cannot change their preferences and will always receive in-app notifications.
64+
3. If both `chat` and `email` channels are enabled in the workflow but `email` is disabled in subscriber global preferences, the subscriber will receive only chat notifications for this workflow.
65+
66+
## Subscriber preferences APIs
67+
68+
Subscriber preferences can be retrieved and updated using following APIs:
4669

47-
In those cases you can mark a workflow as `critical` in the Dashboard. Critical workflow are not displayed in the subscriber preferences page.
70+
<Cards>
71+
<Card
72+
title="Retrieve subscriber preferences"
73+
href="/api-reference/subscribers/retrieve-subscriber-preferences"
74+
description="Retrieve subscriber preferences for a subscriber"
75+
/>
76+
<Card
77+
title="Update subscriber preferences"
78+
href="/api-reference/subscribers/update-subscriber-preferences"
79+
description="Update subscriber preferences for a subscriber"
80+
/>
81+
</Cards>

content/docs/platform/concepts/tenants.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ await novu.trigger({
6262
payload: {
6363
tenant: {
6464
id: tenantId,
65-
name: "Acme Corp",
66-
logo: "https://acme-corp.com/logo.png",
65+
name: "Airbnb",
66+
logo: "https://airbnb.com/logo.png",
6767
primaryColor: "red",
6868
}
6969
},
@@ -74,17 +74,15 @@ The tenant object will be available to use in the workflow editor as a variable
7474

7575
- Content (use `{{payload.tenant.name}}` to display the tenant name in an email or any other channel)
7676
- Step Conditions (use `{{payload.tenant.id}}` to conditionally execute a step based on the tenant)
77+
- Use the Inbox [data object](/platform/inbox/react/components/inbox#data-object) to filter notifications by tenant.
7778

78-
## FAQ
79+
## Frequently asked questions
7980

80-
<Accordions>
81+
The following are the frequently asked questions about multi-tenancy in Novu.
8182

82-
<Accordion title="Can I use a different delivery provider for each tenant?">
83-
Currently we do not support using a different delivery provider for each tenant. You can reach out to [email protected] in case this is a feature required for your use case.
84-
</Accordion>
83+
### Can I use a different delivery provider for each tenant?
84+
Currently, we do not support using a different delivery provider for each tenant. You can reach out to [email protected] in case this is a feature required for your use case.
8585

86-
<Accordion title="Can I specify different workflow preferences for each tenant?">
87-
We don't support specifying different workflow preferences for each tenant. You can reach out to [email protected] in case this is a feature required for your use case.
88-
</Accordion>
86+
### Can I specify different workflow preferences for each tenant?
87+
We don't support specifying different workflow preferences for each tenant. You can reach out to [email protected] in case this is a feature required for your use case.
8988

90-
</Accordions>

0 commit comments

Comments
 (0)