Privacy Rules for Teams & Messages

Looking for some help to make the privacy rules work for a customer experience app I’m creating.

The app allows Customers to Message a Business. Agents manage the Messages to this Business inbox. I need to ensure each message can only be read by either the Customer, or one of the Agents assigned to the Business.

The only way I’ve managed to get the privacy rules to work is to add the Customer’s user account AND every Agent’s user account assigned to the Business, to each Message.

But that means if an Agent were to be removed from that Business, all the messages belonging to this Business would then need to be updated to have the Agent’s account removed. Or if an Agent is added, their account then needs to be added to all the Messages belonging to that Business.

Or… is there a better way to do this?

Hi there, @psten00… if I understand your post correctly, it sounds like the business is the key. If you tag users and messages with the business to which they belong, you could create the appropriate privacy rules and easily handle the situation where an agent is added to or removed from a business. Have you already gone down this path and it doesn’t work for you for some reason?


I think so… yes.

Only thing is that Users should never be able to see other Users messages.

How would this look in the privacy settings?

I assume you mean customers are actual users in your system, and one customer who has messaged a business shouldn’t be able to see the messages from another customer who messaged the same business, right? Also, I assume agents are also users in your system. How are you differentiating customers from agents? Oh, and what does your messages data type look like?

I’ve got a virtual user account which is either a Business or a Customer.

The Message has an “includes” list which has the participants of the Message. eg. Business and Customer.