Learn all about Tenants
Multi-tenancy is a common use case for a lot of companies that have multiple organizations that use their applications. In some cases, there is a need to separate the behavior of the notification system depending on the individual tenants.
Currently, Novu supports the following customizations:
Tenants can be created and modified via the API or Web. Each tenant can have multiple fields on it:
To create a tenant on the Novu web platform, follow these steps:
Tenants
on the left sidebar.Add a tenant
button.Name
and Tenant identifier
. The tenant identifier is automatically set once you add a name. However, you can modify it to your needs.Custom properties
(optional).When triggering a workflow, it is possible to pass the tenant information (id or object, in case of an object, novu will upsert the tenant if it’s not existing) like so:
The tenant information can now be used inside the workflow template in the following way:
Workflow settings can now be updated on the workflow per tenant. This enables each tenant to have unique preferences that doesn’t affect others within the same workflow.
The active
and channel
preferences fields of a workflow can be updated to be tenant-specific the workflow-overrides API endpoint.
When creating an integration, you can create a condition where you can specify a delivery provider for a channel when a particular tenant id is matched.
The delivery provider specified will only be used if the trigger is executed with the tenant id.
Add provider instance
Set conditions
When creating a step, variants could be created for each step including digest and delay. For each variant, conditions set can be applied on when this variant could be used.
Using so different workflow configurations (for example digest duration) could be configured on the individual workflow for a given tenant.
For example, if you want a specific notification content to be sent to a tenant named “JohnDoe”, and another to be sent to others. You can do the following:
Add variant
Set variant
See the variants
Once a trigger runs, the Novu engine checks to see if there’s a tenant
identifier specified in the trigger code.
An example of the trigger code:
It is also possible to use handlebars to have minor tenant adjustments in a single step:
Learn all about Tenants
Multi-tenancy is a common use case for a lot of companies that have multiple organizations that use their applications. In some cases, there is a need to separate the behavior of the notification system depending on the individual tenants.
Currently, Novu supports the following customizations:
Tenants can be created and modified via the API or Web. Each tenant can have multiple fields on it:
To create a tenant on the Novu web platform, follow these steps:
Tenants
on the left sidebar.Add a tenant
button.Name
and Tenant identifier
. The tenant identifier is automatically set once you add a name. However, you can modify it to your needs.Custom properties
(optional).When triggering a workflow, it is possible to pass the tenant information (id or object, in case of an object, novu will upsert the tenant if it’s not existing) like so:
The tenant information can now be used inside the workflow template in the following way:
Workflow settings can now be updated on the workflow per tenant. This enables each tenant to have unique preferences that doesn’t affect others within the same workflow.
The active
and channel
preferences fields of a workflow can be updated to be tenant-specific the workflow-overrides API endpoint.
When creating an integration, you can create a condition where you can specify a delivery provider for a channel when a particular tenant id is matched.
The delivery provider specified will only be used if the trigger is executed with the tenant id.
Add provider instance
Set conditions
When creating a step, variants could be created for each step including digest and delay. For each variant, conditions set can be applied on when this variant could be used.
Using so different workflow configurations (for example digest duration) could be configured on the individual workflow for a given tenant.
For example, if you want a specific notification content to be sent to a tenant named “JohnDoe”, and another to be sent to others. You can do the following:
Add variant
Set variant
See the variants
Once a trigger runs, the Novu engine checks to see if there’s a tenant
identifier specified in the trigger code.
An example of the trigger code:
It is also possible to use handlebars to have minor tenant adjustments in a single step: