How can I configure the Web Widget (Classic) on my help center to only offer chat to VIP customers instead of all visitors?
To offer chat support through the Web Widget (Classic) to specific users, follow one of the methods described in this article. Click each of the tabs below to switch between each method.
Method 1: Use a hyperlink to navigate to the chat page directly
This method is less technical than method 2 but still requires some setup in your help center and Web Widget (Classic) settings.
- Create a user segment that contains all your VIP users.
- In your help center, create a category, section, and article. Set the article permissions so that it is only visible to that specific user segment.
Follow the steps below to create a link that opens a Chat window in a new browser tab.
- Generate a chat link. See the article: Can I create a direct link to a live chat popout window instead of using the widget?
- In the article, add a line that says Click here to chat.
This article and link will serve as your VIP customers' method to open live chat. If you leave the live chat function disabled in the Web Widget (Classic), your other users will see the Web Widget (Classic), but only your VIP customers can access the link through the article to chat with you.
Method 2: Leverage the API to identify a user's organization and suppress the chat function when necessary
This method is more technical and requires adding custom code to your widget script. If you are not familiar with creating custom code and API calls, you may need to enlist the help of a web developer to use this method.
- Use the identify API to capture the user's organization information.
- Use the suppress feature in the Web Widget (Classic) API to either hide or show the widget based on the user's organization name
For more information, see the developer documentation: Restrictions and Responsibilities.
Would it be possible for the web widget be available to all users for answer bot, but chat not be an option for either visitors (non-signed in users) or organizations with a specific tag (such as VIP/Non-VIP/Trial/Premium/etc.) ?
Thank you for reaching out. I am sorry that at the moment, there is no functionality to have the answer bot available to all end-users while the chat widget to be restricted to a specific organization/user with certain tags. With the thread above, I hope that you can find something close to your use case though.
Does anyone have an example of the js if you would like to suppress the chat widget based on organization tags? For example, we only want users that belong to organizations with the tag "customer" to see the chat widget.
Here is where I am currently at and it is not working:
Hi Laura, couple questions:
I would like to hide the widget entirely. Below the lines I shared above, I have the other suppress options as well for contactForm, helpCenter, talk, and answerBot.
Currently, I am testing this change on an inactive theme to ensure it works. When I am previewing that theme I can still see the widget when switched to anonymous. My thought for this was if the user was anonymous then they wouldn't have the organization tag to meet the requirements.
As a test, I was able to have the widget hide based on the user role with the suppress feature.
Thanks for the help!
With respect to the code snippet itself, you can do something like this:
Since you're looking for a specific value in an array, you need to use some sort of array lookup tool. I chose
includes, but there may be reasons to use other options. Let me know if you run into any issues with this!
This appears to be working. Thanks again for the help!
Please sign in to leave a comment.