Catch the first user message when using the Zendesk channel

When your chatbot is using the Zendesk channel, the bot will not have a chance to start the chat. Instead, the conversation with the Certainly bot will begin only after a user enters their first message. This first message will be lost, meaning any Global Connections you've set will not fire in response to it.

This is different from the default behavior of the Certainly Widget, where the conversation is started by the bot. However, the starting flow of the bot can be configured to catch this first user message entered via the Zendesk channel.

In this article, we'll explore the following:

Note that in this article, we assume the Bot Settings are configured to evaluate Module Connections first, as shown here:connectionevaluation.jpg

Configuration to catch the first user message

The starting Module of the bot should be configured according to the instructions below.

  1. First, ensure that "Make bot start message" is enabled at the bottom of the Message tab.

  2. Then, in the Connections tab, enable "Don't wait for the user's input, just evaluate the Connections" since the user has already entered their message in the Zendesk widget.
    Upon marking this box, you'll be notified that Global Connections will not be checked unless this Module has a "Webhook" or “Set Variable” Connection. This is done to optimize the process.

  3. Since the desired behavior here is for the Global Connections to be checked, we want to set a dummy variable in order to override the default setting.
    It doesn't matter what variable is set here as long as it is distinct from any other variables used within the bot.

  4. Similarly, setting a traditional "Go to" Connection in this Module will block the execution of the Global Connections. As such, the flow should proceed to the next Module via a Fallback rather than a traditional "Go to" Connection. 

Configuring the bot in this way allows the bot's Global Connections to fire in response to the first user message.

Workaround for a drawback of this configuration

The drawback of such a setup is that via the Certainly Widget and tester mode, the conversation will start from the Fallback.

Since the bot will run through the Global Connections with the user input empty, it will not match any connection, triggering the Fallback Module. We can easily eliminate this by adding a condition to the beginning of the Global Connections list that moves the conversation to the correct Module when there is no user input.

In the image below, you can view an example of how to configure your first Global Connection: "If" the Custom Variable {{certainly.reply}} is empty, the conversation flow will "Go to" the <md>Menu Module.


If you have any trouble with this setup, please reach out to our Customer Success team!

You can also read about how to send the first message in the Zendesk Widget.