Hide workflows for specific users in Preferences component
Hello!
Is there any way to hide a workflow for specific users?
Let's say I have two workflows "workflow A" and "workflow B" and a user with a specific property (in this case the subscription plan on our project) should be able to see only workflow A or workflow B in the Preferences component based on the subscription plan he has.
We also check for the subscription plan in the execution of the flow, so I could hide the workflow just VISUALLY and that would be fine.
Thanks a lot!
G.
14 Replies
Hi @Gaia this is currently can be possible using the tags filter for preference: https://docs.novu.co/inbox/react/components/inbox#filter-visible-preferences
You can mark the Premium or Base tier workflow with a special tag and filter them conditonally on the UI depending on the user
Novu
- Novu
Thank you very much! I thought I had read everywhere on the docs but I must have skipped this part without realizing it π
Where would you most expect to see this information on the docs (page or section)?
I guess I was looking for it in the Workflow page of the docs or in the "Preferences" page inside the Inbox section
thanks for the feedback! Going to update this
I've added a new section here: https://docs.novu.co/inbox/react/components/preferences#filtering-preferences π
Novu
- Novu
That's great, thanks!!
@Gaia, you just advanced to level 1!
Sorry @Dima Grossman do I have to set the property preferencesFilter in the Inbox component even If I'm separating the Preferences from the Inbox? I tried conditionally like this:
`
But I can still see all the workflows (even the one with tags not specified in the filter).
Hi @Gaia let me try to replicate this locally
Seems like an issue on our end, team is checkign this
Thank you very much, I'll wait for you updates π
@Gaia
Our team is working on fix
@Gaia a fix was deployed to our cloud instance, could you please re-try this?
Just tested and working fine now! Thanks π― π