Related To Conditional Notification
In my application scenario, I have involved different roles in order to send notification like super admin , team member, team manager, supervisor and owner . There are some notification that i need to send accordingly is it possible in novu if it is how can we do it .
11 Replies
Hey @Obaid Ur Rehman, sure thing, depends on how you would like to go I'd do it one of two way:
1. One workflow with filters and role data saved on subscriber (https://docs.novu.co/subscribers/subscribers#subscriber-attributes), see images attached.
The only down side is that the user preferences will be generic.
2. Separate workflow which is straightforward but require a bit more logic on your end, using topic you can easily group by role. This one is much better for user preferences control.
@Tomer Barnea @Obaid Ur Rehman There is also the variants feature that you can use too to change the notification based on a specific role.
@Zac Clifton so would you have the same step with different variant? Ca you show how would you do that?
@Gali Baum would be best to explain it
Yes, variants sounds like a good fit @Obaid Ur Rehman . You could have a single workflow with certain steps having different content depending on conditions yo set. For example, a condition of a subscriber role :
Here is the link to the docs that explains variants https://docs.novu.co/workflows/variants
if you want to share more about your usecase, I will be happy to help and be more specific 🙂 @Obaid Ur Rehman
If the notification need to delivered to different roles at a same time is it possible to be doing that also with the same techniques that have been mentioned
@Obaid Ur Rehman Yes this technique can be used for different roles as well.
Here do you mean if one person has more than one role?
no i just meant if i have bunch of peoples and they have different roles and a particular notification could be able to send to the peoples that have role of team manager and team member
Yeah that can be handled using variants
Thanks