Chat with admin only?

I’m modifying the standard chat component to allow my users to only be able to chat with an admin person.

I have several people designated as “admin” using a true/false field in their user profile.

I don’t want the users to see exactly which admin they’re chatting with. So instead of displaying my name, I just display the word “Admin”. And I filtered the list of available chat partners to only show users with “Admin” true. That’s easy. That means incoming chats will be received by all admins.

Here’s the tricky part:

All admins don’t need to see all chats. Is it possible to set this up so that only the Admin who first answered the chat will be involved in the rest of the conversation?

So, Admin A, B, and C will see the first incoming message. But if Admin A replies, then only Admin A will see further messages in that specific conversation. Is there a way for Admin A (either automatically or by clicking a toggle) to indicate “I’ll handle this call”? Leaving Admins B and C to handle others.

Hey there @MikesClub

Add a true/false parameter to the chat collection and call it “Assigned”. Add a relationship between chats and users (admins) where a chat belongs to one user but a user can have multiple chats. Rename the user parameter in the chat collection to “Admin”.

On your list of chats, you need 2 lists. The first list is a list of chats where assigned is equal to false. The second list is a list of logged-in user (admin) chats.

When a user clicks a chat that is not assigned yet, add an action that updates the current chat > admin (user) parameter to the logged-in user.

1 Like

That’s brilliant. Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.