Question
How can I test a Chat trigger?
Answer
Chat triggers depend on caching data, IP addresses, user data, and more. For this reason, you can't simply test a trigger from a new tab on your browser. This article includes best practices for testing Chat triggers to make sure you're testing and seeing the right experience.
How to imitate a visitor chatting in
Test Chat triggers from an incognito window or another private browsing window. This makes sure any caching data in your main browser will not interfere with the test. You can also clear your cache and cookies for good measure, but this is not necessary. This is particularly important in situations where your trigger includes conditions like previous visits.
Make sure you are testing from the correct location. If you are testing a trigger with a location-based condition such as visitor country or visitor IP, check if your browser matches with the correct location for the trigger to fire. Learn more in this article: How does Zendesk capture the location of the end user?
You can also use the Simulate visitor button under the Visitors section of your Chat dashboard as shown below. This is a great option for testing, just remember to make sure your IP address or your cache wont interfere with your test.
How to stage your account
Set the correct online or offline status to your account, agents, or departments depending on what you are trying to test. See more in this article: Configuring your chat availability settings.
If you are testing department routing, at least one agent from that department has to be logged in to the Chat dashboard and set to the online status. See more about chat departments in this article: Creating agents and departments in Chat.
If you are testing triggers that fire when the account is offline, all agents need to either be logged out of the chat dashboard completely or set to Invisible.