/
Building A Chatbot: Setup

Building A Chatbot: Setup

Quick links in this article:

In this article, we’ll cover the key setup steps for configuring a chatbot in Gnatta Workflow on webchat. If you’re configuring a chatbot for another channel, please get in touch for more guidance.

This article is part of a series - once you’ve completed the steps in this article, check here to keep building your chatbot: Building A Chatbot: Flows

New to Workflow? Check here first: Learn About Workflow

Creating a test environment

In these articles, we’ll be building a chatbot journey with the following characteristics:

  • Self-Serve (with Live Fallback to human agents)

  • Anything Else loop

  • Quick Replies

To do so, we’ll be setting up a brand new test environment that doesn’t interfere with any existing chat accounts, queues or teams that are currently live. If you’re currently using chat on your website, you’ll need to do this too, to avoid interfering with your live account before your journey is ready!

In your existing Gnatta domain, you’ll need to:

  1. Create a new chat account: Adding Chat To Your Site | Creating an account

    1. Remember to add the webpage you’re going to test it on to your Allowed Domains

  2. Identify or create a private webpage to host your Test Chat account on. You can do that on a private version of your own website if you have one, or on the Gnatta Chat Testing site if you just need something quick and easy. Check here for specific instructions on how to use it: Testing Gnatta Chat

  3. Create a new Test Chat queue: use the auto-generated one when you create your chat account, or create a new one. Queue Setup

  4. Create a new Test Chat team: with just you in it, to ensure test chats are assigned to you! Ensure you map this team to your new Test Chat account. Manage Your Teams | Create a new team

With all of the above, you’ll have everything you need to create your chatbot and test it in a private environment that doesn’t interfere with your live processes.

When you’ve finished building your chatbot flows and you’re ready to go-live, you’ll be able to copy the flows over to your primary chat accounts and queues in just a few clicks.

Advanced chat settings

Because we’re going to create a Self-Serve chatbot (with fallback), it’ll be available even out of hours. That means we need toggle the Webchat Always Available setting for this chat account, to ensure chat buttons are displayed around the clock! To do that, head to Configuration > Advanced > Accounts > Chat > Your account name and toggle the Webchat Always Available setting. Click save.

webchat always available.gif
Turn on the advanced ‘always available’ toggle for your chat account

Creating chat events

Before you build, it’s important to understand that new chats are detected on a Chat Started event - but each sequential message received in that chat will trigger a Response Received event. i.e. Chat Started refers to the moment the chat was initiated, whereas Response Received is all about how you manage a chat live, whilst it’s in progress. When the chat is closed, the Chat Ended event will be triggered.

With that being the case, you’ll need specific flows attached to each of these events for your chat account and chat queues.

Chat Started - this is where you would attach a Chatbot Starter Flow. You’ll be creating an interaction, sending the first set of quick replies, and assigning the chat to a queue whilst it’s in automation.

Response Received (Test Chat Queue) - this is where the bulk of your chatbot journey will be stored, with flows for each pathway right up to assigning to an agent.

Chat Ended - this is where you’ll carry out any post-chat automations, after the customer has left. For example, ignoring abandoned chatbot journeys so they don’t fill up your queues.

image-20250227-140706.png
You’ll need three chat events around which to build your chatbot journey

Assuming you’ve created your Test Chat account, teams and queues as described in the previous section, navigate to Settings > Workflow > Events > Add Event and create each of the three events for your new account. We’d recommend naming them as follows:

Event Name (Suggested)

Event Type

Account/Queue

Event Name (Suggested)

Event Type

Account/Queue

Test Chats Started

Chat Started

Test Chat Account

Test Chats In Progress

Response Received

Test Chat Queue

Test Chats Ended

Chat Ended

Test Chat Account

This will allow you to search ‘Test Chats’ in the search bar and view your events together!

Note that Response Received events are mapped to queues, not accounts. When you create the Response Received event, select the Test Chats queue you created earlier.

create event.gif
Create the three chat events ready for your chatbot flows

Chatbot custom data fields

To manage each customer’s journey through the chatbot, you’ll need at least two critical custom fields:

  • Chatbot Journey Step (dropdown values for 0, 1, 2, 3, 4, 5 and Complete).

  • Chatbot Pathway (dropdown values for Anything Else, Reset, Pass Agent AND your path names i.e. Returns, Tracking etc). Refer to your Chatbot Plan for the pathways - choose a name for them based on how they split logically!

You’ll need to create these fields following the instructions for an Options field (String + SingleSelect): Defining Custom Data

You may need more fields as your chatbot journey develops, but these two will be enough to get you started. They’ll also provide ample reporting opportunities, so be sure to use a clear naming convention!

Chatbot starter flow

With the above done, you’re armed and ready for putting in that all important starter flow on your Chat Started event! In a nutshell, this is what your starter flow is going to do:

  • Create an interaction, in an automated state to prevent it from being assigned to an agent

  • Preset data fields like customer name and email using the pre-chat survey information

  • Send the first autoresponse with quick reply buttons

  • Set the Chatbot Journey Step custom field to 0

And that’s it! The complicated stuff comes after, when the customer clicks one of those buttons (or perhaps doesn’t!)

image-20250227-143723.png
A Chatbot starter flow

So, let’s get that built! First, navigate to the flow builder via Configuration > Workflow > Builder and select Create New.

get to the builder.gif
Get to the flow builder!

The first action is Create Interaction - this is where the chat conversation will be stored, regardless of whether it’ll ever reach an agent or not. Gnatta can’t process messages without having somewhere to put them! Click the + button, and add a Create Interaction action.

It’s a good idea to name your flow, too, so you can save it later.

name flow and create.gif
Name your flow and add Create Interaction to your map

Next, we’re going to configure that new Create Interaction. Set the state to Automated (this will prevent Gnatta from assigning it to an agent.)

Only Queued interactions reach an agent: Interaction State vs Status Fields. You’ll be changing the interaction state to Queued at the end of your chatbot journey, to assign to an agent!

Select your Test Chat Queue (the one you set up a Response Received event for) to tell Gnatta which queue to create the interaction into, and assign a relevant Data Set. The default data set for your domain is fine to use whilst testing, or whichever data set your other chat accounts are using.

set up create.gif
Set up your interaction in an automated state, in your testing queue!

Before saving the action, you’ll also need to preset the Name and Email fields on the interaction, using the data detected in the default pre-chat survey. Click Preset Data, and find your Name and Email custom data fields.

find data fields.gif
Identify your Name and Email data fields

Click into the Explore menu, and search for Chat Name (Conversation.Person.WebChat.Name) under the Conversation category to insert that into your Name field. Do the same again for Chat Email Address (Conversation.Person.WebChat.EmailAddress) to insert into your Email field.

The Explore menu contains a wide range of contextual data that Gnatta collects every time something happens in your domain - check here for more information: Contextual Data

prechat survey.gif
Find the prechat survey data to insert into your custom fields

Hit Submit and that’s your first action complete! You’ve created the interaction to contain the chat.

Next, click the + and find the Send Autoresponse action. By referring to your chatbot plan, insert your opening message here.

add message.gif
Add your opening message to the Autoresponse action - check your chatbot plan!

If you’d like to send a series of messages in sequence, try creating multiple Send Autoresponse actions with a 2-second delay in-between (instant delivery between messages can be a bit disconcerting for the customer!)

Next, add quick replies to attach buttons to your welcome message - be sure to check for typos! Hit Submit on the action when you’re happy with them.

quick replies.gif
Add your buttons as quick reply options!

Finally, add one more action - look for Update Interaction in the library. Click Preset data, and navigate to the Chatbot Journey Step field you created (earlier in this article). Set the value to 0, and give the action a useful name like ‘Set Step: 0’.

step 0 .gif
Set journey step to 0 - ready for the main automation flows when the customer responds

And that’s the flow ready! Hit File>Save and File>Publish, then navigate to your Chat Started event. Add your new Chatbot Starter flow to the event, and you’re good to go.

When the flow is added, we’d recommend loading up your Test Chat account in your test environment (see Testing Gnatta Chat for more information) to see that first message sending when you start a new chat. Although remember, you’ve not yet configured anything to happen when you click one of the buttons!

add event.gif
Add your Chatbot Starter Flow to the Chat Started event you created earlier - and test!

Next steps - building pathways

That’s a whole lot of config! Rest assured a lot of the groundwork is done - you’ll be spending the rest of your time in the flow builder from this stage on. Feel free to take a break here, and when you’re ready, pick up next steps in part two of this guide:

[LINK NEEDED]

Related content