How the Workflow Group property might be used in the Headless API?
Hi!
I've added different workflow groups for notifications. I'm using Headless API to work with notifications.
Can I exclude notifications with a specific workflow group for a user, using Headless API?
How the Workflow Group property might be used in the Headless API?
Thanks a lot in advance!
15 Replies
Hi @Maks Salad
you want to hide all notifications from a particular workflow group?
Yes
If there is some way to do it with Headless API?
As headless api is used for fetching in-app notification.
What if you use subscriber preference and turn off in-app channel of particular workflow for a user (subscriber)
https://docs.novu.co/subscribers/preferences
If in-app channel will be off and you will trigger the workflow to subscriber from server side , then user will not receive in-app notification and it will not be returned while fetching with headless library methodsin client side
I fetch user preferences with method. But I don't see any mention of a workflow group in for turning off in-app channel of a particular workflow group
@Maks Salad, you just advanced to level 1!
@Maks Salad
You can use
headlessService.updateUserPreferences
method.
currently, workflow group is not supported for these methods.
We have planned the use of workflow group feature for subscriber preference in future
https://docs.novu.co/notification-center/client/headless/api-reference#updateuserpreferencesI can update it but I don't see a way to filter for what exact notification I'll turn off in-app channel
I have tags inside IUserPreferenceSettings but I believe they are not connected to Group Workflow, am I right?
Yes tags and workflow grpups are not connected with preference methods
I'm looking forward to this feature in future updates
Thank you!
Hey @Pawan Jain
Could you please clarify if I can get workflow group from any
headlessService
method now?@Maks Salad
Do you want to fetch workflow groups for this?
Yes, I'd like to fetch workflow groups for filtering what notifications I show.
Or is it possible to enable/disable notifications that have a specific workflow group for the user, using headless API?
@Pawan Jain so do we have any options in this case?
@Russ Salad and @Maks Salad
Sorry for missing this
I am checking this a way to implement this now
I just checked, it is not possible to workflow group for conditionally displaying notifications
It's impossible to restrict delivery preferences based on workflow group on a per-subscriber basis using headless API. And it's impossible to get workflow group with headless API to restrict receiving notifications with a particular workflow group.
Am I understanding you right?
yeah this is correct as currently workflow group is not part of subscriber preference
is this blocking you to use our in-app notification center?