Setting up the automatic triggers
Slava Olesik

In this post, we’ll explain all the settings of automatic triggers and will show some examples of usage, apart from the standard ones that we suggest.

WHEN section:

  • Any agent is available to chat: the trigger will work when you are online
  • All agents are offline: the trigger will work when all agents are offline or invisible. In this case, it’s better to indicate that the visitor should not expect an immediate response.
  • Agents are either online or offline: the trigger will work regardless of your status

IF section:

  • Everything here matches: the trigger will work only when all conditions listed below are met on the current page. Make sure you don’t add contradicting conditions (for example, links to different pages)
  • One of conditions below matches: the trigger will work when one of the conditions listed below is met on the current page. It may be the page URL or time spent on the current page.

Conditions that triggers can be connected to:

  • Current URL: When you choose “is”, the link must be full, we recommend copying it from the address bar of your browser. For example: https://chatra.io/help/. The trigger will work only on this specific page. When you choose “contains”, you can enter part of the link (simply “help” will be enough). In this case, the trigger will work on all pages that contain the part of the link you’ve entered. For example, the trigger can go off on this page: https://chatra.io/help/analytics/ or this: https://chatra.com/help/integrations/.
  • Time spent on current page: The countdown will start as soon as the page loads, and the condition will be met when a visitor spends a set number of seconds on a page.
  • Visitor’s location. Allows you to target visitors from certain countries or states (state selection is available for the US only).
  • Visitor’s device type: There are 2 options “Laptop or desktop” and “Smartphone or tablet”. For example, you can use this condition to send longer messages for desktop visitors and shorter messages for mobile visitors.
  • Previous page URL: Here you can put the link to a page of your website. The link format is the same as for the Current URL condition.
  • Referrer URL: Here you can put the address of a different website where a person clicked a link that sent them to your page. For example, google.com or facebook.com. The link format is the same as for the Current URL condition.
  • Number of visits to site: Numbers are not inclusive. For the first visit, put “is less than 2”, for the second visit, use “is more than 1”, etc.
  • Pages viewed this visit: Numbers are not inclusive either, same logic as in the previous condition. The number of pages will be counted only for the current visit (current session).
  • Pages viewed per all visits: Same logic as above, but the number of pages will be counted for all visits combined.
  • Time spent this visit: The countdown will start as soon as the website loads and will be continued if visitor browsers other pages.
  • Time since the widget has been closed: This condition allows you to make your triggers less intrusive and not show triggered messages if a visitor closed the chat window recently. The condition is ignored if a visitor hasn’t interacted with the widget yet.
  • Time since the last proactive invitation: This condition allows you to avoid showing multiple proactive invitations for a visitor within a set period of time. The condition is ignored if a visitor hasn’t seen any proactive invitations before.
  • Time since last chatbot scenario message: This condition allows you to avoid sending automated messages if a chatbot scenario has been shown recently. This condition is ignored if a visitor hasn’t seen any chatbot scenarios before.
  • Chat history with a visitor: You can show proactive invitations only to new visitors and exclude those who chatted with you in the past, or vice versa.
  • Exit intent: Allows you to send a message to visitors who are about to leave your website. The trigger will work when a visitor moves the cursor up to close the browser tab. Only works on desktop.
  • Chatbox State: If you set it to “Opened”, the trigger will work only after a visitor opens the chat window manually or after it’s opened by another trigger or via API.

THEN section:

  • Once per site visit: The trigger will work once per site visit (per session) when all conditions are met.
  • Only once per unique visitor: When all conditions are met, the trigger will work for the visitor once and will not work next time they visit your website.
  • Once per page load: The trigger will work again and again when all conditions are met.

Actions to do when conditions are met:

  • Expand the chat box: the chat window will pop up automatically, with no automatic text. Does not work on mobile devices. If you want to forcefully open the chat window on mobile devices, use the openChat method from our API.
  • Send a message on behalf of an agent: the chat window will automatically pop up and show a certain message on behalf of a random agent. If you want to send automatic messages only from agents from a certain group, select the group below.
  • Hide the widget completely: the chat button will disappear on this page
  • Assign visitors to a group: chats started on this page will be automatically assigned to agents from a certain group. Check our guide about Groups for more details.
  • Start a chatbot scenario: allows you to start the chatbot scenario created in the Automated answers tab. Check our guide to learn more about how to create and launch chatbot scenarios.

If you want to hide Chatra on certain pages:

Select One of conditions below matches if you want to hide Chatra on 2 or more pages. Add links to pages where you want to hide Chatra using the Current URL condition. Pay attention to the URL format if you selected is.

If you want to show Chatra only on certain pages:

Add a condition for every page where you want to have the chat button using the Current URL > is not or Current URL > not contains condition. Make sure Everything here matches is selected even if you have 2 or more links, otherwise the trigger will not work as intended.

If you don’t want visitors from certain countries to send you messages:

Use the Visitor’s location condition and add all the countries you want to block. If you want to block 2 or more countries, make sure One of conditions below matches is selected.

Let’s say you recently noticed an increased number of visitors coming from Germany and Albania. You don’t work with these countries and would prefer to hide the chat window for these visitors. The following settings will allow you to do that:

If you only work with certain countries and would like to show the chat button only to visitors from those countries:

Make sure Everything here matches is selected > Add the Visitor’s location condition > Select is not > Select a country you work with. For example, your business only operates in the United States and Canada, so you use the settings shown on the screenshot below. This will hide the chat button for visitors from all locations except the countries listed using the Visitor’s location > is not condition.