Activechat Manual
  • What is Activechat?
  • New? Start here
    • The basics
    • Set up your first project
    • Install the chat widget
    • Upload the knowledge
    • Explore the CRM
    • AI-assisted live chat
      • How to set context for AI hints
    • Live chat mobile app
    • Build your first automation
  • Conversational AI
    • For Customer Service Teams
    • For Product Managers
    • For Innovation Teams
    • For Marketers
    • For e-commerce
    • For developers
  • Help Guides
    • Setting up your team
    • Managing conversations
      • Customer attributes
      • User tags and segments
      • Searching for specific users
      • Agent tags (live chat groups and queues)
      • Triggering live chat sessions from the bot
      • Notifications with the TRIGGER block
    • Managing knowledge
      • Uploading business data
      • Question answering and live chat hints
      • Fine-tuning the large language model
    • Natural language automation
    • Building automations visually
      • Customizing your welcome message
      • Adding new skills
      • Navigating skills
      • Copying skills and blocks
      • Handling errors
    • Improving your virtual agent
    • Using live chat AI hints
    • Customizing automatic website page messages
    • Tracking website actions
    • Facebook Ads automation
      • How to set up a Facebook ads bot
      • How to use buttons and quick replies in a Facebook ads chatbot
    • Lead generation
    • Zapier integrations
    • Customizing your project
      • How to customize the chat widget
      • How to customize the Facebook chat widget
      • How to change bot settings
    • Pricing guide
  • Fundamentals
    • Terminology
      • Intents and entities
      • Contexts
      • Skills and events
        • Built-in system skills
          • /start
          • /default
          • /_default_fallback
          • /_start_live_chat
          • /_page_visit
          • /_error
      • Conversation elements
        • Messages
        • Buttons
        • Quick replies
        • Galleries / carousels
    • Messaging channels
      • Website chat widget
        • Installation
        • Customization
        • Voice input
      • Chat widget landing page
      • Facebook Messenger
        • Connect your page
        • 24 hour rule
        • Message tags
        • Persistent menu
      • Telegram
      • Email
      • Twilio SMS automation
    • Intents and bot skills
    • Conversation insights
    • Grow tools
      • Landing pages
      • Messenger links and QR codes
    • Broadcasting
  • Visual builder reference
    • Sending messages
      • TEXT
      • LISTEN
      • IMAGE
      • MEDIA
      • GALLERY
      • FILE
      • EMAIL
      • SMS
      • LEAD
    • Triggering events
      • SEND
      • CATCH
      • TRIGGER
      • LIVE CHAT
    • Manipulating data
      • DATA
      • ADD TAG
      • REMOVE TAG
      • JSON
      • STATUS
      • VALIDATION
    • Conditional logic
      • SWITCH
    • Timers and delays
      • TIMER
      • WAITFOR
      • WAITUNTIL
    • E-commerce blocks
      • CATEGORY
      • PRODUCT
      • VARIATIONS
      • SIMILAR
      • UPSELLS
      • CROSSSELS
      • Shopping carts
        • ADD TO CART
        • UPDATE CART
        • SHOW CART
        • CLEAR CART
        • CREATE ORDER
    • Natural Language
      • NLP
    • System attributes
    • System events
  • Integrations
    • Google services
      • Connect your Google account
      • Google Sheets
        • Searching and updating Google Sheets data
        • Building galleries with Google Sheets data
      • Google Calendar
        • Searching for events
        • Creating and updating events
    • Shopify
    • WooCommerce
    • Dialogflow
      • Building an agent
      • Using entities
      • Slot filling
      • Context management
      • E-commerce NLP
Powered by GitBook
On this page

Was this helpful?

  1. Help Guides
  2. Building automations visually

Handling errors

PreviousCopying skills and blocksNextImproving your virtual agent

Last updated 3 years ago

Was this helpful?

Chatbots are software. And software can break sometimes – you can have a wrong API call in a , Google integration can fail, or something else can happen unexpectedly. Handling errors properly is extremely important so that they do not break your end-user chatbot experiences.

You may have already noticed an “ERROR” button in some of the chatbot building blocks in Activechat. This button is for error handling.

Example of error handling in the chatbot

The picture above shows an example of error handling. If something goes wrong when the JSON block is executed, the “ERROR” button will get control and a TEXT block will be triggered. It will display the error message to your bot user, offering an option to click the button to retry the action. Please note that this “Retry” button is connected back to the JSON block so that it will be triggered again when a user clicks the button (kind of a potential dead loop here, so we're leaving the exercise of providing a way out of it for your own experiment).

To help you get some insights on what exactly went wrong, there is a system attribute $_last_error. It will always contain a textual description of the last error that happened in the chatbot conversation with that specific user. You can display it to the user with a TEXT block, or send an error notification to one of your bot admins (either on Messenger, with SMS, or in e-mail).

Pre-defined _error skill

If there’s nothing connected to the ERROR exit in a block, and something goes wrong when this block is executed, the system will trigger an _error event. By default, it will launch the “_error” skill that is available in every virtual assistant you create. This skill will display a generic notification to your chatbot user (with a button to restart the bot) and will send an email notification to your account email.

Please note that these email notifications are limited to one per hour. This is done to prevent your mailbox from going crazy if something is broken in the bot and there are thousands of users experiencing the error simultaneously.

Notice the use of the $_last_error system variable. When this skill is triggered, your users will see something like this:

And in your mailbox, you will find an email like this:

Notice that it contains a reference to the skill and block that caused the error. Use this information to debug your conversation and prevent this from happening in the future.

You’re absolutely free to customize the “_error” skill to suit your conversation style or even remove it completely.

If there’s nothing in your _error skill, and no blocks are connected to the “ERROR” exits in other blocks in your conversation automation, then on any error your chatbot will just silently fail, leaving your end-users disappointed.

Handling situations like this in a proper manner is extremely important to provide great experience to your customers!

Design your conversations wisely, focus on handling errors properly and have a great bot-building and live chat automation experience with Activechat!

You can definitely build a more complex error handling, maybe even create specific skills for each of your critical conversation blocks like JSON, Google integrations, or complex . It’s absolutely up to you – as a conversation designer.

Default _error skill that is triggered for unhandled errors in the chatbot
Default error message from the _error skill
An error notification email from Activechat
data processing
JSON block