> ## Documentation Index
> Fetch the complete documentation index at: https://novu-c5de82d9-docs-homepage-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-tenancy

> Learn about how to implement multi-tenant notifications in Novu

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.

Tenants are also commonly called workspaces or organizations.

Some of the common multi-tenancy use cases are:

* Group subscribers notification feeds by the tenant
* Adjust the content of the notification depending on the tenant

## How to implement multi-tenancy in Novu

Novu supports multi-tenancy out of the box, the most simple way to implement tenant separation is by prefixing the subscriber identifier with the <Tooltip tip="The tenant identifier is a unique identifier for the tenant in your application. Usually the tenant id in your database.">tenant identifier</Tooltip>

```typescript theme={null}
const subscriberId = `${tenantId}:${userId}`;

await novu.trigger({
  workflowId,
  to: {
    subscriberId,
  },
  payload: {
    tenantId,
  },
});
```

### Tenant in Inbox

When using the Inbox feature, you can use the tenant identifier to group notifications by tenant.

```tsx theme={null}
import { Inbox } from "@novu/react";

function InboxComponent({ tenantId, userId }) {
  return <Inbox subscriber={`${tenantId}:${userId}`} />;
}
```

Each subscriber in a tenant will have it's own unique inbox feed, including a separate preference configuration set.

## Adjusting notification content based on tenant

When triggering a notification, you can pass a custom tenant object or identifier and use it to manipulate workflows or content.

```typescript theme={null}
const subscriberId = `${tenantId}:${userId}`;

await novu.trigger({
  workflowId,
  to: {
    subscriberId,
  },
  payload: {
    tenant: {
      id: tenantId,
      name: "Airbnb",
      logo: "https://airbnb.com/logo.png",
      primaryColor: "red",
    }
  },
});
```

The tenant object will be available to use in the workflow editor as a variable for the following areas:

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

## Frequently asked questions

The following are the frequently asked questions about multi-tenancy in Novu.

<AccordionGroup>
  <Accordion title="Can I use a different delivery provider for each tenant?">
    Currently, we do not support using a different delivery provider for each tenant. You can reach out to [support@novu.co](mailto:support@novu.co) in case this is a feature required for your use case.
  </Accordion>

  <Accordion title="Can I specify different workflow preferences for each tenant?">
    We don't support specifying different workflow preferences for each tenant. You can reach out to [support@novu.co](mailto:support@novu.co) in case this is a feature required for your use case.
  </Accordion>
</AccordionGroup>
