Skip to main content
cdisc1
Conversationalist
September 26, 2024
Solved

Dynamic Variables - Filtering Groups

  • September 26, 2024
  • 3 replies
  • 322 views

In a dynamic variable for a rule, I’m looking for a way to filter a group by another group, and I’m struggling to figure out how to do this with the existing options.

Essentially, I have two groups of teammates: Group A (specific teammate group) and Group B (participants).  I want a new group that is everyone in Group A that is NOT in Group B.

The goal is to limit duplicate notifications for a single conversation by notifying only the members of the specific teammate group who are not already subscribed.  Mobile notifications can become very noisy when a team member is already subscribed to a conversation and then receives further notifications for the same message because of triggered rules.

Best answer by justin

Hi @cdisc1

Happy to show how this is possible with dynamic variables in Front. To start, you will need 2 total dynamic variables to determine your target group of teammates to notify. I’ll break these down below:


Group B (Conversation Participants)
 



As you can see above, in the Group B dynamic variable we obtain the teammate IDs of those that are participants. 


Group C (Target teammates to notify / Group A - Group B)
 



In the Group C dynamic variable, we get the teammate group (Group A in your example). Then we filter out those teammates in the group if they are in Group B (participants). 


This will then allow you to notify Group C, your targeted teammates in the group that are not already participants. 

 

Hope this helps! 

Best, 
Justin

3 replies

justin
justinAnswer
Fronteer
September 27, 2024

Hi @cdisc1

Happy to show how this is possible with dynamic variables in Front. To start, you will need 2 total dynamic variables to determine your target group of teammates to notify. I’ll break these down below:


Group B (Conversation Participants)
 



As you can see above, in the Group B dynamic variable we obtain the teammate IDs of those that are participants. 


Group C (Target teammates to notify / Group A - Group B)
 



In the Group C dynamic variable, we get the teammate group (Group A in your example). Then we filter out those teammates in the group if they are in Group B (participants). 


This will then allow you to notify Group C, your targeted teammates in the group that are not already participants. 

 

Hope this helps! 

Best, 
Justin

cdisc1
cdisc1Author
Conversationalist
September 28, 2024

It baffles me a bit that what appears to be a collection of Teammates cannot be compared to another collection of Teammates without converting it to a list of Teammate IDs, but then I don’t know the code that lies beneath the UI.

Thank you!  This should accomplish what I’m looking for. :)

justin
Fronteer
September 30, 2024

Happy to help @cdisc1

Glad to hear that this will help provide the desired workflow 🙌