N
Novu6mo ago
Gurami

Multi-Tenant Notifications & EU WebSocket URL Questions

Can I fetch all notifications for a user who belongs to multiple tenants? For example, if John is part of Org A and Org B, can I filter notifications by organization (e.g., only for Org A) and also fetch all notifications from both? What is the correct WebSocket URL for the EU region? I tried wss://ws.eu.novu.co but it doesn’t seem to work. Thanks in advance!
15 Replies
Pawan Jain
Pawan Jain6mo ago
@Gurami Correct url for EU websocket is: https://eu.ws.novu.co Could you please share how you have configured multi tenancy?
Pawan Jain
Pawan Jain6mo ago
Are you using this architecture? https://docs.novu.co/platform/concepts/tenants
Multi-tenancy | Novu Documentation
Learn about how to implement multi-tenant notifications in Novu
Gurami
GuramiOP6mo ago
@Pawan Jain Thank you for your support. Yes, I followed the documentation. My issue is: I want to fetch all in-app notifications for a user across all tenants by default, but also have the ability to filter them by specific organizations. @Pawan Jain Is there any update?
Pawan Jain
Pawan Jain6mo ago
@Gurami Apologies for missing this. Could you please share more details on this?
but also have the ability to filter them by specific organizations.
Are you creating more than one organizations in Novu?
Gurami
GuramiOP6mo ago
Hey @Pawan Jain. No, I'm not creating multiple organizations in Novu. In my application, users can belong to multiple organizations. I want to be able to show in-app notifications filtered by the organization the user is viewing, but also have the option to fetch all notifications across all organizations the user is part of.
Gurami
GuramiOP6mo ago
No description
Pawan Jain
Pawan Jain6mo ago
thanks @Gurami for more details and screenshot let me check with my team on this just want to check, are you going to use @novu/react ?
Gurami
GuramiOP6mo ago
No, I'm using the headless inbox. We have a very custom design, so… https://docs.novu.co/platform/inbox/react/headless
Novu_Bot
Novu_Bot6mo ago
@Gurami, you just advanced to level 2!
Gurami
GuramiOP6mo ago
@Pawan Jain Hey! Just checking in—do you have any update on my question? Let me know if you need more details from my side. Thanks!
Pawan Jain
Pawan Jain6mo ago
@Gurami I got an update from my team. Currently, it is not supported to filter out notifications based on tenantId or some custom payload value. There is a workaroud to show notifications for one particular organization (tenant): - send orgId , name or any unique identifier in data object - fetch all notifications using pagination - filter the notifications based on this value from response on client side - show the notifications on UI
<Inbox /> | Novu Documentation
Learn how to use and customize the Inbox component in your React application
Gurami
GuramiOP6mo ago
Hey @Pawan Jain , thank you for your time and support!
Pawan Jain
Pawan Jain6mo ago
Will this workaround be helpful for you? @Gurami A small update: we are shaping one feature to filter out the notifications based on data object values. We will add this filter option in this method I am pretty sure, this addition will help in your usecase in showing all notifications and org(tenant) based notifications
Gurami
GuramiOP6mo ago
Hey @Pawan Jain , that sounds great! In this way we will have more flexibility than just filtering by organization. Thank you so much! Appreciated!
Pawan Jain
Pawan Jain5mo ago
Thanks, I will keep you updated on this @Gurami We released this feature of filtering notifications by data object keys checkout these docs: - https://docs.novu.co/platform/inbox/react/components/inbox#data-object - https://docs.novu.co/platform/sdks/javascript#methods @Gurami Just wanted to check if you get chance to use above feature. We would be happy to know your feedbacks

Did you find this page helpful?