# Welcome 👋

{% embed url="<https://sendlyofficial.wistia.com/medias/olcoolakyi>" %}

{% hint style="info" %}
Providing you the best support we can is our upmost priority.

&#x20;[Getting Support](/start-here/getting-support)
{% endhint %}

### What is Flochat?

Flochat.ai is a conversational AI platform that enables businesses to build and deploy chatbots, voice assistants, and other AI-powered communication tools for customer engagement. Here are some key bullets that summarize the platform:

* Flochat.ai offers a range of tools for building and managing conversational AI experiences, including chatbots, voice assistants, and more.
* The platform uses natural language processing (NLP) and machine learning (ML) to understand and respond to user queries, providing a more personalized and intuitive experience.
* Flochat.ai can be used by businesses of all sizes and across a range of industries, from e-commerce and retail to healthcare and finance.
* The platform offers a variety of integrations, including with popular messaging apps like WhatsApp, Facebook Messenger, and more.
* Flochat.ai provides robust analytics and reporting tools, enabling businesses to track user engagement and optimize their conversational AI experiences over time.
* The platform offers both no-code and low-code options for building chatbots and other conversational AI experiences, making it accessible to a wide range of users.
* Flochat.ai offers enterprise-grade security and compliance features, ensuring that businesses can trust the platform with sensitive customer data.
* The platform provides customizable templates and pre-built components, enabling businesses to rapidly build and deploy conversational AI experiences without starting from scratch.
* Flochat.ai offers multilingual support, allowing businesses to build conversational AI experiences in a range of languages to reach a global audience.
* The platform provides extensive documentation and support resources, including a knowledge base, community forums, and direct customer support.

Overall, Flochat.ai is a comprehensive conversational AI platform that empowers businesses to create engaging and personalized customer experiences across a range of channels and languages.

### Guides: Jump right in

Follow our handy guides to get started on the basics as quickly as possible:

{% content-ref url="/pages/hcX0SDTDJ6maIm78QKJK" %}
[Broken mention](broken://pages/hcX0SDTDJ6maIm78QKJK)
{% endcontent-ref %}

{% content-ref url="/pages/d4pFFJFuULyPOHDXVmI2" %}
[Getting Started Checklist](/platform/introduction/getting-started-checklist)
{% endcontent-ref %}

{% content-ref url="/pages/CJYvatUiHy9zl4i4ZkN9" %}
[Platform Overview](/platform/introduction/platform-overview)
{% endcontent-ref %}

{% content-ref url="/pages/8p02bVCFUboAdi9TULEO" %}
[Connect to Channels](/platform/connect-to-channels)
{% endcontent-ref %}


# Getting Support

Providing you the best support we can is our upmost priority.

{% hint style="success" %}
For the fastest and easiest way to get immediate support is via our website chat widget. That can be found within the builder dashboard and also via the website.
{% endhint %}

### Where to find the support channels

You can reach out to our support directly within your chatbot dashboard:

| Type            | Location  | Channel      |
| --------------- | --------- | ------------ |
| Bug reporting   | Dashboard | Email        |
| Feature request | Dashboard | Email        |
| Billing         | Dashboard | Email        |
| General         | Dashboard | Website chat |

{% hint style="info" %}
Timings can be delayed during busy periods. Before you reach out to us, be sure to check via our support documents as the answer might just be there 🤗&#x20;
{% endhint %}

<table><thead><tr><th width="186">Support channel</th><th>Response Time</th></tr></thead><tbody><tr><td>Website chat</td><td>Immediate - 60 minutes</td></tr><tr><td>Email</td><td>24 hours</td></tr><tr><td>Video chat</td><td>Prior booking or within website chat</td></tr></tbody></table>

### Website chat

We have a great automated support to give you some basic guidance, but its always great to know that there's always a human on the other side waiting to jump in.

### Video chat

If there is a need to hop on a video call with you. That's no problems at all, as most things can be answered faster than the back and forth using text. If we deem it necessary, we will provide you with a video meeting link via the website support chat.


# FAQ's

<details>

<summary>I need assistance</summary>

No problems, if you didn't find what you were looking for in the help tab 'just to the lower left' of the dashboard. Reach out to us via the support chat at the bottom right.&#x20;

Our amazing support team is always on standby to help.[Getting Support](/start-here/getting-support)

</details>

<details>

<summary>Do you have a free trial?</summary>

Yes we do you can sign up for a 14-day full access trial [here](https:flochat.ai)

</details>

<details>

<summary>What happens when my free trial is over?</summary>

When this happens you have two choices. Either upgrade to a paid plan or enjoy our free forever plan instead.

</details>

<details>

<summary>How does Email and SMS pricing work?</summary>

We don't charge you to send emails. It's FREE. You can connect through SMTP or Sendgrid or Gmail.\
\
For sending SMS, Flochat doesn't handle the billing for SMS, you can sign up directly with our service provider([Twilio](https://www.twilio.com/), [Signalwire](https://signalwire.com/products/cloud-messaging) or [Message media](https://messagemedia.com/)), Check their official pricing for details.

</details>

<details>

<summary>Can I cancel at any time?</summary>

Yes you can without any issues. Just go to your billing section to cancel the plan.

</details>

<details>

<summary>Are you GDPR &#x26; HIPPA compliant?</summary>

Yes, Flochat is GDPR \&HIPPA compliant

</details>

<details>

<summary>What does 1 bot in business plan means?</summary>

1 bot means 1 Facebook page or 1 whatsapp number or 1 Instagram account, etc. And we offer omni channel, if you put this 1 bot in the omni channel, you can build the bot that available in the 8 channels we support currently(Messenger, WhatsApp, Instagram, Wechat, Line, Viber, Google Business Messenger, Telegram)

You can read more [here](/platform/introduction/workspaces-and-members)

</details>


# Pricing Plans

### Plans overview

We offer **3 plans** to suit all user requirements from Free forever, Pro and Pro plus.&#x20;

The **free forever** plan comes with 14 days free access to all Pro tools.

The **Pro and Pro plus** plans offer the exact same features and access to all pro tools, the only difference is the PRO Plus plan includes 1000 EXTRA users, weekly live video Q\&A, Bi-monthly group coaching and bonus content.

View all plan features here: <https://flochat.ai/plans>

{% embed url="<https://flochat.ai/plans>" %}

Free forever plan features 1 chatbot, 200 users, 3 messaging channels, 1 admin and unlimited conversations.

### PRO and PRO PLUS plans

Both the Pro and Pro plus plans features: 1 Chatbot, access to 15+ messaging channels, 5 admins, unlimited conversations, native ecommerce, 30+ integrations, API access, unlimited email sending, inbound webhooks and more.

| Free Forever    | Pro                        | Pro plus                  |
| --------------- | -------------------------- | ------------------------- |
| 1 Chatbot       | 1 Chatbot                  | 1 Chatbot                 |
| 200 Users       | 1000 Users                 | 2000 Users                |
| 3 Channels      | All Channels               | Weekly live Q\&A          |
| 1 Member        | 5 Members                  | Bi-monthly group coaching |
| Unlimited Chats | Unlimited Chats            | Exclusive content         |
|                 | Native ecommerce           | Co-pilot                  |
|                 | Integrations               |                           |
|                 | API                        |                           |
|                 | Inbound Webhooks           |                           |
|                 | Unlimited email sending    |                           |
|                 | OpenAI ChatGPT integration |                           |
|                 | Facebook group automation  |                           |
|                 |                            |                           |
| £0              | £19/month\*                | £49/month\*               |

### Pro plus plan

Learn how to confidently create chat automation that works... EVEN IF YOU’RE STARTING FROM SCRATCH! With almost a decade of experience in multiple verticals of conversational AI, join our experts for more clarity & confidence to create amazing conversational AI solutions for your business.

**Weekly live Q\&A**

Join us every week to get your questions answered live, collaborate with other members, product updates and more.

**Bi-monthly group coaching**

Join us every other week for dedicated group coaching, expert pro tips, micro workshops, user spotlight sessions and more.

**Exclusive content**

Get access to custom mini-apps, integrations, templates and video content 'not available anywhere else

**Co-pilot**

Stuck building awesome flows, need first line support for custom automations? Great... Our Co-pilot program gives you access to personalized one-to-one assistance with your build

####

### Additional Users

If you need more chatbot users, you can simply add on as many as required via the billing panel.

Below is a table containing the current pricing for additional users.

<table><thead><tr><th>Users</th><th>Price per month</th><th data-hidden></th></tr></thead><tbody><tr><td></td><td></td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th data-hidden></th></tr></thead><tbody><tr><td>£7</td><td></td></tr><tr><td>£14</td><td></td></tr><tr><td>£21</td><td></td></tr><tr><td>£28</td><td></td></tr><tr><td>£35</td><td></td></tr><tr><td>£42</td><td></td></tr><tr><td>£49</td><td></td></tr><tr><td>£56</td><td></td></tr><tr><td>£63</td><td></td></tr><tr><td>£49</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th data-hidden></th></tr></thead><tbody><tr><td>+1000</td><td>£7</td></tr><tr><td>+2000</td><td>£14</td></tr><tr><td>+3000</td><td>£21</td></tr><tr><td>+4000</td><td>£28</td></tr><tr><td>+5000</td><td>£35</td></tr><tr><td>+6000</td><td>£42</td></tr><tr><td>+7000</td><td>£49</td></tr><tr><td>+8000</td><td>£56</td></tr><tr><td>+9000</td><td>£63</td></tr><tr><td>+10,000</td><td>£49</td></tr></tbody></table>

### Additional chatbots

Extra chatbots are added to your current workspace. Billed at £7/chatbot/month. If you require bulk additions, reach out to our support team.

### Additional members

Extra members are added to your current workspace. Billed at £7/member/month. If you require bulk additions, reach out to our support team.

<details>

<summary>Do you have a free trial?</summary>

Yes we do you can sign up for a 14-day full access trial [here](https:flochat.ai)

</details>

<details>

<summary>What happens when my free trial is over?</summary>

When this happens you have two choices. Either upgrade to a paid plan or enjoy our free forever plan instead.

</details>

<details>

<summary>How does Email and SMS pricing work?</summary>

We don't charge you to send emails. It's FREE. You can connect through SMTP or Sendgrid or Gmail.\
\
For sending SMS, Flochat doesn't handle the billing for SMS, you can sign up directly with our service provider([Twilio](https://www.twilio.com/), [Signalwire](https://signalwire.com/products/cloud-messaging) or [Message media](https://messagemedia.com/)), Check their official pricing for details.

</details>

<details>

<summary>Can I cancel at any time?</summary>

Yes you can without any issues. Just go to your billing section to cancel the plan.

</details>

<details>

<summary>What does 1 bot in business plan means?</summary>

1 bot means 1 Facebook page or 1 whatsapp number or 1 Instagram account, etc. And we offer omni channel, if you put this 1 bot in the omni channel, you can build the bot that available in the 8 channels we support currently(Messenger, WhatsApp, Instagram, Wechat, Line, Viber, Google Business Messenger, Telegram)

You can read more [here](/platform/introduction/workspaces-and-members)

</details>


# Introduction

### Get started with Flochat

You are about to start with your very own conversational assistant. To make sure you get the most out of your new chatbot, we have written this guide to help you get the best start with Flochat.

In this comprehensive guide we’ll give you an in depth tour through the Flochat platform where we will explain the most important features in great detail. We’ll teach you how to build your chatbot, set up your dashboard and we’ll show you how you can measure your success to optimize your customer service experience.

After reading through this guide, you’ll know everything about the Flochat platform and you can get the best results from your chatbot in no time!

{% embed url="<https://sendlyofficial.wistia.com/medias/olcoolakyi>" %}

### **Step 1. Set your goals**

{% file src="/files/TF1oENK47pXhhjmqIiLY" %}

A good preparation is half the work, and defining your goals for your chatbot will make building one a whole lot easier. 👇

{% content-ref url="/pages/dDtluB75blNAdcBsdMop" %}
[Set your goals](/getting-started-guide/set-your-goals)
{% endcontent-ref %}


# Set your goals

We want to be sure you get off to a flying start. As the saying goes, to be prepared is half the victory, and the best preparation is knowing what you want to achieve. Therefore, the first thing we advise you to do is to decide on which goals you want to reach with your chatbot.

There are probably many things coming to your mind when thinking of goals for your chatbot. Here it’s important to consider when your chatbot would be a success for you. Do you want to automate at least 60% of your FAQ’s? Or do you want to generate at least 20 new leads per week? Success can mean a lot of different things. To help you along, here’s a list of some of the most common goals for chatbots to achieve:

* Reduce incoming emails, phone calls or chats
* Reduce costs for the Customer Service department
* Let Customer Support agents work more effectively
* Increase customer satisfaction
* Reduce churn
* Growing your social media channels

Of course, your goals can be anything you want, so try to think of all the ways you want your new chatbot to have an impact on your business.

### **Measure your success**

When you've chosen which goals you want to achieve with your chatbot, you’ll also want to add the right KPI’s to your goals. After all, you want to be able to measure whether your chatbot has reached these goals or not. Some examples of relevant KPI’s are:

* Degree of automation
* Cost reduction
* Churn rate
* Number of new leads

Deciding on your KPI’s not only helps you measure the success of your chatbot, it also makes it a lot easier to know exactly where you can improve your digital assistant. In the [maintain success](/getting-started-guide/maintain-success) section of this guide we explain how you can keep track of your KPI’s in Flochat.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoVLMImPNI6y7d5PjUuS4%2Ftempsnip.png?alt=media&amp;token=ae7f310d-c8dd-4fd8-9d93-8cad5d6d08de" alt=""><figcaption></figcaption></figure>

### **Step 2. Building your chatbot**

Let’s start building your chatbot! We’ll help you with the right preparations and guide you through the process of creating your automated conversations. 👇

{% content-ref url="/pages/ef4Xz1RVMQx6eu8y4wOf" %}
[Building your chatbot](/getting-started-guide/building-your-chatbot)
{% endcontent-ref %}


# Building your chatbot

Before you take the plunge and start building your chatbot, it’s a good idea to do some preparation first. Let’s begin with creating a flow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxU8ANiUTbTgSiweIRt2s%2FImage.png?alt=media&amp;token=5e546ded-deb5-4450-aa44-e82e6de2cefa" alt=""><figcaption></figcaption></figure>

### Creating your story

The very first thing to do when building a chatbot is to decide what you want your chatbot to do. Think about which questions you want to answer, which information you want to give your customers, and how you want your customers to navigate through conversations. This overview of what your chatbot should be able to do, is called a scope, but to keep it easy. We like to call it creating a story. 😊

When you’re preparing your chatbot story, it’s good practice to divide your story into multiple versions. Version one could be a more basic version of your chatbot that answers the most frequently asked questions. After that you can move on to version two, where you can incorporate more specific questions and topics into your chatbot. Eventually you can go even further and move on to version three and maybe even version four where you can integrate your chatbot into other systems or add more [channels](/platform/connect-to-channels).

It can be easy to dive in too quickly and lose track of what you’re doing and what you want to achieve. By using multiple versions of your chatbot story, you keep the implementation manageable and easy to oversee. Another benefit of working with multiple, smaller versions of your chatbot is that you can easily gather feedback in between versions. This way you can quickly and simply improve your chatbot as you go!

### **Conversational design**

With the story determined, you can finally start building your chatbot! So let’s talk about how you can construct your chatbot conversations. Let’s take a look at Conversational Design.

Now that you know which questions you want your chatbot to answer, it’s important to consider how customers might ask these questions and how they go about looking for the answers. When you’re building your chatbot, try approaching it from your customers’ perspective. Think about the way they navigate through your website, which topics they encounter and which questions might pop up along the way. With your customers’ journey in mind, it becomes a lot easier to construct a conversation around that.

Instead of immediately building conversations, it’s useful to sketch out the conversation flows first, either on paper or using digital flowchart tools. Sketching out your conversations first can greatly help you get a good overview of your customers’ journey through the conversations. This way you can easily see which decisions customers can make during a conversation and which questions they can get answered.

After you’ve mapped out your conversations and you have a clear overview of what your conversation will look like, you can start building your chatbot in Flochat.

{% hint style="warning" %}
Warning. It get's addictive&#x20;
{% endhint %}

### Chatbot setup

To get started with your new chatbot, we have prepared additional guides below. But be sure to finish this getting started guide first.

{% content-ref url="/pages/CJYvatUiHy9zl4i4ZkN9" %}
[Platform Overview](/platform/introduction/platform-overview)
{% endcontent-ref %}

{% content-ref url="/pages/d4pFFJFuULyPOHDXVmI2" %}
[Getting Started Checklist](/platform/introduction/getting-started-checklist)
{% endcontent-ref %}

### Conversations

As the name suggests, with the conversations you can create entire dialogues for your customers to have with your chatbot. Customers can start a conversation by asking a question to which the chatbot can reply and even ask follow up questions or perform follow up actions.

[Triggers ](/bot-automation/triggers)are forms of [input](/flow-builder/steps/question-step) from customers, used to start a specific conversation. In Flochat there are various types of trigger like: the start button and question variants. The start button is the first button customers can click inside the [website widget](/platform/website-chat) on your website. When customers click the button, the conversation you’ve associated the button with will automatically start.

If you make use of [Artificial Intelligence](/artificial-intelligence/openai-or-chatgpt) in your chatbot, your customers can also trigger specific conversations in your chatbot by typing in questions. You can fill in the question you want to answer in this conversation, along with at least two variations on this question. These variations are used to provide your chatbot with context for the question and will help your chatbot be able recognise hundreds of other variations on this same question.

Your chatbot will be able to recognise the customers’ questions, regardless of phrasing or spelling, match it to the correct conversation and give the right answer.

After you’ve selected the trigger for your conversation, you can use the Action modules. These modules signify actions your chatbot can take in the conversation. For example, you can use the Text module to have your chatbot send a message to your customers. Attachments like [pictures](/flow-builder/steps/steps), gifs or files can be sent using the Attachments module. And when you’ve created multiple conversations, you can connect them to each other by using the Link to conversation module.

Responses are ways your customers can interact with the chatbot during the conversation. After the chatbot has asked a follow up question, you can use the Response modules to create [multiple choice buttons](/flow-builder/steps/question-step#ask-for-choice) your customers can click. Or you can let your customers fill in an [input field](/flow-builder/steps/question-step) or one of your custom fields. Other response options include a [Calendar](/flow-builder/steps/question-step#ask-for-date-datetime) module for selecting dates, Checkbox answers for selections from a list or a [Feedback module](/contents/customer-feedback-facebook) for asking your customers to rate their chatbot experience.

### Testing your chatbot

Once you’ve added a flow to your chatbot, it’s time to do some testing. This is an important part of building your chatbot, as this is the moment when your chatbot will actually[ test](/flow-builder/flow-builder-overview#preview-feature) what you just added.

Within your flow select the [Preview](/flow-builder/flow-builder-overview#preview-feature) option.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxAhoHJlBVYqV4eUfWdAx%2Ftempsnip.png?alt=media&amp;token=7a7c57c8-6dac-436d-9d96-cf99ca6ec6d2" alt=""><figcaption></figcaption></figure>

When you click the preview chatbot button, the chatbot will automatically start the flow. For the best option use the webchat view as it will display on screen.

Now you can navigate through your chatbot as if you were one of your customers. If you encounter anything that needs changing, simply go back to one of the previous steps to update your chatbot flow.

### **Launching your chatbot**

If you’re completely satisfied with your chatbot, the last thing to do is to activate it. This exciting step can be done by simply pressing publish and your chatbot is ready to meet the world!

{% hint style="success" %}
Note: You can create as many flows as you need, and also link them all together to create an amazing customer experience.
{% endhint %}

### Step 3: Maintain Success

Now that your chatbot is live, it’s important that your new digital colleague stays successful. 👇

{% content-ref url="/pages/a52h1VXjVzn61eOwe9xg" %}
[Maintain success](/getting-started-guide/maintain-success)
{% endcontent-ref %}


# Maintain success

Congratulations! You’ve just successfully built your first chatbot! Now that your digital assistant is live and helping your customers, it’s important to make sure your chatbot stays successful. So let’s take a look at how you can monitor and optimize your new chatbot.

### **Monitoring & updating your chatbot**

Now that your customers are talking to your chatbot, you can monitor those conversations in real time, right from your dashboard and no matter what channel they come from. In the [livechat](/users/live-chat) section of your Flochat platform you can navigate to the left column where you can see the Live Chat.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKWa7JFjbBmAxzPTq24jN%2Ftempsnip.png?alt=media&amp;token=6e57841a-0b78-4d1b-b9bd-ec2bd4aa1f6d" alt=""><figcaption></figcaption></figure>

When you open this tab, you'll be able to view all your customer chats in one place. To the left is the customer window where you can see or filter customer chat. In the middle section is where you can respond to the customer in real time. You can also send emails, voice, pre-designed flows and more. To the right hand side will be all the customer information 'this can vary depending on what channel they are coming in from. But the basic information stays the same.

For example you can view what channel they entered on, last interactions, gender and more importantly the important data that you maybe collecting in your custom fields or even information that's say on your Shopify channel. So it's very data driven which helps you really be personable to your customers at scale. you can read more about the live chat functions below:

{% content-ref url="/pages/mntq8m7715URbihXUqqQ" %}
[Live Chat](/users/live-chat)
{% endcontent-ref %}

### **Measure with Statistics**

Monitoring conversations in real time only gives you a momentary view of your chatbots’ performance. To see the bigger picture and to keep an eye on your KPI’s, you can access the chatbot analytics. Simply navigate to the analytics menu in the left menu bar.

In the analytics overview, you can keep track of all the conversations your chatbot, or your agents, have had so far.

Some of the data points you can measure directly in your Flochat platform are:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJcZ0JEFi9MNcBSXybykc%2FCapture.PNG?alt=media&amp;token=0cddb67a-cabd-4c77-b1c6-b198c2ae3415" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxhTdYlgTvQJATN5ePvJC%2FCapture.PNG?alt=media&amp;token=baa213e5-7731-4118-b8df-b06945ea1617" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJUL1HbPWr2UNfAEjK2M9%2FCapture.PNG?alt=media&amp;token=ccb85de8-85c8-4a9d-8fae-914c088ee758" alt=""><figcaption></figcaption></figure>

### Agent Analytics

If you have a team of agents working with you, then you can view the agent analytics even more so.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsysctSCH3jLGCACwkQbn%2Fscreencapture-app-flochat-ai-settings-accounts-12426-2023-04-29-11_58_44.png?alt=media&amp;token=7f8bde54-64dc-4a07-a436-428b36b4a350" alt=""><figcaption></figcaption></figure>


# Introduction

### **The chatbot guide for beginners**

Chatbots You’ve probably heard of them, maybe you even tried them out before. But what exactly is a chatbot? If you’ve always wanted to know how a chatbot works, if and why you should use one, and how you can build your very own conversational assistant, we have created this useful guide for you!

In this complete guide, we’ll take you through the wonderful world of chatbots and tell you all about the benefits and importance of automated conversations, the different types of chatbots and we’ll tell you how you can build your own chatbot!

Of course we’ll also make sure you get a good understanding of the many different use cases and you can find some very useful examples of what the difference is between a chatbot and a good conversational assistant.

{% embed url="<https://sendlyofficial.wistia.com/medias/olcoolakyi>" %}

### **Step 1. What is a chatbot?**

Let’s get started! And what better way to begin with the biggest question you might have: What exactly is a chatbot? 👇

{% content-ref url="/pages/I9Ql7jDm0eMLpLS9pgeS" %}
[What is a chatbot](/chatbot-guide-for-beginners/what-is-a-chatbot)
{% endcontent-ref %}


# What is a chatbot

Phones ringing, new emails coming in non-stop and colleagues working round the clock to keep up. A familiar image to many.

Phones ringing, new emails coming in non-stop and colleagues working round the clock to keep up. A familiar image to many. Customer Service as we know it today can be a cluttered mess. Customers who want immediate answers are reaching out through a variety of different channels. And all while service agents constantly feel like they’re one step behind.

Luckily, there is a solution. A proven solution to this constant stream of incoming conversations is to automatically answer them, as soon as they come in. And what better way to automate than using your very own conversational digital assistant: a chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOi1yBr967DZBRhYhHBAm%2FFlochat%20home%20hero.png?alt=media&amp;token=4a855978-8bf5-452f-99f0-1a7d59712d11" alt=""><figcaption></figcaption></figure>

### **But what exactly is a chatbot?**

Artificial Intelligence can seem like a complex and intimidating concept straight out of science fiction, reserved only for the largest and most innovative companies. But reality offers a much more positive outlook. Nowadays, AI is more accessible than ever and just about anyone can think of new ways to use this exciting technology.

Conversational AI for chatbots is used to ensure your chatbot can not only provide answers, but can have an actual conversation with your customers, providing them with a natural and intuitive experience. This is achieved with the use of Natural Language Processing.

Natural Language Processing is a method of AI which involves recognising words, interpreting sentences and understanding the intention behind asked questions. In a chatbot, this means that instead of selecting from a set of predetermined options, customers can simply type in any question they have and the chatbot will respond accordingly. Thanks to [artificial intelligence](/artificial-intelligence/openai-or-chatgpt), variations in customer input are irrelevant as your chatbot can learn to recognise different phrasings of a question, spelling mistakes or synonyms. An AI-chatbot understands the intention behind the question and provides customers with the correct response.

### **Hybrid chatbots**

The true power of a successful digital assistant lies in the combination between Conversational AI and the easy and intuitive multiple choice options. By having the most frequently asked questions readily available in your chatbot as simple buttons to click, the majority of customers can be assisted in a matter of seconds. Customers with more complex or unique questions can simply type in what they’re looking for and the powerful AI will take over to provide the answers.

But what if your chatbot doesn’t know the answer to a question yet? That’s when your chatbot becomes a true part of your service team. These questions will automatically be forwarded to an available colleague while the unknown question is saved, so it can be later added to the chatbot. The service agent receives a warm handover with a complete overview of the customer, so they can jump in right where the chatbot left off. This is how your customers are provided with an excellent service experience, and your team has more time to focus on complex questions instead of just responding to FAQ.&#x20;

### **Step 2. Channels**

Now that you know what a chatbot is, let’s take a look at the different channels you can use to automate your conversations. 👇

{% content-ref url="/pages/wGNLWvRLXhDxPceDVS6a" %}
[Channels](/chatbot-guide-for-beginners/channels)
{% endcontent-ref %}


# Channels

These days, there are a multitude of conversational channels your customers use regularly. Besides a website, channels like WhatsApp, Instagram or Facebook Messenger are vitally ingrained in the daily lives of many people. The ability to contact businesses through these channels is becoming more important every day. Of course, if customers want to reach your company using these channels, your chatbot has to be there as well!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2a9ZKN11oBZiwXVS776Q%2Fomni%20channel%20support.png?alt=media&amp;token=003ac3de-980f-462b-9c29-7544d415d1fe" alt=""><figcaption></figcaption></figure>

### Website chat

Perhaps the most recognisable way to put a chatbot in action is on a company's website. The well known chat window in the corner of the website has been a familiar sight for a while now and is still a very effective way for customers to get in touch with companies.

The easy to use and low effort chat widget on a website has one major benefit for customers: they’re able to contact a company while they are navigating the company website. Because most customers’ questions arise while they are browsing the website, the chatbot can be of direct assistance and can answer any questions immediately, so the customers can move through their customer journey quicker and more efficiently.

Another upside of a chatbot in a website widget, is that the look and feel of the chatbot are highly customisable. By matching the image of the chatbot to the rest of your website, your chatbot becomes an extension of your brand and can greatly enhance the customers’ experience on your website.

{% content-ref url="/pages/pTuEMcsCzG7KSqkqDYLf" %}
[Website Chat](/platform/website-chat)
{% endcontent-ref %}

### **Facebook & Instagram**

Being the largest of the social media platforms, Facebook and Instagram are valuable tools for many companies. And where many businesses already have active Facebook and Instagram pages, Facebook Messenger and Instagram Direct Messages become ever growing sources of customer contact. Time for your chatbot to step in!

Implementing a multi-channel chatbot may seem like a challenge, but with the convenience of a full-fledged chatbot platform it becomes as simple as clicking a button! Once you have connected your[ Facebook](/chatbot-guide-for-beginners/channels#facebook-and-instagram) and Instagram accounts to your chatbot platform, you can simply publish the same chatbot from your website on Facebook and Instagram. This way, you can offer the same, consistent service experience from your website, immediately into the direct messages on Facebook and Instagram.

From a customer perspective, it makes even more sense to make your chatbot available on Facebook Messenger and Instagram Direct Messages. Many people are already familiar with the conversational interface where they can type in any message and here your AI chatbot fits in perfectly. Questions are recognized and answered immediately, while your customers never have to leave the Facebook or Instagram environment.

{% content-ref url="/pages/wGNLWvRLXhDxPceDVS6a" %}
[Channels](/chatbot-guide-for-beginners/channels)
{% endcontent-ref %}

### **WhatsApp**

Nowadays, WhatsApp is by far the most used messaging service in Europe and most of the rest of the world. With millions of people using WhatsApp every day, it is quickly becoming an important part of customer service. As a business, being available on WhatsApp allows you to offer customers an easily accessible way to communicate using a service they are already familiar with. A perfect opportunity for automation!

As with other channels, implementing your chatbot in WhatsApp can be done in seconds. Once you have built your chatbot, you can simply connect your [WhatsApp Business](/platform/whatsapp-cloud) account and your chatbot is ready to go live!

Once your chatbot is live on WhatsApp, it’s easy to see the benefits of this implementation. The powerful Conversational AI allows customers to start conversations, ask any questions they want and have them answered instantly. And because your chatbot never sleeps, your customer service is available 24/7. Especially useful for those late night conversations!

### We also support 15 more channels 👇

{% content-ref url="/pages/8p02bVCFUboAdi9TULEO" %}
[Connect to Channels](/platform/connect-to-channels)
{% endcontent-ref %}

### **Step 3. Benefits & importance**

By now you might wonder why you should use chatbots. Let’s have a look at the importance of a chatbot and find out why your customers want them. 👇

{% content-ref url="/pages/SjpkMadMqni9lJKQzuPR" %}
[Benefits & importance](/chatbot-guide-for-beginners/benefits-and-importance)
{% endcontent-ref %}


# Benefits & importance

Now that you know [what a chatbot is](/chatbot-guide-for-beginners/what-is-a-chatbot), you might wonder why your company should use one. Let’s take a look at the importance of an AI chatbot and find out why your customers want one.

We are all familiar with the fact that customers are more demanding than ever. We notice it every day when we see the constant stream of conversations flooding your customer service. If we take a deeper dive into these conversations, we see that the majority of these asked questions are mostly the same. When left for your colleagues to answer, you’ll find that they spend most of their time typing the exact same responses, over and over again. Even worse, most of these answers are available on your website as well, but we often see that customers either can’t find them or don’t read them. A simple enough reason to automate, right?

But let’s look further. Besides having to type the same messages all day, it can take your colleagues considerable time handling and closing these conversations. Every second you’re spending with one customer is one more second another customer has to wait. And with ever shrinking attention spans, losing customers due to long waiting times is a very real danger.

By implementing a chatbot, you can be assured that your customers receive their answers instantaneously and at all times of the day. Your new digital assistant will give the rest of the team more time to breathe and they can focus their efforts on more complex conversations requiring their expertise, which are automatically forwarded by your chatbot. Talk about teamwork!

**“What about personal service? Won’t we lose that?”** A question almost everyone asks when discussing chatbots, and rightfully so. By now it shouldn’t come as a surprise to learn that a good chatbot has got that covered as well. Personalizing interactions is an extremely useful addition to your chatbot that goes far beyond personality templates and reusing input fields.

By [integrating](/platform/introduction/integrations) your chatbot with your CRM system or back-end, customer data can be accessed in real time and used in chatbot conversations. Recognizing returning visitors, retrieving order data or scheduling appointments are just some of the many possibilities of a fully integrated chatbot. A personal touch was never this easy!

###

### **Step 4. Use cases**

There are many ways to put your chatbot to use. We’ll show you some of the most useful use cases for your chatbot. 👇

{% content-ref url="/pages/pDCP0Xz1MZfbeLJ6EVlA" %}
[Use cases](/chatbot-guide-for-beginners/use-cases)
{% endcontent-ref %}


# Use cases

We now know why you should use an intelligent chatbot, so let’s take a deeper look into how you can use your AI chatbot. There is of course an unlimited number of ways you can use a chatbot, but we are going to highlight the three most common use cases.

### **Customer service**

Probably the first department to come to mind when thinking of implementing a chatbot is Customer Service. Because service teams are often overwhelmed with customers asking questions at all times of the day, it becomes easy to understand how a chatbot can make a difference here.

In the case of customer service, your chatbot would be primarily focused on recognising the most frequently asked questions and providing the correct answers to them. Implementing this kind of chatbot would seem like it’d be as simple as loading your FAQ’s into the knowledge of the chatbot, but in reality there’s more to it.

Excellent customer service is not just about answering questions, but also about understanding your customers’ needs and guiding them to the solution best suited to them. Conversational is the key here, as oftentimes the real solution someone is trying to find goes beyond just the first question they ask.

Just like a real life agent would do, your chatbot can also ask follow up questions to better understand the underlying problems and provide a fitting solution. So when designing a Customer Service chatbot, it is important to consider the conversational side of the conversation. Think about how your customers ask their questions, how colleagues would respond to them and how customers would like to be guided through the appropriate steps.

### **Lead generation**

Where the classic example of a chatbot goes above and beyond for your customers, a more recent trend puts your chatbot to use for your Marketing and Sales teams as well. With the proper setup, a commercial chatbot can easily bridge the gap between service and sales.

**Picture this:** your customers are browsing your website, looking for the right information. To help them along, your chatbot steps in and guides them through the wealth of information. But instead of leaving them with the answer to their questions, the conversation goes one step further. Right at the moment when your customers are satisfied with the service they received, your digital assistant asks one more important question: “Would you like to receive more information about this?” or perhaps “Can I help with a quote for the products you just found?”.

Your chatbot proceeds to ask them all the details you want to know; name, contact information, interests, maybe even about budgets. All this information is then shared with your Marketing and Sales teams, increasing the count of your fully qualified leads. Your colleagues can now continue with their Sales funnel, as they have a complete package of information, ready to use in their follow up.

**How about this!** : Imagine being able to get leads and sales just from a comment on Facebook or even from an Instagram story 😮 With today's advancements of AI and chatbots, your Social media visitors can simply comment on your social media posts and either be sent a message/DM to continue their journey through your pre-made flow, or use AI to take over and respond directly in the comments to answer any support questions they may have. We can't wait to show you the enormous potential you're about to discover! Hint, imagine being able to follow up with abandoned carts right in the comments section from your Facebook ads and offer them a custom discount coupon to get them to purchase from you in seconds... We are just touching the surfaces here!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FutZsW8HFOMMllksiwyJ1%2FCapture.PNG?alt=media&amp;token=b371f1d3-fa93-4c25-97ff-3888e55bce5f" alt=""><figcaption><p>Automated Facebook Comment Support | Flochat</p></figcaption></figure>

### **HR & recruitment**

A newer, interesting use case for Conversational AI combines the strengths of service chatbots and commercial chatbots, creating a powerful digital assistant for your Human Resources department.

Where service is usually focused towards your customers, it is important not to forget that your colleagues are in need of service too. Ask any HR manager and they’ll tell you that they too are sometimes overwhelmed with questions from their colleagues. Holidays, contracts, overtime or payments are just a few of the topics your colleagues can have troubles with. Here it becomes easy to see how your chatbot can come to the rescue.

When implementing an HR chatbot for internal service, your colleagues can be provided with answers to all their questions instantly. Further actions can be then taken by your chatbot to automate even more processes and alleviate most of the pressures your HR department is currently experiencing.

Sales is not the only team benefiting from lead generation. When your business is growing, new positions are opening up all the time, and it can be a challenge to find the right people to fulfil these new roles. In the same way your chatbot can generate new commercial leads, new applicants for your job openings can easily be qualified by asking the right questions automatically.

By asking questions about experience, education, salary expectations or skills, your chatbot can easily eliminate unqualified candidates and provide your HR department with only the right people for the job. Your colleagues can then spend their valuable time interviewing the qualified candidates to find the right match for your company.

Be sure to check out the Flochat getting start guide

{% content-ref url="/pages/AaMzifDCNVfMKHWf7RFD" %}
[GETTING STARTED GUIDE](/getting-started-guide/introduction)
{% endcontent-ref %}


# Introduction


# Change Password

To update/change your password - Navigate to the top right hand side of the dashboard and select the drop down arrow next to your name.&#x20;

2: Select 'Your Settings'

3: Select 'Security' across to the left hand side.&#x20;

Enter your current password, add your new password and retype to confirm. If you have forgotten your password, read more [here](/platform/introduction/forgot-password).

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8nXdbwV69caDWt9iQZoM%2Fchange%20password.png?alt=media&amp;token=a123bf0e-cfb7-47b9-b5d8-bed2185e48ce" alt=""><figcaption></figcaption></figure>


# Forgot Password

If you have forgot your password and need to reset, tap the button below.

{% embed url="<https://app.flochat.ai/password/reset>" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXSAb1EgurpRL9POdFPIk%2FCapture.PNG?alt=media&amp;token=fa2ba59e-65d7-420c-bad3-221c1246b143" alt=""><figcaption></figcaption></figure>

* [x] We will send a password reset link to the email address you originally registered with.


# Getting Started Checklist

Firstly, welcome to Flochat 👋 be sure to tell your friends about us too

It can be complicated when discovering a new platform or if you're transitioning from another chatbot platform you'll notice how much better we actually are!&#x20;

Follow this simple getting started guide/checklist, so you can get off to a confident start 🚀

### Creating your workspace profile

So this is a great opportunity to add your logo and some other simple things. Lets start by navigating to the workspace settings tab located on the left side of the dashboard 👇

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPkQZwSWb7zzBKZpBFkU4%2Ftempsnip.png?alt=media&amp;token=f121faa9-f544-4d5b-8c35-26daa7a83190" alt=""><figcaption></figcaption></figure>

#### Adding your workspace logo

Simply upload your logo image file in the display below. This is great to help identify your workspace, and also if you are an avid content creator your viewers will see it too. Great for a little personal branding 💁‍♀️

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fs0vCS3vQT418wzznYNYS%2FCapture.PNG?alt=media&amp;token=54e9e62a-6c04-4280-9f47-e5ddf06aa17a" alt=""><figcaption></figcaption></figure></div>

#### Adding or changing your workspace name

Chances are you already have a workspace name selected. If you need to change it you can. This help identify your workspace by name when searching if required.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9FOEaDBY6fYbEknwBasm%2Ftempsnip.png?alt=media&amp;token=91cc1e84-fddd-4c1d-ab5f-f6b4d19914b9" alt=""><figcaption></figcaption></figure>

#### Adding your timezone

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FiFaPbn2m9wmfozxPoZDD%2Ftempsnip.png?alt=media&amp;token=044a7dbd-1f22-4c50-94ac-b7e32b4989e3" alt=""><figcaption></figcaption></figure>

There are multiple timezones to select from 👇

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJ4iIP4yxCG3ph6pb1gFf%2FCapture.PNG?alt=media&amp;token=a1aa29b1-8ce6-4899-9e7e-089a5a24ff3c" alt=""><figcaption></figcaption></figure>

### Setting up your dashboard display

We have numerous options available for you, so you can set up a visual display to your own liking. Just like selecting dark mode, but way cooler. For a nice theme and easier to use if you're just getting started out select the **Jelly Bean** Theme.

View all themes [**here**](/flow-builder/flow-builder-overview#available-themes)

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPh0I50dXXc53XloY6nB1%2Ftempsnip.png?alt=media&amp;token=d7db7465-844d-4f9a-98c2-32d73b9f2640" alt=""><figcaption></figcaption></figure>

#### &#x20; <a href="#hide-mini-map-or-tooltips" id="hide-mini-map-or-tooltips"></a>


# Platform Overview

### Overview <a href="#overview" id="overview"></a>

After logging in, your dashboard will look like the image below. Feel free to explore it!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDMzfgBQ9yXZlaGaavYEF%2Ftempsnip.png?alt=media&amp;token=f2c9bdfb-2f02-4d98-9c7a-ce736008626a" alt=""><figcaption></figcaption></figure>

## Dashboard <a href="#dashboard" id="dashboard"></a>

The dashboard shows you an overview of your workspace (team).&#x20;

To the left is your main tools task bar where you can navigate to your selected chatbots, add your integrations and more.

At the bottom there are 3 areas:

**Video tutorials:** So you can learn about different aspects of the builder.

**Community:** Keep up to speed with our dedicated community where you can collaborate with other Flochat users and get support when required.

**Help center:** Here you can access our help documentation, additionally you can click a link on the side tool bar to remain in one dashboard.

### Bots <a href="#bots" id="bots"></a>

Currently, Flochat supports 12 types of channels. Facebook, Instagram, Telegram, Slack, WeChat, WhatsApp, SMS, Voice, Google, Line, Viber and Vk.  [Setup & Create Bot](/platform/connect-to-channels).

### Support chat

To the bottom right you can access our live and ai assisted support chat

### Integrations <a href="#integrations" id="integrations"></a>

Here is where you manage all your integrations including your phone numbers, installed mini-apps, and other third-party services. Check the "[Integration](/platform/introduction/integrations)" document for detailed guidance accordingly.

### Ecommerce <a href="#ecommerce" id="ecommerce"></a>

Ecommerce section is for managing an e-commerce system for the whole workspace. Your products information can be used across all channels and all chatbots. Also, orders from any channel any chatbot will be listed here.

{% content-ref url="/pages/IURUnPtBRHME9nux0212" %}
[Ecommerce](/platform/introduction/ecommerce)
{% endcontent-ref %}

### Workspace Settings <a href="#workspace-settings" id="workspace-settings"></a>

Workspace settings allow you to edit workspace profiles, manage all the members in your workspace as well as the channels settings.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4Cx7PhxWX0g6UhN46N1c%2Ftempsnip.png?alt=media&amp;token=ccb92493-11dd-43ce-a5ed-74d1625c0613" alt=""><figcaption></figcaption></figure>

* **Workspace ID**: A dedicated number to allocate your workspace
* **Name**: Your workspace name
* **Timezone**: Set your specific timezone settings
* **Default Flow Theme**: Change the visual layout of your workspace

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9kdCidX0Vnyy1max93ua%2FCapture.PNG?alt=media&amp;token=47d6c17a-f444-46ba-8563-b1a95382a191" alt=""><figcaption></figcaption></figure>


# Workspaces & Members

As mentioned previously, workspaces are seen as a team while members/users are the people working in the team.

{% hint style="info" %}
A workspace can have many members and a member can join many workspaces in different roles.
{% endhint %}

## Workspace Limitations <a href="#workspace-limitation" id="workspace-limitation"></a>

Generally, a workspace is designed for one business and it organizes all the resources for the business, such as payment accounts, email sender profiles, products information, etc.

Each workspace has it's own **billing** and limitation on **members**, **bot users** and **bots** amount (fees applied for flexible add-ons).

#### 1 workspace can connect to:

* only 1 **omni** bot (8 channels)
* only 1 **Facebook** account
* only 1 **Google** account for **Google My Business**
* only 1 **Google** account for **Google Sheet**
* only 1 **Google** account for **Gmail**
* only 1 **Google** account for **Dialogflow**
* only 1 **Intercom** account
* only 1 **Stripe** account
* only 1 **PayPal** account
* only 1 **Cloudinary** account
* only 1 **Calendly** account
* only 1 **MongoDB Cloud** account
* only 1 **Twilio** account
* only 1 **SignalWire** account
* only 1 **Message** Media account
* only 1 **SendGrid** account
* only 1 **MailChimp** account
* up to 10 **SMTP** profiles (SMTP email sender)

{% hint style="info" %}
Moreover, 1 workspace can download each mini-app only once. For example, you download a WooCommerce mini-app and connect your workspace to a WooCommerce account, you are unable to download it again for connecting another WooCommerce account. Unless the app developer design it to be connecting more than 1 account.
{% endhint %}

You are allowed to connect your workspace to only 1 Facebook/Google(for Google My Business) account but you can create bots for more than 1 Facebook Page / Google Business.

### Connect to Multiple Facebook Pages / Google Businesses <a href="#connect-to-multiple-facebook-pages-google-businesses" id="connect-to-multiple-facebook-pages-google-businesses"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F07BDbDJCQ140iS2N6q73%2Fworkspace1.2334de1d.png?alt=media&amp;token=2e10a4e4-3a2a-4e18-b407-39fb828ce458" alt=""><figcaption></figcaption></figure>

You can connect to any Facebook Page / Google My Business and create bots for them as long as **you are the owner / admin** of those pages / businesses.

When you connect to your Facebook account, make sure you select all the pages that require management and there you go. For example, you wanted to build bots for your clients, simply have your clients invite your Facebook account to be an admin of their Facebook pages.

Same for Google My Business, have your clients invite your Google account to be an admin of their businesses and then you can build Google bots for them.

### Should I use different workspaces for different business? <a href="#should-i-use-different-workspaces-for-different-business" id="should-i-use-different-workspaces-for-different-business"></a>

It's of your own choice.

## Workspace Settings <a href="#workspace-settings" id="workspace-settings"></a>

### Workspace Profile <a href="#workspace-profile-timezone" id="workspace-profile-timezone"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4Cx7PhxWX0g6UhN46N1c%2Ftempsnip.png?alt=media&amp;token=ccb92493-11dd-43ce-a5ed-74d1625c0613" alt=""><figcaption></figcaption></figure>

To edit the profile of your workspace, click **Workspace Settings** and **profile** in the above screenshot. You can change your logo, workspace name, timezone and default flow theme.

{% hint style="info" %}
The timezone setting of a workspace will affect how your bot process time value. For example, the system value "BOT\_CURRENT\_TIME" is different when you have different timezone settings. Moreover, system value "NOW" and "TODAY" is based on bot users' timezones, if they don't have a timezone in profile, workspace timezone is used.
{% endhint %}

### Workspace Management <a href="#workspace-management" id="workspace-management"></a>

On the upper left corner of your dashboard, click a workspace name to switch to the workspace. By clicking **view all workspaces**, you will jump to the workspace management page:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTZvMuPXDs1ybbfGWxEAa%2FCapture.PNG?alt=media&amp;token=8c547cb3-6b2c-4614-b496-d97226d034ee" alt=""><figcaption></figcaption></figure>

Here you can see all the workspaces you've joined.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsDhhqRIcUxTcTxKGY8Cg%2FCapture.PNG?alt=media&amp;token=f7ab1768-ef89-4ba9-b46c-88425d8df624" alt=""><figcaption></figcaption></figure>

### API Keys <a href="#api-keys" id="api-keys"></a>

You can access the "API Keys" page from area 1 in the below screenshot.

Select a workspace and a flow to create an API key to access the flow from API calls.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLG00P3W5ntdhWfPu7BnQ%2FCapture.PNG?alt=media&amp;token=abb50f16-d252-46a3-8006-ef64ede30eb7" alt=""><figcaption></figcaption></figure>

{% content-ref url="/pages/eDcv2UEvwGrUlpy8N6AB" %}
[Chatbot API](/developers/chatbot-api)
{% endcontent-ref %}

### User Settings <a href="#user-settings-timezone" id="user-settings-timezone"></a>

In the upper right corner, click your user name and "Your Settings". Moreover, you can find support links here. For example, try "Quick Tour" to get familiar with your dashboard!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWhbHjekoNsb92mEfUnIU%2Ftempsnip.png?alt=media&amp;token=84fbbb39-4b1c-418e-850f-9f4f93f0d85b" alt=""><figcaption></figcaption></figure>

### Members and Roles <a href="#members-and-roles" id="members-and-roles"></a>

Each "Flochat account" is to be seen as a person/user. Members are all the people that have limited or full access to the workspace. There are 3 types of roles, **Owner, Admin and Member**.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpNcZp3Z3zNT6KHqgXGKv%2Fsidebar-difference.f0f6661d.png?alt=media&amp;token=1883577c-4c36-48aa-a159-9fe2310a64d7" alt=""><figcaption></figcaption></figure></div>

The first user who creates the workspace becomes the only owner of the workspace.

#### Member has limited access to the account. A member can <a href="#member-has-limited-access-to-the-account-a-member-can" id="member-has-limited-access-to-the-account-a-member-can"></a>

* View and edit all flows
* View analytics

#### Admin has limited access to the account. An admin can <a href="#admin-has-limited-access-to-the-account-an-admin-can" id="admin-has-limited-access-to-the-account-an-admin-can"></a>

* Have all features with Member
* Manage channel connections (add numbers, agents, connect pages, etc)
* Manage all integrations
* Manage the ecommerce system
* Manage templates
* Manage mini-apps

#### Owner has full access to the workspace. Owner can <a href="#owner-has-full-access-to-the-workspace-owner-can" id="owner-has-full-access-to-the-workspace-owner-can"></a>

* Have all features with Admin
* Manage workspace profile
* Manage members in the workspace (invite, delete, edit role)
* Manage subscription and payment

### Invite, Delete & Edit Role of Member <a href="#invite-delete-edit-role-of-member" id="invite-delete-edit-role-of-member"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fvu5kzEI7F1ENa7aKO4zs%2Fmembers.e21d4321.png?alt=media&amp;token=cee8c80f-e60c-465d-9e25-1b29f8a9b7d0" alt=""><figcaption></figcaption></figure>

(Owner Only) Follow steps 1, 2 and 3 in the above screenshot to send out an invitation to a new member with his/her email address and role setting.

If the new member is already a user, he/she can accept the invitation in the notification center (the bell icon in the upper right corner).

If the new member is not a user yet, the invitation email will contain a link to set up a new password. Once set up, the member can then also log into the workspace with their own login details.

### Edit Role of Members <a href="#eidt-role-of-members" id="eidt-role-of-members"></a>

(Owner Only) You can assign a role at the time you invite new members or edit it later on the member page. Click on the gear icon to change the role of a member.


# Integrations

Flochat has integrated with various third-party applications that you are familiar with, including:

<table><thead><tr><th width="251">Application</th><th>What service do they offer</th></tr></thead><tbody><tr><td>  <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTksCBpV55NKSYenSi3gG%2Fdownload%20(16).png?alt=media&amp;token=57f10814-8e55-4040-8fe2-053062612a66" alt=""></td><td>accept payments <a data-mention href="/platform/introduction/integrations/stripe">Stripe</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZgP2MZjg6OrYe82dqsQb%2Fdownload%20(17).png?alt=media&amp;token=8e0bd31f-6418-4b9f-87f6-64dfe7c4869c" alt="paypal"></td><td>accept payments <a data-mention href="/platform/introduction/integrations/paypal">PayPal</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNTMzjuELqDTMj7ArhjSE%2Fdownload%20(18).png?alt=media&amp;token=33058cc4-d627-4128-b648-fe352bf90f94" alt="cloudinary"></td><td>manage images, audios, videos and files <a data-mention href="/platform/introduction/integrations/cloudinary">Cloudinary</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEDOhhTKgd2UI3RM70jmB%2Fdownload%20(19).png?alt=media&amp;token=883422b4-b50e-47b5-bcd2-21b8d05d7aa9" alt="shopify"></td><td>manage customers/products/discount <a data-mention href="/platform/introduction/integrations/shopify">Shopify</a></td></tr><tr><td>  <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgbZ3re4jf5928BvB1Si4%2Fdownload%20(20).png?alt=media&amp;token=d6c6deff-8e3b-44bf-8e86-1cc6ee7acadc" alt=""></td><td>manage Facebook businesses and product catalog <a data-mention href="/platform/introduction/integrations/facebook-business">Facebook Business</a></td></tr><tr><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fy6dcVHpS4PVsUGsXCJmW%2Fdownload%20(21).png?alt=media&amp;token=b915ec6d-cfea-412f-87c1-bf1600312984" alt=""></td><td>book appointment <a data-mention href="/platform/introduction/integrations/calendly">Calendly</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrIwcj5zlW6AFYvc8CB6y%2Fdownload%20(22).png?alt=media&amp;token=adde737d-8ff4-499e-9026-0c83688bc711" alt="slack"></td><td>send notification <a data-mention href="/platform/introduction/integrations/slack">Slack</a></td></tr><tr><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzjUejlsBtNV5NC2kSpjl%2Fdownload%20(23).png?alt=media&amp;token=9ef1cf07-59f8-4531-bc0c-0c6ea81f696d" alt=""></td><td>manage user data <a data-mention href="/platform/introduction/integrations/google-sheets">Google Sheets</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fd1oYE8CL8fCzOQZDKRUN%2Fdownload%20(24).png?alt=media&amp;token=6a46ccf4-b7f5-4e0f-b541-966934cc9066" alt="data store"></td><td>manage user data <a data-mention href="/platform/introduction/integrations/data-store">Data Store</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fexx7mnJzPQA6ClArlHci%2Fdownload%20(25).png?alt=media&amp;token=4f1428d4-4fe9-486b-99e3-8a105033b1a0" alt="twilio"></td><td>provides phone number <a data-mention href="/platform/introduction/integrations/signalwire">Signalwire</a></td></tr><tr><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhsbYMaq58YW3EYuVRrPS%2Fdownload%20(26).png?alt=media&amp;token=6da845f6-bdd0-431f-9951-3eafc4de6ed9" alt=""></td><td>provides phone number <a data-mention href="/platform/introduction/integrations/twilio">Twilio</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZksXMn77sMM75G0d88St%2Fdownload%20(27).png?alt=media&amp;token=fa2ff2d0-9759-47dc-ad86-78a189177406" alt="smtp profile"></td><td>send emails <a data-mention href="/platform/introduction/integrations/email-smtp-gmail">Email (SMTP / Gmail)</a></td></tr><tr><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhwkQjjKwN68zxAbMSg47%2Fdownload%20(28).png?alt=media&amp;token=9440989e-54fa-46e7-b34a-1e69bac12139" alt=""></td><td>customer relationship management mailchimp<a data-mention href="/platform/introduction/integrations/mailchimp">MailChimp</a></td></tr><tr><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhVI6eBTZwFEuqDXCwGzC%2Fdownload%20(29).png?alt=media&amp;token=bea04410-12ae-4df5-a9bb-a14447f03e07" alt=""></td><td>serve your users by video/call <a data-mention href="/platform/introduction/integrations/videosdk">VideoSdk</a></td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMnWrFhSi2WcNJ4xffAT1%2Fdownload%20(30).png?alt=media&amp;token=13e074da-aa9d-43f0-b306-9abf1d75b337" alt="intercom"></td><td>customer support / live chat integration </td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdK4FDskA1JdaolivtUbd%2Fdownload%20(31).png?alt=media&amp;token=650bb3b2-2e54-4baa-bf50-d38b8714a393" alt="freshchat"></td><td>customer support / live chat integration </td></tr><tr><td><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJjG7xHnecSJ1S6scVrEZ%2Fdownload%20(32).png?alt=media&amp;token=ca90c54b-cf55-4b4a-8374-7de8341b3826" alt="mini apps"> </td><td> Customize your own integration with Mini-Apps</td></tr></tbody></table>


# Stripe

With Stripe, you can accept payment from users via

* Card
* Alipay
* WeChat Pay

### Setup Stripe <a href="#setup-stripe" id="setup-stripe"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRQRebmhUKfZvkTCWLPzg%2Ftempsnip.png?alt=media&amp;token=e6e88f6a-23f6-4772-be3b-9b0e3eafcec0" alt=""><figcaption></figcaption></figure>

More Stripe documentation information

{% embed url="<https://stripe.com/docs>" %}


# PayPal

Add your PayPal account into your workspace. To find your PayPal integration go from your main dashboard and select Integrations from the left-hand menu. Then select PayPal from the list

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FaJ73AdamX5E9bLbibOfM%2Ftempsnip.png?alt=media&amp;token=d396e6cc-b382-46f7-88d9-9ded852b7411" alt=""><figcaption></figcaption></figure>

We have **live mode** and **sandbox** available for you.

### Login to your PayPal developer account <a href="#login-to-your-paypal-developer-account" id="login-to-your-paypal-developer-account"></a>

To fetch your credentials login to your PayPal account and then head to your [developer dashboard (opens new window)](https://developer.paypal.com/developer/applications)

You will get a similar overview like this;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJjAVfR24BzLdSQFamhBv%2Fpaypal2.7d7052d2.png?alt=media&amp;token=4b51bf74-6dc2-44d9-8aa3-ba1b4b41133e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Be sure to select a mode first before creating an app to receive your credentials. Once pressed you will be taken to the page where you can create your app.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FuwYLFnvxDt9JlGuyIZKy%2Fpaypal3.8a8aa6da.png?alt=media&amp;token=8963a388-94e9-4f7b-bd99-3af93c29f70e" alt=""><figcaption></figcaption></figure>

After you created the app you will be taken to the page where you can fetch the client id, the client secret key and paste those into your workspace integration settings for PayPal.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJkH47Ivwbx5tgl1U8Cep%2Fpaypal4.d8e276d5.png?alt=media&amp;token=93c97fac-dcb9-43ac-a6f1-968a2f286f9c" alt=""><figcaption></figcaption></figure>

Optional could be to also add a redirection after payment. This allows you to point to a success flow inside your chatbot for example, or maybe a thank you page instead.

### Insert your PayPal details <a href="#insert-your-paypal-details" id="insert-your-paypal-details"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbBpBYVOWu32IQZlJ5dpb%2Fpaypal5.318d0d5a.png?alt=media&amp;token=d5ca073f-d62b-4b11-aac9-5a79f672ded7" alt=""><figcaption></figcaption></figure>

Once you copied and pasted all the details in your workspace integration section press save and you should see a verified notification popping up in the top right corner.

## How to use PayPal in your bot <a href="#how-to-use-paypal-in-your-bot" id="how-to-use-paypal-in-your-bot"></a>

Soon as your account has been connected you will have two ways of using this in your chatbots.

First thing you need to make sure you have set PayPal as a payment method inside your e-commerce store settings.

### Setting your payment method <a href="#setting-your-payment-method" id="setting-your-payment-method"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPqA39NsJngpUDmZUrEiD%2Fpaypal6.796b9f39.png?alt=media&amp;token=503457ca-6510-4bcd-bb77-5eb2976bb69b" alt=""><figcaption></figcaption></figure>

From your main Dashboard go to [Ecommerce](/platform/introduction/ecommerce) on the left-hand menu.

Scroll all the way down until you see the section called **Payment Method**. From here select PayPal as one of the methods for your ecommerce store. Don’t forget to press save to let the changes take effect.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtEsinVRnaMXgSVePIEzB%2Fpaypal7.226fd340.png?alt=media&amp;token=bd5868f2-43a6-4b70-b024-71fe0587da22" alt=""><figcaption></figcaption></figure>

### Use checkout to let customers pay with PayPal <a href="#use-checkout-to-let-customers-pay-with-paypal" id="use-checkout-to-let-customers-pay-with-paypal"></a>

Using the built-in ecommerce store is a fantastic way of selling your products. Once the user presses the checkout button in the conversation they will be taken to the online checkout section where they now can select PayPal to pay with.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxK17KM5MnbH3pYv1OK5Z%2Fpaypal8.3d5910f6.png?alt=media&amp;token=8e2464b9-cf0d-4eac-9d2d-29181e859d26" alt=""><figcaption></figcaption></figure>

### Use the one-click PayPal buy button <a href="#use-the-one-click-paypal-buy-button" id="use-the-one-click-paypal-buy-button"></a>

Another way of using the PayPal integration is by using the direct button for this. Very useful if you just want to sell a single product or service.

Add a button and from the option given choose the **PayPal Buy** button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBCDbmkgYGNm6PE7YMnUM%2Fpaypal9.31e8da3f.png?alt=media&amp;token=47036eaa-5fb3-4c89-8c70-81dcb16b80f9" alt=""><figcaption></figcaption></figure>

Once selected you will be able to quickly fill in all the product details like so

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FmUQKNHk93oIaMkfjzvMO%2Fpaypal10.d1929b10.png?alt=media&amp;token=9308912e-18f3-4f19-9351-cc670b05905a" alt=""><figcaption></figcaption></figure>

Once everything is filled in, scroll down and press save. You will now be able to sell single products.

{% content-ref url="/pages/IURUnPtBRHME9nux0212" %}
[Ecommerce](/platform/introduction/ecommerce)
{% endcontent-ref %}


# Cloudinary

Cloudinary allow you to store data easily with just a few steps.

To connect to your Cloudinary account you will need a few things as shown in the below image.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fhep2WwDGk9FfSEhEbQng%2Ftempsnip.png?alt=media&amp;token=5a94f31d-a922-4e45-96ae-0c1b988f104b" alt=""><figcaption></figcaption></figure>

From your main dashboard go to the Integrations section on the left-hand menu. Then select **Cloudinary** from the overview. From here you will only need 4 things you can fetch from your account over at [Cloudinary (opens new window)](https://cloudinary.com/).

### Login to Cloudinary <a href="#login-to-cloudinary" id="login-to-cloudinary"></a>

Just login and from the dashboard you will be able to access all the info if you already created it beforehand.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FplXVakiYd7xmEUoBfylj%2Fcloudinary02.9555dd36.png?alt=media&amp;token=8abeb3df-ac5b-484a-8f6a-f15f6c7d9088" alt=""><figcaption></figcaption></figure>

If you have the above already present then you are all set to go. Just copy and paste it into your workspace integration overview.

If you do not have an API key and secret yet or want to create a new one just for your chatbot, then you will need to create one.

### Creating your API key <a href="#creating-your-api-key" id="creating-your-api-key"></a>

You can create an API key by going to the **settings**, then selecting the **security tab**

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDj4hrtrZlqD4ysYFQKEZ%2Fcloudinary03.c139495d.png?alt=media&amp;token=913a3a75-284c-4357-afec-6f37225eb05b" alt=""><figcaption></figcaption></figure>

From here scroll all the way down until you see a section called **Access Keys**. From here press the text called “**generate new pair**”

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fe0EF1Xx3BFsyu6zIzlYy%2Fcloudinary04.22889246.png?alt=media&amp;token=2f8f76bd-5b71-40b0-8289-b89df6db3483" alt=""><figcaption></figcaption></figure>

Once generated copy both the API key and secret and paste it into your workspace along with your other details

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0EUKG76V43E1d5Effao8%2FCapture.PNG?alt=media&amp;token=1dd9215f-b244-4b62-9060-597913ad0860" alt=""><figcaption></figcaption></figure>

### Using Cloudinary in your flows <a href="#using-cloudinary-in-your-flows" id="using-cloudinary-in-your-flows"></a>

Once connected you can use Cloudinary directly inside your chatbot flows.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FAwkdaeuEQ1cBo6m22vFt%2Ftempsnip.png?alt=media&amp;token=5f620d35-e5e8-4c7e-9504-da01b6e2334f" alt=""><figcaption></figcaption></figure>

Just insert an action block -› integrations -› Cloudinary.

From here you will be able to upload a file directly to your account and store it securely


# Shopify

With Shopify, your bot can show and gather information during conversations, including customers, products, discounts and shop details.

### Setup Shopify <a href="#setup-shopify" id="setup-shopify"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8qxWt8BaaNpqoUSBVdxv%2Ftempsnip.png?alt=media&amp;token=057cb213-1185-4999-b0d6-f90e5da5b3f8" alt=""><figcaption></figcaption></figure>

After connection, you will then be able to use Shopify in your Action step. As follow are the functions you can utilize. Descriptions for each field will be put on corresponding photos.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FSHyKcAiMvzEZDCUhZo9e%2FCapture.PNG?alt=media&amp;token=53a7d66b-b116-4eee-9ebe-08ca30f12f06" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The functions work via API calls. This means that, by giving some inputs, you get your outputs from the servers. The outputs are saved in custom fields for future uses.
{% endhint %}

You might need to know how to build flow and use variables before you read the following functions. See links below for guidance.

* [Flow Builder Overview](/flow-builder/flow-builder-overview)
* [JSON Operation](/flow-builder/steps/json-operation)

### Shopify Actions <a href="#use-shopify-in-action-step" id="use-shopify-in-action-step"></a>

| Shopify Actions                 |
| ------------------------------- |
| Search for Customers            |
| Get Customer Information        |
| Get Customer Orders             |
| Get Customer Abandoned Checkout |
| Search for Products             |
| Get Product Information         |
| Get Product Images              |
| Get Product Variants            |
| Search for Custom Collections   |
| Search for Smart Collections    |
| Get Collection Information      |
| Get Collection Products         |
| Get Shop Information            |
| LookUp Discount Code            |
| Create Discount Code            |


# Facebook Business

Facebook business management integration will allow you to easily sync facebook catalogue products into the built-in [ecommerce](/platform/introduction/ecommerce).

The benefit of syncing this back to our ecommerce is that you can easily match the products from Facebook with our built-in ecommerce.

{% hint style="info" %}
This is the most needed feature if you are using the WhatsApp product catalogue to build out your native WhatsApp ecommerce.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F1sldP1vONh18FIHzGf47%2Ftempsnip.png?alt=media&amp;token=c37e0a74-4639-45aa-a661-d0d3040aa121" alt=""><figcaption></figcaption></figure>

### Connect to your Facebook business account <a href="#connect-to-your-facebook-business-account" id="connect-to-your-facebook-business-account"></a>

If you click the “Connect Facebook Business” button, it will request you to authorize access to Flochat

Click the “Continue” button, and now you are already connected with your Facebook business account.

### Disconnect your Facebook business account <a href="#disconnect-your-facebook-business-account" id="disconnect-your-facebook-business-account"></a>

You can disconnect your Facebook business account anytime by clicking the disconnect button.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fil2iD0rWKsEp5WkT9iJt%2FCapture.PNG?alt=media&amp;token=63093afc-a572-4490-890e-cee5c9ec6851" alt=""><figcaption></figcaption></figure></div>

### Sync the product catalog from Facebook to your ecommerce <a href="#sync-the-product-catalog-from-facebook-to-your-ecommerce" id="sync-the-product-catalog-from-facebook-to-your-ecommerce"></a>

In order to sync the product back, you need to click the “list business catalogs” button, and then it will pull out all the product catalogs from your Facebook business account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYphVy2er3f1udFBOCvNu%2Ftempsnip.png?alt=media&amp;token=1c4ff7ba-5f38-4ff5-8f6f-d79e379ccbde" alt=""><figcaption></figcaption></figure>

And then click the “Facebook -> Local”, you should be able to sync the products into our built-in ecommerce system.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fjii5QBVd2tvDUdBTOB9d%2FCapture.PNG?alt=media&amp;token=7608ac04-781b-4a86-93fe-37637a72e997" alt=""><figcaption></figcaption></figure></div>

The below value will be synced back.

* Product name
* Product description
* Product image
* Pricing
* SKU
* Product type
* Product vendor

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FguTlR4oL2CI4fmL2UodV%2FCapture.PNG?alt=media&amp;token=7212f92f-d8c6-41cd-b56b-df18741a767f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that the SKU is the same value as the content ID in your Facebook cataglog. That’s how we match the product with our ecommerce.

Don’t change the SKU value. If you want to use the WhatsApp product catalog/native ecommerce, you need to always keep the SKU at the same value as the content ID in your Facebook catalog.
{% endhint %}

### Change the currency <a href="#change-the-currency" id="change-the-currency"></a>

If you are using a different currency in your Facebook product catalog, you need to make sure you change the same currency in your ecommerce settings.

Always make sure the currency settings are the same between Flochat & Facebook product catalog.

**Navigate**: Ecommerce > Settings > Payment method

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCijB8bKsbQaqfKtvlGUT%2Ftempsnip.png?alt=media&amp;token=f8906837-f11b-4d5e-806f-de028a9ff000" alt=""><figcaption></figcaption></figure>

### Benefits of syncing Facebook catalog <a href="#benefits-of-syncing-facebook-catalog-with-uchat" id="benefits-of-syncing-facebook-catalog-with-uchat"></a>

If you sync your Facebook catalog products to Flochat, you will be able to easily use WhatsApp product catalog messages/native ecommerce.

#### 1- For example, when you are using Get products in the ecommerce action, you can select the filter your want as the screenshot below: <a href="#id-1-for-example-when-you-are-using-get-products-in-the-ecommerce-action-you-can-select-the-filter-you" id="id-1-for-example-when-you-are-using-get-products-in-the-ecommerce-action-you-can-select-the-filter-you"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FyA4yBYR4taG7DOyeww2G%2Ffacebook-business-integration-07.941145e6.png?alt=media&amp;token=44111057-c568-48ad-b3d2-c73406718531" alt=""><figcaption></figcaption></figure></div>

And when you have set up your filter to dynamically populate your products, you will be able to save the products dynamically into a JSON variable.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvUK4jMj8ISVrKyMVja7w%2Ffacebook-business-integration-08.4b276e8b.png?alt=media&amp;token=d1f1e89b-b66f-4e32-aeb1-ee136f5a4041" alt=""><figcaption></figcaption></figure>

And then you can use the send message, and then select “Catalog product”, please note this is only available in the WhatsApp channel with 360Dialog as your WABA provider.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fm7ntuS453hqp9lxhO3Zj%2Ffacebook-business-integration-09.27e1e5f2.png?alt=media&amp;token=c4f25ad1-3a73-4620-928f-266febeea130" alt=""><figcaption></figcaption></figure></div>

And you can use the retailsID directly in the “WhatsApp Multiple products” message as per the screenshot below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FaNXbSu3LZVnhZvn8H3we%2Ffacebook-business-integration-10.5c4d723a.png?alt=media&amp;token=765a4423-9823-41a6-80b6-7f8d7e2502e3" alt=""><figcaption></figcaption></figure>

In this case, you will be able to use our built-in ecommerce and dynamically populate the products in the WhatsApp channel.

#### WhatsApp product inquiry trigger: <a href="#id-2-whatsapp-product-inquiry-trigger" id="id-2-whatsapp-product-inquiry-trigger"></a>

* If you sync your Facebook product catalog with our built-in [ecommerce](/platform/introduction/ecommerce) system, and when you set up the “WhatsApp product inquiry” trigger, which you can find in the Automation, then New Triggers.
* Since the product retailer id will have the same value in SKU in our ecommerce system, so that we can display directly which product the user is asking about.

And then, you can use our Select system variable to show the product directly in the card format.

If the retail ID is matching with any SKU value in the Sendly system, then you can find the matching product information in our SELECT system field as per below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2paZdPswAp0QW4DnKbya%2Ffacebook-business-integration-12.0a73eb92.png?alt=media&amp;token=a22a0171-23d0-4c96-b320-1a1113781899" alt=""><figcaption></figcaption></figure>

The details set up for the “WhatsApp Product Inquiry” trigger is as the screenshot below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvBeyvKW7dArx9cYYlFdz%2Ffacebook-business-integration-13.9ccd0bff.png?alt=media&amp;token=0d434a04-ab2f-4d42-a5b8-ca203ad2c601" alt=""><figcaption></figcaption></figure>

#### Show product details in “Orders” in the chatbot ecommerce system. <a href="#id-3-show-product-details-in-orders-in-the-uchat-ecommerce-system" id="id-3-show-product-details-in-orders-in-the-uchat-ecommerce-system"></a>

* Since WhatsApp product catalog messages mainly rely on the Facebook Catalog feature, and if you sync them with the [built-in ecommerce](/platform/introduction/ecommerce) system, you will be able to see the product name and pictures in our order section in ecommerce.
*

```
<figure><img src="/files/1arhZiSozADUat2iY1dH" alt=""><figcaption></figcaption></figure>
```


# Calendly

Calendly is a fantastic way of being able to create bookings for your business or that of your clients.

### Connect to Calendly <a href="#connect-to-calendly" id="connect-to-calendly"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FI1HNK4hJw0pRvjpg6MLt%2Ftempsnip.png?alt=media&amp;token=2340a98b-22b8-42c5-a76a-b92cf696bf81" alt=""><figcaption></figcaption></figure>

From the main dashboard go to **Integrations** from the left-hand menu. Then select **Calendly** from the list.

Press the button **Connect Calendly Account** to go to Calendly and authorize.

You will be redirected back and your account should show verified. If you have a pro account you will also see a checkmark with the webhook section

### How to use Calendly <a href="#how-to-use-calendly" id="how-to-use-calendly"></a>

Soon as Calendly has been connected you will be able to use it in any of your chatbots.

Go to a flow, select a text message and apply a button. For the type of button, you can select the Calendly button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpJpVecMNslwN5qDQ0DaD%2Fcalendly_04.5b73ce03.png?alt=media&amp;token=4bb987a1-5815-4ad5-a3d4-9fb77b68f572" alt=""><figcaption></figcaption></figure>

Once done you will be able to select an event type. These events are being fetched from your Calendly account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJQCSwXHClm4mUqPsEBVq%2Fcalendly_05.ee0f909b.png?alt=media&amp;token=86e7521d-78cb-40e5-b35f-af77294ec40b" alt=""><figcaption></figcaption></figure>

Once you send this message with the button to the subscriber he or she will be able to book an appointment using the event you set up.

After this is done you will be able to fetch the booking details from the **Select** system field.

Open up the system variable list, Search for the system field called **Select**

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzvrtSMmkOyOuz2CEUK8D%2Fcalendly_06.bd0c6d54.png?alt=media&amp;token=011f14fb-c4af-4c6c-bb49-cb86b4e2e32f" alt=""><figcaption></figcaption></figure>

Once pressed you will get a pop-up that will display all possible information you can get back from Calendly.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fp75D5UXHIFe183mUDhS4%2Fcalendly_07.7b15f6ad.png?alt=media&amp;token=781fa23b-4e84-4cd7-8f2c-c7fe2d8e7725" alt=""><figcaption></figcaption></figure>

This way you can confirm the booking with your subscriber as seen in the previous screenshot above


# Slack

With Slack, your bots can send various types of messages to your Slack group or contacts mainly for notification purpose for now. However, we are working on building Slack flow. So there will be more functions with Slack shortly.

### Setup Slack <a href="#setup-slack" id="setup-slack"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fs3lwW1gO5azYC5YFYJBW%2Ftempsnip.png?alt=media&amp;token=a3c7c802-ec73-4c20-a358-f11cf2003e18" alt=""><figcaption></figcaption></figure>

To send out notifications to your Slack group or personal channel, you will need incoming webhooks first.:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPmoQDPw6Bf8BgymFhsYd%2FCapture.PNG?alt=media&amp;token=fc02e474-9072-49cf-bcc7-34f45977dab8" alt=""><figcaption></figcaption></figure>

There are 2 ways to get an incoming webhook URL:

* from Slack Incoming Webhooks App
* from your own Slack App

#### [#](broken://pages/tdeqNpIZOpn0VdqgOxDW) Get an Incoming Webhook URL from Slack Incoming Webhooks App <a href="#get-an-incoming-webhook-url-from-slack-incoming-webhooks-app" id="get-an-incoming-webhook-url-from-slack-incoming-webhooks-app"></a>

Visit [Incoming WebHooks](https://sendly-workspace.slack.com/apps/A0F7XDUAZ-incoming-webhooks?tab=more_info) (opens new window), login yourself, then:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4xkR6FvdXdIKB745wUyX%2Fslack_incom_app1.eadb9dd1%20(1).png?alt=media&amp;token=ffcd3666-1f73-498b-8fa9-0ceca2c4b0a1" alt=""><figcaption></figcaption></figure>

click "Add to Slack".

Pick a channel you would like your bot to send notifications to, then click "Add".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FuJX3uR3sFWy6rQYtUhph%2FCapture.PNG?alt=media&amp;token=f72b4c08-8e8d-4e8d-af35-c419c136b8f8" alt=""><figcaption></figcaption></figure>

Ta-da! Here you are the URL.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQhQ64GwGKgEMkwoNERot%2Ftempsnip.png?alt=media&amp;token=8a6fcabe-f696-463d-adf3-e2968dce7562" alt=""><figcaption></figcaption></figure>

#### Get an Incoming Webhook URL from Your Own Slack App <a href="#get-an-incoming-webhook-url-from-your-own-slack-app" id="get-an-incoming-webhook-url-from-your-own-slack-app"></a>

Select view Slack Documentation

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPmoQDPw6Bf8BgymFhsYd%2FCapture.PNG?alt=media&amp;token=fc02e474-9072-49cf-bcc7-34f45977dab8" alt=""><figcaption></figcaption></figure>

#### 2, Create your Slack App

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8bdumaIAspIydQe1VxAy%2Ftempsnip.png?alt=media&amp;token=c99c2689-7488-4801-937d-c59c9d1c0fbf" alt=""><figcaption></figcaption></figure>

#### 3, Name app and select workspace

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJWspb6VA0t0HgB7rDPzq%2FCapture.PNG?alt=media&amp;token=6c4dd9b7-9eb0-4c76-9757-1f2134ccc56c" alt=""><figcaption></figcaption></figure>

#### 4, Select: Incoming Webhooks

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnGmi67oWeK8TR6Xwxe8f%2Ftempsnip.png?alt=media&amp;token=49955cb7-7b39-4a7d-a653-58c508040733" alt=""><figcaption></figcaption></figure>

#### 5, Turn On then select 'Add new webhook to workspace'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6LXsZtVdWv0aA5RNPKO3%2Ftempsnip.png?alt=media&amp;token=57e33ba3-0fba-4121-868d-7791cd119a51" alt=""><figcaption></figcaption></figure>

#### 6, App is now created!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZrCawTzqHTu9tvIQofph%2FCapture.PNG?alt=media&amp;token=c85f0034-e116-4f79-9a5a-b5ddde6c3483" alt=""><figcaption></figcaption></figure>

#### Once you select the 'Allow' Button a new screen will display. Displaying your webhook URL 'At the bottom'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FriUTq5mDYWGr5wQ4lrNT%2FCapture.PNG?alt=media&amp;token=84051398-96b4-4dea-b8bc-7f1451771755" alt=""><figcaption></figcaption></figure>

### Paste the webhook URL into your incoming webhook

* Add an app icon
* Name your app

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FU95tlPnm1c5wtpvwRsPm%2FCapture.PNG?alt=media&amp;token=1718c7c8-aaf5-492c-bf0e-7128710bcfca" alt=""><figcaption></figcaption></figure>

#### Select create and your webhook will be created

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVM7Mm8bhgRs6gfoCE77u%2FCapture.PNG?alt=media&amp;token=20afc244-85a3-4402-977e-05c131cd1ea1" alt=""><figcaption></figcaption></figure>

More information click -> [Slack API (opens new window)](https://api.slack.com/messaging/webhooks)

#### Send Slack Notification <a href="#send-slack-notification" id="send-slack-notification"></a>

A common usage for slack integration is to send slack notification. For example, to back up your bot, set a "Talk to Human" button. And when user press it, send a slack notification to a support channel or a support staff. Check how to [send slack notification](/flow-builder/steps/send-notification).


# Google Sheets

With Google Spreadsheets, you can add, update and look up your data in a spreadsheet as well as process the data with various built-in tools with Google.

### Setup Google Spreadsheet <a href="#setup-google-spreadsheet" id="setup-google-spreadsheet"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3b4eDgWrj1SkfiyFulX2%2Ftempsnip.png?alt=media&amp;token=cc754540-c1fc-4580-9031-d692b5b9895d" alt=""><figcaption></figcaption></figure>

Allow access your Google spreadsheet.

### Manage Spreadsheet in Action Step <a href="#manage-spreadsheet-in-action-step" id="manage-spreadsheet-in-action-step"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FG5iesXBx94zWd45q7NHv%2FCapture.PNG?alt=media&amp;token=87514c72-fe34-425e-85bc-3fad8bf6b7c4" alt=""><figcaption></figcaption></figure>


# Data Store

Data Store is a built-in data storage system. With Data Store, you can easily add, delete, update, check up your data either manually or in Action steps.

### Setup Data Store <a href="#setup-data-store" id="setup-data-store"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqbejmHyCr6eK56qlrE8c%2Ftempsnip.png?alt=media&amp;token=bd3f30ea-ae7e-4847-9e5a-bf0ef09d0772" alt=""><figcaption></figcaption></figure>

1. name the Data Store
2. click "+ Add Field", the following window will pop up.
3. when finished, click "Save".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpyDQfBRiF5QMqPdAbAjW%2Fdata_store2.1569a8a5.png?alt=media&amp;token=e6386ef0-de62-4815-95f8-e315d4092ec1" alt=""><figcaption></figcaption></figure>

1. name the field (used in the system, no space allowed)
2. choose a value type (an Array can have several values like JSON variable)
3. give a label if needed (for prettier display)
4. give a default value if needed
5. once finish, "Save"

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdByFN8CbLSwvyXMyL4mH%2Fdata_store3.6866f6bf.png?alt=media&amp;token=e7995dc5-9734-4149-919c-bafd6a1181eb" alt=""><figcaption></figcaption></figure>

1. click "Browse" for viewing and editing records
2. click the pencil for editing fields of Data Store

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4Gt3ZIE8g1qz4JrOMKXS%2Fdata_store4.c1d9e661.png?alt=media&amp;token=69e33f6c-1e97-4cbc-967d-f88bf5b6dce3" alt=""><figcaption></figcaption></figure>

You can add/edit/delete records in the data store in 2 ways:

* Do it manually in the "Browse" window in the following picture
* Put it in the Action step and the flow will automate the process

{% hint style="info" %}
**Please note that**

When you add a new record, the system will assign a unique "Record Id" to it automatically. You can access this value by using the field name "\_id".
{% endhint %}

### Manage Records Manually <a href="#manage-records-manually" id="manage-records-manually"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsIIgezyTQIywZEgnfqu5%2Fdata_store5.133fb2ee.png?alt=media&amp;token=b105b3c7-7dcf-43dc-9ec5-8d1f3b19de68" alt=""><figcaption></figcaption></figure>

1. add new records, see picture below
2. edit/delete records
3. search records

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQWR9FYkl6YmG69KwQaYE%2Fdata_store6.a66d738d.png?alt=media&amp;token=57ed12b4-0c6e-42cd-9978-ac3127028d83" alt=""><figcaption></figcaption></figure>

A new record requires values for the fields you set in the data store (value can be blank). There will be a "Delete" button in the editing window and the rest look the same as above.

### Manage Records in Action Step <a href="#manage-records-in-action-step" id="manage-records-in-action-step"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fzz6lv8mbXf7P5DjEqjSo%2Fdata_store7.32c9f004.png?alt=media&amp;token=8a9a4d54-b5dd-4b6d-ad5c-54f042c7876a" alt=""><figcaption></figcaption></figure>

In an Action step, follow steps 1 to 3 in the above picture. Then you will see a list of functions.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzcCTdxQP61zleWJOZKwi%2Fdata_store8.41d56032.png?alt=media&amp;token=284087e7-97ee-4815-acfb-e1694c6a7abb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The functions work via API calls. This means that, by giving some inputs, you get your outputs from the data store. The outputs are saved in custom fields for future uses.
{% endhint %}

{% hint style="warning" %}
You might need to know how to build flow and use variables before you read the following functions. See links below for guidance.
{% endhint %}

* [Flow Builder Overview](/flow-builder/flow-builder-overview)
* [Variable Operation](/flow-builder/steps/variable-operation)


# Twilio

With Twilio you are able to create voice, SMS and WhatsApp chatbots. In order to connect your Twilio account go to the integration section from the left-hand menu and select Twilio.

As you see you only need to insert two pieces of login details to connect your Twilio account:

* Account SID
* AUTH Token

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0KdQIspzWbjuzT8kXalk%2Ftempsnip.png?alt=media&amp;token=55a9ebfb-aa6c-45b4-9a29-b26ec5701cbb" alt=""><figcaption></figcaption></figure>

### Login to your Twilio account <a href="#login-to-your-twilio-account" id="login-to-your-twilio-account"></a>

Login to your [Twilio account (opens new window)](https://console.twilio.com/) and when arriving at your dashboard overview you will be able to directly grab the Account SID as well as the AUTH token

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F70cpJRUwEmKc4cx8z9ll%2Ftwillio%20dashboard.png?alt=media&amp;token=599e4759-25bd-4334-807c-b74155264775" alt=""><figcaption></figcaption></figure>

Copy and paste both into your workspace Twilio section and press the save button. If all goes well then you should also see a verified status in the top right corner of your screen

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fd6Qh39aVn9SE8KxQbolx%2Ftempsnip.png?alt=media&amp;token=9e8355b6-887f-44e7-8a6f-d4bc8f7c5ac9" alt=""><figcaption></figcaption></figure>

### How to use Twilio <a href="#how-to-use-twilio" id="how-to-use-twilio"></a>

Now your account is connected you are now able to create a chatbot on one of the following channels:

* Voice
* SMS
* WhatsApp

You will also see which channels you have connected to which phone number.

Once all is connected you can go ahead and start creating your sms and voice chatbots 🚀

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNlaWptDzlX9H4L4ziOKM%2Fcreate%20sms%20bot.png?alt=media&amp;token=bb10d5ee-1094-4d95-bd76-c893de4203fc" alt=""><figcaption></figcaption></figure>


# Signalwire

With Signalwire you are able to create voice and SMS chatbots inside of your chatbot account. This native integration allows you to connect to your account in just a few steps.

From the main dashboard overview, choose integrations on the left-hand side, then select Signalwire from the list.

You will need 3 kinds of login details in order to connect to your SignalWire account:

* Project id
* App Token
* Space URL

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsWdbuVfd8EK8xEKSH243%2Ftempsnip.png?alt=media&amp;token=f1748cfb-82d8-4f2e-bae6-4aefdaaf5778" alt=""><figcaption></figcaption></figure>

### Login to Signalwire <a href="#login-to-signalwire" id="login-to-signalwire"></a>

In order to grab your credentials, you will need to login into your [SignalWire account (opens new window)](https://signalwire.com/).

Once inside you should have a similar overview when being directed to your dashboard

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FIZ8c6vTm2nMY3DYCUOTz%2Fsignalwire_02.87194cb4.png?alt=media&amp;token=88aa5847-7ad2-4505-ae54-e25c682c48c7" alt=""><figcaption></figcaption></figure>

From this main dashboard overview, you will be able to directly grab your **Project ID** and **Space URL**.

### Creating or fetching your token <a href="#creating-or-fetching-your-token" id="creating-or-fetching-your-token"></a>

To grab your token go to the **API** menu option on the left-hand side and from there press the **generate a token** button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fq1WCpIpsMVcj6kILRBRR%2Fsignalwire_03.11512033.png?alt=media&amp;token=42aaa85a-25bf-4cd7-953f-257cb816ab06" alt=""><figcaption></figcaption></figure>

Fill in the needed credentials and you will get a token in return.

Once done paste all the credentials into your workspace and don’t forget the press the save button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fa3YezpPnq9OFecUnxcWi%2Fsignalwire_04.1a2c7654.png?alt=media&amp;token=c4d132e6-4f05-4901-9a7a-0c4ff2b553ea" alt=""><figcaption></figcaption></figure>

### How to use SignalWire <a href="#how-to-use-signalwire" id="how-to-use-signalwire"></a>

Now that your account has been connected you can start creating voice and or SMS chatbots.

Just go to the left-hand menu, select either the voice or SMS channel and press the **add phone number** button.

From the dropdown select SignalWire, then press the button **find number**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbzbrhWEQfwlQhb9rS3u8%2Fsignalwire_05.cbbe46ad.png?alt=media&amp;token=a871a164-01f4-46dc-9b39-e454a51e243f" alt=""><figcaption></figcaption></figure>


# Email (SMTP / Gmail)

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fv6lIZHwKc418Pk1MCXHA%2Ftempsnip.png?alt=media&amp;token=c07c88be-7470-411d-b07e-510deb0ccda0" alt=""><figcaption></figcaption></figure>

We support 2 email integrations: SMTP Profile and Gmail.

### SMTP Profile Setup <a href="#smtp-profile-setup" id="smtp-profile-setup"></a>

Add your SMTP provider details in the box

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWllTx9psgJkGNCdHXWs7%2FCapture.PNG?alt=media&amp;token=0f5517c3-2648-41da-9285-09ec62813ded" alt=""><figcaption></figcaption></figure>

Once completed your SMTP connection will display verified

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGxC4lFh1rboETsZ1Zt1m%2Fdownload%20(34).png?alt=media&amp;token=60d3b4b8-6cc2-470c-b5c6-b3f5ac5ad613" alt=""><figcaption></figcaption></figure></div>

### Gmail Setup <a href="#gmail-setup" id="gmail-setup"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9gu4ymXR6QETpGTzOuuV%2Ftempsnip.png?alt=media&amp;token=736bbfb7-835b-4122-b323-5c55f903dd2b" alt=""><figcaption></figcaption></figure>

Click "Connect Google Account" after you choose "Gmail".

Select one of your Gmail and "Allow"

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fx2NyJ8jghGR1cHqT5Z2S%2Ftempsnip.png?alt=media&amp;token=665906b4-f340-4de3-8f6f-11110b622c40" alt=""><figcaption></figcaption></figure></div>

Once done, it looks like this:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQnedhlnhWKmQazFGydSO%2FCapture.PNG?alt=media&amp;token=b1c31779-8e66-467b-bf44-a8be53c46925" alt=""><figcaption></figcaption></figure>

### Send Email Notification <a href="#send-email-notification" id="send-email-notification"></a>

After setup your email integration, you can select it as a sender in your "Email Profile" list. Check how to send [email notification](https://sendly.gitbook.io/sendly/flow-builder/steps/send-notification#email-notification)?

### Send Email Step <a href="#send-email-step" id="send-email-step"></a>

Add a Send Email step by right-clicking in your workspace or from the "Add new step" button:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F1XUHBsaUa4RaiIyncicN%2Femail18.56805144.png?alt=media&amp;token=443102ef-d82e-4c8f-82c0-dbbd2ad5a080" alt=""><figcaption></figcaption></figure></div>

Name a sender and receiver. There are 3 blocks of information, subject, message and attachment. Feel free to add what you need.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F7jWnuR19yVObuyELm4K9%2FCapture.PNG?alt=media&amp;token=3c28ba40-e397-4050-8a76-a9780003076a" alt=""><figcaption></figcaption></figure>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fe571UoSrVYNJX7yggjXM%2FCapture.PNG?alt=media&amp;token=a9979050-6f39-4f76-8ee9-c4619e3205d5" alt=""><figcaption></figcaption></figure></div>


# MailChimp

### Setup <a href="#setup" id="setup"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fo1k5DuJsUl2zM3JT8Aeu%2Ftempsnip.png?alt=media&amp;token=8554ce3e-9ff9-43df-a1dd-6f26720f1a54" alt=""><figcaption></figcaption></figure>

Log in yourself and authorize.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCZ5UYmHOTBmC9vuYHv9K%2Fmailchimp3.0bb5752c.png?alt=media&amp;token=9855065f-c868-460b-b153-edabab1238de" alt=""><figcaption></figcaption></figure>

The page will then bring you back to the chatbot. You can see your account name now.

### Use MailChimp in Action Step <a href="#use-mailchimp-in-action-step" id="use-mailchimp-in-action-step"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfsSN1YVX8imLrOYHj5MW%2Fmailchimp4.b0000724.png?alt=media&amp;token=494d1fb0-ef72-4112-8b9a-15d914e6ad3c" alt=""><figcaption></figcaption></figure>

In your Action step, find "MailChimp" in the "Integrations" list.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8ECYQZlVHcvm4QY2KJEp%2Fmailchimp5.c971f6ef.png?alt=media&amp;token=2d82d3cc-799d-476d-9345-9b909514fea0" alt=""><figcaption></figcaption></figure>

Simply put this Action after a Question step. Pick a MailChimp list and put users' email address. That's all about it!

{% hint style="info" %}
Only a valid email address can be added to your MailChimp. If nothing happens after the Action step, the email address from the user might be incorrect.
{% endhint %}

{% hint style="success" %}
So you might want to add one more action to check whether the input email from the user is correct or not. There are various third-party APIs for verifying email, like [mailboxlayer (opens new window)](https://mailboxlayer.com/). You can call these APIs from [External Request](/flow-builder/steps/external-request).
{% endhint %}

More details click -> [Mailchimp (opens new window)](https://mailchimp.com/help/)


# VideoSdk

With this native integration, you will be able to create live meetings directly inside your chatbot.

To connect to your VideoSdk account go to **Integrations** from the left-hand menu in your main dashboard overview. Then select **VideoSdk** in the list.

You will see that you need two pieces of credentials:

* API key
* Secret

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3JbNLFdmBZQSZatMhC0H%2Ftempsnip.png?alt=media&amp;token=5d9295ac-e0eb-4d4f-a1a6-496aac110e42" alt=""><figcaption></figcaption></figure>

### How to fetch your credentials <a href="#how-to-fetch-your-credentials" id="how-to-fetch-your-credentials"></a>

Login to your VideoSdk account, then go to the [API keys section (opens new window)](https://app.videosdk.live/api-keys). Copy your API key and secret from this page.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F1AtO2EANQna6pEtuIjLo%2Fvideo_sdk_02.fd30b7ff.png?alt=media&amp;token=e95592ff-b9ab-42b0-9131-799386a20fcd" alt=""><figcaption></figcaption></figure>

Then go to your workspace and paste in these two credentials. If successful you will see a verified status message in the top right corner

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTAmpDL1eNkCr0DwzaOUx%2Fvideo_sdk_03.79db18b3.png?alt=media&amp;token=104f2bd2-c4db-4c1d-beef-92d6f005beaf" alt=""><figcaption></figcaption></figure>

### How to use VideoSdk in your chatbot <a href="#how-to-use-videosdk-in-your-chatbot" id="how-to-use-videosdk-in-your-chatbot"></a>

Now that your account is connected you can use it in any of your chatbots throughout any channel.

Inside a flow create an action block, then choose **integrations** -› **VideoSdk**

You will then get the following popup screen;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUY1Jp3uvKWDQmXRnpoEV%2Fvideo_sdk_04.2af6aa64.png?alt=media&amp;token=69eee279-3320-4a1c-a67f-b023779d2cb0" alt=""><figcaption></figcaption></figure>

Fill in all the information then press the blue button named Save. You will be able to share the meeting URL with your participant and the agent taking the meeting.


# Ecommerce


# Setup Ecommerce

With our built-in Ecommerce system, you can easily manage your products, discounts and orders with Flochat across all the [channels we support](/platform/connect-to-channels). **Set once and use it everywhere!** Your bot can introduce and sell products for you automatically. 💰💰

### Products <a href="#products" id="products"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMZ67TvuGCHaSUqEmSubA%2Fproduct.e40bfa2d%20(1).png?alt=media&amp;token=d670cd7f-68d0-45d9-9402-8f042770e9e7" alt=""><figcaption></figcaption></figure>

Here is where you manage your products. When you add new products,

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBOHtBj0ojXpXzdsqYfS8%2Fadd_product.d1d42291.png?alt=media&amp;token=b909a63e-2e77-4516-b29e-fbb127f44027" alt=""><figcaption></figcaption></figure>

Remember to set the availability status for the product. Utilize the Organization section to sort and organize your products:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnyuyKWnt78CGaNYiY1Sr%2Fdownload%20(35).png?alt=media&amp;token=fc83b5de-8209-418b-9195-1d8386625af5" alt=""><figcaption></figcaption></figure></div>

When you click choose Product type, Vendor, Tags and Collections, you might see nothing in the list from the very beginning.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhWsuMMrOskV8a3VtfKNp%2Fdownload%20(36).png?alt=media&amp;token=a676d9d8-bd7f-45d1-971d-68a3f3a6f2a1" alt=""><figcaption></figcaption></figure></div>

Don't worry, you can easily create one by just typing in a new name, then click the name to create a new one. See the picture above. However, for creating a new collection, you will need to access "Collections", see next.

### Variants <a href="#variants" id="variants"></a>

If a product has multiple options, use "Variants".

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcZuJkyB12SoGoOvHM2ge%2Fvariant1.d7e57379.png?alt=media&amp;token=5edd001c-edbd-4ba7-a774-a179d82147de" alt=""><figcaption></figcaption></figure></div>

In the above screenshot, tick the checkbox first and give an option name such as size, colour, weight, etc (maximum 2 options). Then in "Option Values", list all the available values of that option by typing in the field e.g. 128G and input a comma or hit the "enter" key on your keyboard. Then you will see it jump in a blue box with a delete button.

After you setup all the options, you can edit the price of each variant. **Click "Save" to create the product** and click the pencil icon to back to the editing page to add more details of the variant including photo, compared price, inventory, etc:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqeKUFkp0WbuSjouSniW8%2Fvariant3.1ac8140a.png?alt=media&amp;token=27cd4d36-a3ce-492d-9ae2-3f7b0d0e6fa7" alt=""><figcaption></figcaption></figure>

This is how it will look like in the shopping UI:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfhP4XCsXRTRZMUi8IpYx%2Fvariant2.924e491e.png?alt=media&amp;token=18319be0-bfd5-4e2a-bb10-308f640116e3" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
In my case, I have colour and size options. Since for colour I have different photos but for size, no. So I need to put colour as the first option, because only the first option shows variant photos.
{% endhint %}

### Collections <a href="#collections" id="collections"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLdxmNonAxeyKKUnzlrQw%2Fcollection.c6d55d6f.png?alt=media&amp;token=7624bf15-c6e0-463e-8cd8-80de37bec043" alt=""><figcaption></figcaption></figure>

When you create new collections, you can add products to the collection in 2 ways:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fi81NzkYdTlXYKkB04JGx%2Fcollection2.8447dc44.png?alt=media&amp;token=c4b7de01-3b2a-4942-8b79-94c04fc24eb5" alt=""><figcaption></figcaption></figure>

* Manually add existing products to it

  > You need to choose the "Manual" option and save it first, then click the pencil mark to add products. When you add products, you can click the "Search" button without any keyword to get the full list of all existing products or type in any keyword to search.
* add automatically by giving conditions

  > setup the conditions before you save the creation. "all conditions" means only the product which matches all conditions listed here will be added to this collection. While "any condition" means the product which matches any one of the conditions listed here will be added.

### Discounts <a href="#discounts" id="discounts"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXFiQwdyKRdtodXKSAENg%2Fdownload%20(37).png?alt=media&amp;token=a24920bb-ad58-4680-a0a2-a1cc6cf6bbcf" alt=""><figcaption></figcaption></figure>

Select the "Discounts" tag and click "Create Discount".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYB6yGAxizsKtQe0Dl3iS%2Fdiscount2.95293c0c.png?alt=media&amp;token=ef07215c-92be-4126-bc8b-d9a962029c8f" alt=""><figcaption></figcaption></figure>

Use "Generate code" to get a random code or name one by yourself.

Feel free to customize the rest details for the discount. Once done, click "Save".

{% hint style="info" %}
If you get system errors, being unable to create a discount. Please leave it for now, we are working on this feature and will get this solved as soon as possible. Sorry about any inconvenience.
{% endhint %}

### Shopping Carts

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTfHOaCz8bOw9hvrm9Oaq%2Fcart1.676881a7.png?alt=media&amp;token=bea28f4b-4f8a-43a3-bc2d-cedb363a2409" alt=""><figcaption></figcaption></figure>

Here is where you check users' cart information. Click on the "x items" button to view item details like this:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHbMTAl15CykIPieeVU3E%2Fcart2.3acdd7c5.png?alt=media&amp;token=aad26b9a-b485-4699-b88b-c49743a3e962" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After checkout, the items will be removed from carts and added to orders.
{% endhint %}

### Orders <a href="#orders" id="orders"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8ku9iabKoqPMeAUJRo0p%2Forders2.5b2b7f2e.png?alt=media&amp;token=a57544f7-1bed-4876-8e97-032ef7ebfe76" alt=""><figcaption></figcaption></figure>

All the order histories are listed under "Orders". Again, click on the "x items" button to view item details.

### Settings <a href="#settings" id="settings"></a>

{% hint style="info" %}
A series of basic information like store information, shipping method and payment method have to be set before you test the checkout process. For example, if you didn't add any payment method in the settings, you might find yourself unable to open the checkout page.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhzjtX62MXVUmGDKizPgU%2Fsetting1.1d010a2f.png?alt=media&amp;token=c7214f4f-ad52-4740-9ab1-a50ea0f592e8" alt=""><figcaption></figcaption></figure>

Leave your store details.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkGOHiwugNgNoihZMdKEf%2Fsetting2.0e86adac.png?alt=media&amp;token=3166d529-0504-4a56-8a1c-bcdea1a712ff" alt=""><figcaption></figcaption></figure>

Check all available shipping methods. If "Pick up" is checked, do make sure you fill in your "Store address" above "Shipping method".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fsuxal51BoJisius6kZCK%2Fsetting3.cf7395b7.png?alt=media&amp;token=21c05475-10f9-489f-b85f-645db7bb6f34" alt=""><figcaption></figcaption></figure>

Check all available payment method and select currency.

Finally, add prefix or suffix to your order ID if needed.


# Use Ecommerce in the Flow

### Show Products <a href="#show-products" id="show-products"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F19S78gw7HYHM3XWCQ1Yn%2Ftempsnip.png?alt=media&amp;token=4395497b-bc05-4484-928c-e1c7de9a0e03" alt=""><figcaption></figcaption></figure>

Within your flow, select a message step to start. Select the ecommerce tab, then select products.

Now you'll see the new step open.

The next step is to configure the design, of how you want to display your ecommerce products

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvnvGcA3VumtRAbUXpXfs%2Ftempsnip.png?alt=media&amp;token=b6cfca6d-79a5-47ee-94e4-9cc421f46e51" alt=""><figcaption></figcaption></figure></div>

### Product gallery settings

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FP3ekuNvvebEGfOQljow2%2FCapture.PNG?alt=media&amp;token=737afb33-f4c0-41a5-8807-cabf9feff6c7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Due to the fact that Facebook allows only 10 cards displayed at one time, you might need to apply a filter to narrow down the products.
{% endhint %}

* Choose how many products to show from 1 to 10
* Select a sorting condition according to the user's choice
* Set a filter with as many conditions as needed.
* Image ratio

### Add to Cart <a href="#add-to-cart" id="add-to-cart"></a>

The next step enables you to add an 'Add to cart' button below each store item.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgbVn1XvQidN0ynJcKvlT%2Ftempsnip.png?alt=media&amp;token=25cf32d1-6869-4f2f-b824-1d655f31a7f8" alt=""><figcaption></figcaption></figure></div>

Add a button title and select next step

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkeLpGicNAriUf9TlA5vO%2Ftempsnip.png?alt=media&amp;token=bb647a70-df90-440e-8c6e-2633c0b80211" alt=""><figcaption></figcaption></figure>

Now select **Add to Cart** from the actions display panel

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYHhT2CpcKwWiOGNsCelw%2Ftempsnip.png?alt=media&amp;token=d218caec-b26c-4804-8ad4-9b1e2e2eed83" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4VyoQGWxoygRvVuTgDD3%2FCapture.PNG?alt=media&amp;token=c5ae158b-fca8-4ef2-a03e-059c76a815cf" alt=""><figcaption></figcaption></figure>

### View Cart <a href="#show-cart" id="show-cart"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkUlSLd8fBP5NBBih9y8S%2Ftempsnip.png?alt=media&amp;token=716c93c1-e04a-432c-86da-7b0d8dd16224" alt=""><figcaption></figcaption></figure>

Optional 'Add a new button called view cart' This will show your visitors what is in their carts.&#x20;

Find "Shopping Cart" under "Ecommerce", click "Edit".

The edit page of "showing cart" is similar to the "showing product's.

{% hint style="info" %}
If a customer picks more than 10 products but below 20, try using "Newest" to show the first 10 and "Oldest" to show the rest. It's rare but what if it's more than 20? Maybe try listing products by price range or first letter. Alternatively, you can also customize some Send Message steps to show the cart rather than using the "showing cart" function. Access cart information in "SHOP" JSON variable and "$.cart.num" of "SHOP" for items number in the cart.
{% endhint %}

### Remove from cart <a href="#remove-from-cart" id="remove-from-cart"></a>

Select "Remove from cart" when the button is pressed. You might want to use a Go to step to go to the cart again to refresh, since there are quantities shown with products that differ from showing a static menu.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHGD7CCRjwP26OZKmoljo%2Ftempsnip.png?alt=media&amp;token=d1e4a833-2379-47eb-9181-5320ff1e673c" alt=""><figcaption></figcaption></figure>

Now your basic flow should look like the image below.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FL1mJ3UbNZ6XfK9PLPqN3%2FCapture.PNG?alt=media&amp;token=ccf724b9-c099-4267-b458-072a840439b2" alt=""><figcaption></figcaption></figure>

### Empty Cart <a href="#empty-cart" id="empty-cart"></a>

Create a new button in the shopping cart block, then create an action step. Within this action step select ecommerce > Empty cart.&#x20;

Alternatively you can create a quick reply button > Select "Empty Cart"&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FipjIFcXyFeMzgfGLPs89%2Ftempsnip.png?alt=media&amp;token=d4b18710-6766-4051-9792-7669af69d0c7" alt=""><figcaption></figcaption></figure>

### Checkout <a href="#checkout" id="checkout"></a>

To simulate the checkout process, you will have to setup your Stripe Integration as well. Check how to setup Stripe.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOAzzzwj64lMDS30ZFOKn%2Ftempsnip.png?alt=media&amp;token=6c62e892-868e-49e4-98fd-6a740f6ffed7" alt=""><figcaption></figcaption></figure>

If you don't want to put "Checkout" under each product, try adding one more text-type information after showing the cart:

When users checkout, a list of products will show with quantity and price first, following by an area to leave users' contact details:

Keep scrolling down you will see delivery options, coupon code and a summary of the order.

Finally, by selecting a payment option and clicking "Pay $xx.xx", the page will be directed to your payment gateway.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcI0FOsPOMtlqI4WrVO2X%2FCapture.PNG?alt=media&amp;token=c630e350-5bad-4dfd-b9e9-12bb9338607a" alt=""><figcaption></figcaption></figure></div>

An order confirmation will be sent when payment succeed. Click on the confirmation to view the order detail.

### "Buy" Only One Product <a href="#buy-only-one-product" id="buy-only-one-product"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FU3tQi4LneFvtma78MCTf%2Ftempsnip.png?alt=media&amp;token=587d90c9-0d63-4bb6-8e93-f0b28ad995f7" alt=""><figcaption></figcaption></figure>

"Buy" is actually a feature having nothing to do with the built-in ecommerce system. After setting up your payment gateway, users can purchase one product (can be from your Stripe account) with one click on the "Buy" button with no ecommerce system setting at all.

The feature is suitable for ticket product without options or paying subscription fees, etc.

### How to use System JSON Variable <a href="#how-to-use-system-json-variable" id="how-to-use-system-json-variable"></a>

There are several system field storing information about the ecommerce system. Usually, the system will tell you where to find according to data like this:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHqgVbXelBZoPDLXVZYBK%2Fsystem_info.4e9e5cfa.png?alt=media&amp;token=02201b66-285c-4240-a5e8-d7f445b9559f" alt=""><figcaption></figcaption></figure>

You can access them wherever you see "\</>":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2wNqmGJx4O4FA5g5TQG7%2Fadd_to_cart3.8f9ec360.png?alt=media&amp;token=7a4a6058-8588-4532-821c-c78a2035ea16" alt=""><figcaption></figcaption></figure>

### System JSON - "SHOP" <a href="#system-json-shop" id="system-json-shop"></a>

"SHOP" stores all information about your ecommerce settings.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBrHuzi9ZdvPVjL4b6QqB%2FCapture.PNG?alt=media&amp;token=c150efd8-5ba6-4815-84a6-c42b3d6964b9" alt=""><figcaption></figcaption></figure>

### System JSON - "ORDER" <a href="#system-json-order" id="system-json-order"></a>

"ORDER" stores the user's last order. You only get an order after checkout.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDlTYUmHU04ofuLQn1XBR%2FCapture.PNG?alt=media&amp;token=cd643fbb-c1d2-49c1-9339-f7e82c9dbb14" alt=""><figcaption></figcaption></figure>

### System JSON - "CART" <a href="#system-json-cart" id="system-json-cart"></a>

"CART" stores the user's shopping cart.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgSNNgwv2FsyuYyf3LnA3%2FCapture.PNG?alt=media&amp;token=e094802c-96a1-4be3-82ed-d2bbc3f9f297" alt=""><figcaption></figcaption></figure>

### System JSON - "SELECT" <a href="#system-json-select" id="system-json-select"></a>

When you choose "Select" when a button pressed, the selected item is stored in "SELECT".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTpkCCNKHFQom5uRHYGx6%2FCapture.PNG?alt=media&amp;token=9650d833-7a45-4825-96ae-261344883ed9" alt=""><figcaption></figcaption></figure>

### SELECT.sku:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FiXzfUBgkGgIEDDjbw1Yf%2FCapture.PNG?alt=media&amp;token=de391800-ccb7-418a-a49f-72793559d570" alt=""><figcaption></figcaption></figure>


# Connect to Channels

{% hint style="info" %}
After you connect create a bot, when you unlink a bot, all data in a flow is saved includes [subflows](/flow-builder/sub-flows), settings and [bot users](/users/bot-users). You can link the flow to another bot connection but your bot users will be removed to avoid conflicts.
{% endhint %}

### Omni Bot <a href="#omni-bot" id="omni-bot"></a>

Omnichannel gives you the ability to create 1 single bot and connect it to all channels supported in omnichannel.

Currently, there are 8 different channels but as we keep adding more you will be able to connect these as well.

So where you first needed 8 chatbots to each connect to their own channel you can now do the same with just 1 chatbot!

Unlike separate channels like Facebook, WhatsApp, Telegram and so on, you have 1 omnichannel per workspace. This might be subject to change in the future but keep this in mind for now when connecting your channels.

#### How to create a chatbot in omnichannel <a href="#how-to-create-a-chatbot-in-omnichannel" id="how-to-create-a-chatbot-in-omnichannel"></a>

From the left-hand menu press **omnichannel**. You will then have two options to create your omnichannel chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FO2kfBGZPQ2FJJNfpGHC4%2FCapture.PNG?alt=media&amp;token=ebbc2e32-38dd-4349-a150-6da5f4b0b540" alt=""><figcaption></figcaption></figure>

1- You can create a completely new chatbot. If you are starting with an empty workspace where you don’t have any chatbots yet, this will be the most likely option you will choose.

2- If you already created a chatbot into a channel and want to use this same chatbot inside of your omnichannel, then you can choose the option “Convert Existing Chatbot”. This will also have the big advantage of importing the bot users you already have into the omnichannel chatbot.

Once you have chosen any of your preferred option you will continue to the next step.

If you selected the **“create new bot”** then you will be taken to the template store where you can select any of the available templates, or select the option **“Blank Template”**. This option lets you start from scratch and you can build the chatbot to your own liking.

Once you made your choice you will be taken to the window where you are able to name your chatbot, along with adding a description.

Once you are done press the green button named **“create bot”** and you will be able to connect the channels.

#### How to connect channels to omnichannel <a href="#how-to-connect-channels-to-omnichannel" id="how-to-connect-channels-to-omnichannel"></a>

Once your omnichannel chatbot has been created, head back to the main dashboard to connect the channels you like the omnichannel to manage with this chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FV8cZyWHi5er0do80i1H1%2Ftempsnip.png?alt=media&amp;token=07adb5b5-3623-4a47-9120-f6af2fde7a73" alt=""><figcaption></figcaption></figure>

If you did not connect any channel yet to your workspace then it will take you to that specific channel to do so. Once you have added them you will be able to link them to this omnichannel chatbot.

You can unlink them at any time by pressing the button on the right-hand side.

#### How to create an omnichannel flow <a href="#how-to-create-an-omnichannel-flow" id="how-to-create-an-omnichannel-flow"></a>

Now that you have created the chatbot and connected your channels you are ready to create your chatbot.

Now every single feature inside the flow builder will be available to you but do note that certain channels may not be able to use them.

#### Use conditions to determine where the user is coming from <a href="#use-conditions-to-determine-where-the-user-is-coming-from" id="use-conditions-to-determine-where-the-user-is-coming-from"></a>

We have a condition you can use to determine which channel a user is coming from.

Just go to creating a condition, then select the **“channel”** option.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FamY5EWsW7HxekBAc0DSD%2Fomni-channel-06.d52c27d8.png?alt=media&amp;token=ecffb519-05f9-4bff-a610-f28c0049d56c" alt=""><figcaption></figcaption></figure>

Once selected you will be able to choose from the available channels in omnichannel.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfntkIsaBD7Dacm3CL9gZ%2Fdownload%20(33).png?alt=media&amp;token=44153ca7-fc87-4ac7-8f7d-bdf9061d3a60" alt=""><figcaption></figcaption></figure>

Once you set up this condition you can direct the user to specific channel features.

For example cards might be available to Messenger but not to Telegram. It does not show the same way.

So using this condition you can send a customized response for Telegram users.

#### How to determine which channels support which features? <a href="#how-to-determine-which-channels-support-which-features" id="how-to-determine-which-channels-support-which-features"></a>

Every block when hovering over it will show the available channels by displaying the icons of those channels at the top.

You can also reference the same icons when inserting a node into the flow builder

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FszI12SmRrP872YWb6Y0A%2Fomni-channel-08.28b72eb0.png?alt=media&amp;token=aaad97a9-2001-42b3-b5c6-87f1d4bf924c" alt=""><figcaption></figcaption></figure></div>

### Facebook Bot <a href="#facebook-bot" id="facebook-bot"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbfetswvFhpWMXDTBJwDh%2Ffb_connect.13bd8a24.png?alt=media&amp;token=fc35966c-c457-41fa-aabc-51a7d18c06c4" alt=""><figcaption></figcaption></figure>

Follow steps 1, 2 and 3 in the above screenshot and jump to facebook.com, **select all the pages in your page list, that you want Flochat to help with the automation**.

{% hint style="info" %}
If you connect your Facebook Account with more than one workspace, remember to select all pages that require management on Flochat regardless of workspace.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3EPioRkQV5rUVRhgUJFE%2Ftempsnip.png?alt=media&amp;token=85801db6-c478-413a-a713-f029b3edb8f3" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
The red x is for disconnecting the flow with your page only. Your flow won't be removed. It will still stay in your workspace remain intact (in "All Bots")
{% endhint %}

After connection, these are some of the operations in the screenshot above:

1. Click "Reconnect" when you want to add/remove a page or refresh.
2. Click "Create Flow" to create a new flow for the bot.
3. Click the red x to remove the connection between the bot and your page.
4. Flip the status to stop/start the automation.
5. Click the link to talk to the bot. You can also share the link with other Facebook users.

#### Talk to Facebook Bot

3 ways:

1. Click on URL in step 6 in the above screenshot.
2. Use the preview button in your flow.
3. Search your page name on Facebook to visit your page and click **Send Message** or **Message**.

### Instagram Bot <a href="#instagram-bot" id="instagram-bot"></a>

Firstly, you need an Instagram business account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjSFTkVv2AOPVPXeOxJkp%2Fspaces_RaLazqQDW4JMiGe2iyKg_uploads_iftVR84Kb8SEGT749u1n_tempsnip.png?alt=media&amp;token=527166d5-f1ee-4c14-af54-1e8ab509a62e" alt=""><figcaption></figcaption></figure>

Navigate to the Instagram tab located under the bots tab. Then press the link button located to the right of the dashboard.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZ2auj5DLHv00hkNF8JJi%2Fspaces_RaLazqQDW4JMiGe2iyKg_uploads_sKC9g5OBgmq5knag0EsL_Capture.webp?alt=media&amp;token=337b97f2-af04-45b5-9c62-0ca6d66113a7" alt=""><figcaption></figcaption></figure>

Once it is connected, you can either go ahead a create an Instagram chatbot from the same dashboard, or if using omnichannel as your workspace. Link it there as shown below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fvqzizv1fELIn3y5cqZMt%2Ftempsnip%20(1).png?alt=media&amp;token=5b817a4a-f34b-421b-ad8d-11abf79c6c24" alt=""><figcaption></figcaption></figure>

### Telegram Bot <a href="#telegram-bot" id="telegram-bot"></a>

{% hint style="info" %}
**In Progress**

We are working on building more functions for Telegram bots. The documentation will be updated as soon as we have done that. Should you have any query, please feel free to contact us.
{% endhint %}

### Slack Bot <a href="#slack-bot" id="slack-bot"></a>

{% content-ref url="/pages/2PbaqRom4BmOyp2835V0" %}
[Slack](/platform/introduction/integrations/slack)
{% endcontent-ref %}

{% hint style="info" %}
**In Progress**

We are working on building more functions for Slack bots. The documentation will be updated as soon as we have done that. Should you have any query, please feel free to contact us.

In the mean time check out the Slack info docs [here](/platform/introduction/integrations/slack)
{% endhint %}

### WeChat Bot <a href="#wechat-bot" id="wechat-bot"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUTKtfrE8TzwRd6o3pZe8%2Fwechat1.ae86cdc3.png?alt=media&amp;token=b3ce68b7-06cf-4959-a055-2205d403da11" alt=""><figcaption></figcaption></figure>

Follow steps 1, 2 and 3 in the above screenshot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9PJZOQcFtLB0j2YV64Y3%2Fwechat2.55bb42e3.png?alt=media&amp;token=32456462-a6cf-49c3-93bc-a8246d7816cf" alt=""><figcaption></figcaption></figure>

* If you already have a WeChat official account or wanted to register one, click "Sign up"
* If you don't have an official account yet, click "Sandbox Test account" to test the bot with your WeChat personal account

{% hint style="info" %}
You can choose English on the WeChat website by clicking the globe icon on the upper right side. However, some pages do not support translation.
{% endhint %}

Login yourself with your WeChat account. On the top, you can see your "appID" and "appsecret" as below:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrOcp9QKZqXbfK8AGJ9pd%2Fwechat3.0fbb83bd.png?alt=media&amp;token=19014e29-6f6f-477f-9997-6f8c37ec99eb" alt=""><figcaption></figcaption></figure></div>

Copy them back to the chatbot. Follow the steps below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fh68KS2eozOZDOT2HopZG%2Fwechat4.26395be7.png?alt=media&amp;token=4ebe8c88-0dbd-48d2-bb01-2d72d1a657af" alt=""><figcaption></figcaption></figure>

1. choose a type
2. paste your App ID and secret
3. name a token yourself
4. click "Save"
5. a webhook URL will show, copy it to the WeChat's website

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F85JqNj5MLW2gBn04w9lt%2Fwechat5.e439aa57.png?alt=media&amp;token=e606bb47-0e1c-4b9e-a37a-77eb05bf3cc7" alt=""><figcaption></figcaption></figure>

Paste the webhook URL (in step 5) and the token (in step 3) here then click the green "Submit" button. Finally, scroll down a bit, you can see your testing QR code:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Flp287X5AEzRFY7Wt6CnE%2Fwechat6.0731c54a.png?alt=media&amp;token=f3a95b5b-3e65-4ab5-bdb4-eab523a8579d" alt=""><figcaption></figcaption></figure>

#### [#](broken://pages/UYZt0nJ7CaFRZjFGMUfP) Talk to WeChat Bot <a href="#talk-to-wechat-bot" id="talk-to-wechat-bot"></a>

Now you can share your QR code with any WeChat user. By scanning and following your official/testing account, they are able to talk to your bot. Besides, their nickname and WeChatID will be listed here (100 users maximum).

### WhatsApp, SMS & Voice Bot <a href="#whatsapp-sms-voice-bot" id="whatsapp-sms-voice-bot"></a>

#### Pick Providers <a href="#pick-providers" id="pick-providers"></a>

As follow are the providers we currently work with. Different providers support different bots. Choose your provider according to your needs. Create an account with them and pick your number.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXhERRjhBMLx4qy2FPzc6%2Fproviders_config.77776646.png?alt=media&amp;token=3e08812c-9085-4e35-9861-630955bd2832" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXn6UclLe13Xv8YZAYMFh%2Fprovider2.ae8c65ef.png?alt=media&amp;token=ef7185e2-27f4-4b24-adb0-d20bea219b7c" alt=""><figcaption></figcaption></figure>

You can either access them in the according channel (see screenshot above) or on the "Integration" page (see screenshot below).

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FREeIEwwcUNveCpSFNwTY%2Fprovider.c5c40b96.png?alt=media&amp;token=9b70cca3-9907-4ae3-83c6-ea835440740b" alt=""><figcaption></figcaption></figure>

Follow the steps in the above screenshots to connect to the provider and add numbers.

#### Sign Up & Get Numbers <a href="#sign-up-get-numbers" id="sign-up-get-numbers"></a>

Take Twilio as an example. On their website, sign up, login in, then you will get to your dashboard:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FeG8iCUPO2kzhka3Ge8Q4%2Ftwilio.4f0f2af5.png?alt=media&amp;token=cec206ee-e1e0-4045-aff9-cd9878a6d8b3" alt=""><figcaption></figcaption></figure>

Click "Get a Trail Number".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsJEe9oLPzMHqxlLkuCWp%2Ftwilio_number.451644d9.png?alt=media&amp;token=fa5a7008-af47-441b-8dc9-0f37b936c9a6" alt=""><figcaption></figcaption></figure>

In the pop-up window, the number is shown on the upper left side, click "Choose this Number" or "Search for a different number". Then you have your own number!

#### Connect to Provider <a href="#connect-to-provider" id="connect-to-provider"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FyVwYF72CqroKCoRsHFMQ%2Ftwilio_id.8c5b0890.png?alt=media&amp;token=abe19ea3-c9f0-425f-a66a-e23c04a13372" alt=""><figcaption></figcaption></figure>

In your provider dashboard, click the little button on the right side to copy your "ACCOUNT SID" and "AUTH TOKEN" value back to the chatbot:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNL8V8N7KFmWJAqheHTPg%2Ftwilio_id_uchat.5c6f0b0c.png?alt=media&amp;token=3dcc08ed-e3ae-45c8-8376-bbc91155e055" alt=""><figcaption></figcaption></figure>

1. put your copied values in corresponding fields.
2. click "Save".
3. click "Add Phone Number" if you are building an SMS or Voice bot, otherwise, "Add WhatsApp Number".

* More information click -> [Twilio Docs (opens new window)](https://www.twilio.com/docs)
* More information click -> [360Dialog Docs (opens new window)](https://docs.360dialog.com/)
* More information click -> [SignalWire Docs (opens new window)](https://docs.signalwire.com/topics/relay/#relay-documentation-access-keys-tokens)
* More information click -> [Message Media Docs (opens new window)](https://developers.messagemedia.com/)

#### Add Numbers <a href="#add-numbers" id="add-numbers"></a>

Click "Add Number" in area 3 in the above picture after connecting your provider with your chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fqm8DQ8sRDlsAG4CqOVPv%2Fdownload%20(40).png?alt=media&amp;token=04af7530-32e4-412e-a1e6-766ac1ac124b" alt=""><figcaption></figcaption></figure>

Click "Find Number", the system will search all the numbers that are under your provider account. Click "Add" to add one of the numbers.

Thereafter, you are able to see all your connected numbers under the "Phone Numbers" page in "Integration".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fv6s4lTT9hIvhgVPGHOd5%2Fphone_number.57307436.png?alt=media&amp;token=1a62db72-1c87-46d1-a79a-2be3331eb657" alt=""><figcaption></figcaption></figure>

Add new numbers from the drop-down list as below: ("Buy Number" is disabled at the moment)

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8NIZTOvLxOSqSQUlNGww%2Fadd_number.461ef7f1.png?alt=media&amp;token=19281f1c-a161-48ec-8a89-1e800fd23072" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you would like to disconnect the WhatsApp / Voice / SMS flow with your number, or create a new flow for that number, copy the number and click "Release Number". Then your flow will be disconnected but stay safe in your "All Bots". Add the number again to create a new flow with it.
{% endhint %}

After adding phone numbers:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fzeh1hDa7fUnhUcOMoncV%2Fphone.8a3d1984.png?alt=media&amp;token=9d7a633a-0b16-468d-925d-17de5df412df" alt=""><figcaption></figcaption></figure>

1. use the plus button to create new a flow.
2. button 2 is for "Open Flow" of this phone number.

#### Talk to WhatsApp/SMS/Voice Bot <a href="#talk-to-whatsapp-sms-voice-bot" id="talk-to-whatsapp-sms-voice-bot"></a>

* WhatsApp - add the phone number as a new contact and send messages to it
* Voice - call the phone number
* SMS - send SMS messages to the phone number

### WhatsApp + 360Dialog <a href="#whatsapp-360dialog-sandbox" id="whatsapp-360dialog-sandbox"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F79HjPqkh7X7aoonFtqfr%2Fprovider2.ae8c65ef%20(1).png?alt=media&amp;token=d7f150b4-7329-499b-a8ff-612a1fb679c6" alt=""><figcaption></figcaption></figure>

{% content-ref url="/pages/wQC5Je0kcY9JDzSMUJ7x" %}
[WhatsApp + 360Dialog](/platform/whatsapp-+-360dialog)
{% endcontent-ref %}

### Google My Business <a href="#google-my-business" id="google-my-business"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdLeNNAoqs3UgTHSG3KyB%2Fgoogle.c2983b7b.png?alt=media&amp;token=48fb1397-b73c-4244-b91f-2ebf4689de1a" alt=""><figcaption></figcaption></figure>

The whole process will be:

1. connect Google account
2. create agent, build flow & test
3. verify agent
4. launch chatbot
5. go live

#### Connect Google Account <a href="#connect-google-account" id="connect-google-account"></a>

Follow steps 1, 2 and 3 to connect to your Google account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzncuR6cFnN08rL7CkgbQ%2Fgmb1.c97f6b42.png?alt=media&amp;token=c7b0339c-e093-4b27-bd62-44660bf1af5d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that this Google account must have access to the business (either owner or manager). For agency, you will need to be invited to be the manager of your client's business.
{% endhint %}

After the connection, in the above screenshot:

1. click "Sync Locations" to pull all the businesses that associate with this Google account, whether they are verified or not.
2. create agent then create flow
3. scan the QR code or visit the URL link to test the bot in Google Map

#### Create Agent <a href="#create-agent" id="create-agent"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FknQnuWKekQx1ubZ6ZJVs%2Ftempsnip%20(2).png?alt=media&amp;token=286190c4-6c8b-4748-b2d3-5aa148524883" alt=""><figcaption></figcaption></figure>

Click "Create Agent", fill in the profile information including:

1. phone number
2. website address (same as your business website address)
3. privacy policy URL
4. timezone
5. logo
6. entry points (local, non-local, both local and non-local)
7. welcome message
8. offline message

{% hint style="info" %}
If you get an error saying that fails to create an agent because the location is not verified, try to click cancel and refresh the page. The "Create Flow" button will show.
{% endhint %}

#### Local or Non-Local <a href="#local-or-non-local" id="local-or-non-local"></a>

| Type      | Agent Verification Process | Entry Points                                                            |
| --------- | -------------------------- | ----------------------------------------------------------------------- |
| Local     | Automatically              | Google search & Google map                                              |
| Non-Local | Manual Process             | Google search, Google map, site links, answer card, website buttons etc |

#### Build Flow & Test the Bot <a href="#build-flow-test-the-bot" id="build-flow-test-the-bot"></a>

When your agent is created, click "Create Flow" to start building your bot. Check "[Flow Builder](/flow-builder/flow-builder-overview)" documentation for how-tos.

#### Verify Agent <a href="#verify-agent" id="verify-agent"></a>

{% hint style="info" %}
**IMPORTANT**

Build and test everything before you request an agent verification. Because once verified, it's very difficult to change the agent information. You will need to contact Google yourself.
{% endhint %}

Before you send the request, check this:

* [x] Did I choose what suit my business best, local or non-local?
* [x] Am I happy with all agent information like logo, contact phone, etc?
* [x] Do I have a contact email that shares the same domain as my website?

Click the button next to the "Open Flow" button, then click "Verify Agent".

Provide a business website, contact person name and a contact email that share the same domain as the brand website.

For a local business, if your business is already a verified business, your agent can be verified automatically and immediately. You will see the green "Verified" label. Thereafter, you can launch your chatbot.

While for a non-local business, after submitting the request, you will receive 2 emails from Google. One email asks you to reply for approving us to help with the bot automation in a specified format (security key needed). Another email will give you the security key. **It will take you a few days (up to 7 days) to get your agent verified**.

#### Launch Agent <a href="#launch-agent" id="launch-agent"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlltR1BEq7evsUW1EgRns%2Fgmb6.607470c8.png?alt=media&amp;token=0a56607b-bfd9-485e-bf03-f6dd206236b5" alt=""><figcaption></figcaption></figure></div>

When your agent gets verified, click "Launch Agent" and a chat button will show with your business after 4-6 hours. You will see the green "Launched" label.

#### Unlaunch Agent <a href="#unlaunch-agent" id="unlaunch-agent"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMDSOZx2Q3GXvGxzqOmLn%2Fgmb7.c90804ca.png?alt=media&amp;token=04afbf94-9fcb-49a4-b85c-0043472a4423" alt=""><figcaption></figcaption></figure></div>

If you wanted to stop the bot automation, click the green "Active" button under status. And to stop showing the bot with your business, you need to unlaunch your agent.

Click "Unlaunch Agent" and again, you will need to wait for 4-6 hours to see the "Chat" button disappear. By then the labels will look like this:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fsn8Z1cO2nOkrvMhxns9G%2Fgmb8.f4b2961e.png?alt=media&amp;token=c6b158fe-b75a-4bfc-b328-77d2bc7a4891" alt=""><figcaption></figcaption></figure>

To launch it again, just click on "Launch Agent" again.

#### Talk to Google Bot <a href="#talk-to-google-bot" id="talk-to-google-bot"></a>

Before you launch your bot, goto \**Google* section on your chatbot dashboard. Visit the **Test Url** or scan the QR code to talk to the bot.

After your bot launched, Google your business name in a webpage. Click on the **CHAT** button to start the conversation:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9jf92eU0RhcrmkCGZsgY%2Fgmb9.0d36a9eb.png?alt=media&amp;token=29d1c3f1-5208-42ed-975a-eb1ee5b97273" alt=""><figcaption></figcaption></figure>

Or search your business name in Google Map. Click on the **Message** button to start the conversation:


# Website Chat

How to add a live chat widget to any website

With the webchat widget, you will be able to add a chatbot to any website without the dependency of any other channel. This will help you unlock the power of conversational marketing without the downsides or restrictions other channels might have.

### Where to find it

To discover the webchat widget you will need to open your [**Omnichannel**](/platform/connect-to-channels#omni-bot) bot and select the Webchat widget tab

{% hint style="success" %}
Please note webchat is only available under Omni-Channel.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F37EmjY0QXMDKC5rRUCBq%2Ftempsnip.png?alt=media&amp;token=74bc79b6-110d-49e7-9b9b-31e7a765401a" alt=""><figcaption></figcaption></figure>

Great, now that you have selected the webchat widget you will now see your main editing pages as shown below. This is where you can configure your branding and so much more.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbfQsvIwApz0De4uyzwxT%2FCapture.PNG?alt=media&amp;token=bc71bdbb-45c5-44db-ba48-2dc884a1cda6" alt=""><figcaption></figcaption></figure>

### Content

The first section of the widget will be the content tab. Here you will find the following options;

* [Chat Bubble](#chat-bubble)
* [Chat Header](#chat-header)
* [Conversation button](#conversation-button)
* [Welcome message](#undefined)
* [Out of office message](#out-of-office-message)
* [Pre Chat form](#pre-chat-form)
* [Default start flow](#default-start-flow)

### **Chat Bubble**

With the chat bubble, you are able to select your preferred bubble icon. You will see that reflecting directly on the preview in the bottom right corner

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRhUDEKmLsOQfoYrMmHxd%2Ftempsnip.png?alt=media&amp;token=a9f41835-6277-4a7e-8de4-8fa38f601a49" alt=""><figcaption></figcaption></figure>

Let's go ahead and add our own branded logo, this example we're using the Monday.com logo. You will also see the changes to the icon in the lower right side of the screen too.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRA6t9t8tSVK7nfjkmsZN%2FCapture.PNG?alt=media&amp;token=04d5369d-7208-4e07-bc9f-669c76230206" alt=""><figcaption></figcaption></figure>

Adding text with your icon

{% hint style="success" %}
If adding text to your chat bubble, be sure to make it intriguing. Not just a boring quote like chat with me. Make your website visitor take action.
{% endhint %}

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVUuK84sHbAFvezPjtVxP%2FCapture.PNG?alt=media&amp;token=d938c2e3-79d5-4219-8413-e0d7f5f337c7" alt=""><figcaption></figcaption></figure></div>

And this is what the result will look like.

{% hint style="info" %}
Note: If you cannot see the text in the display, don't panic... You can set up the font colour shortly under the [**appearance**](#appearance) tab
{% endhint %}

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F58xg5IyXiVPCK0GahDfr%2FCapture1.PNG?alt=media&amp;token=cb13cc55-c417-4194-87cd-66d99db91607" alt=""><figcaption></figcaption></figure></div>

### Chat Header

Add your logo or a personalised image with a greeting message.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6wGQcJUk3J7EhTWmLleS%2FCapture%20(1).PNG?alt=media&amp;token=1021d460-0033-4e05-b845-836b638d9e85" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
By default it already has our chatbot app logo and a basic greeting text message. Let's go ahead and make it look better
{% endhint %}

There are multiple media types you can use for your chat header image. So if you don't want to use a logo, maybe try an animated GIF 🕺

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FM7O3Mxu6rnZ1aRoiQKMi%2FCapture.PNG?alt=media&amp;token=5832c275-ce38-4298-bc0f-e5e5f1ba8338" alt=""><figcaption></figcaption></figure>

Great we have added an image to our header. Below the image tab you will see another tab called Header name. You can name this anything you want. Maybe a business name or even a catchy slogan.&#x20;

{% hint style="info" %}
Later on in the section we will show you how to add more greeting text. **Note:** If using **welcome** text it will replace the header name. "Just in case you see it disappear" &#x20;
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0bsEBVJM1BDcuRUeJ18d%2FCapture1%20(1).PNG?alt=media&amp;token=0239257a-1c28-4e2d-8e2c-79fb285e5a03" alt=""><figcaption></figcaption></figure>

### Conversation Button

With the conversation button, you can create your own call to action (CTA’s) buttons to allow users to start, continue or start a new conversation. Any edits will be updated automatically. If left blank, the defaults text will be used.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FR6S9qOQ1xr1I0zbJdQ2O%2Ftempsnip%20(3).png?alt=media&amp;token=4cbde0a3-75e1-454b-9b54-db9dd7a6c72a" alt=""><figcaption></figcaption></figure>

### Welcome Message

You can add a welcome headline and tagline to get people to press on your webchat widget. Remember we mentioned if you use the welcome message it [removes the chat header title](#chat-header).

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJLnyBhh9SMDBNQG2aNrA%2FCapture%20(2).PNG?alt=media&amp;token=221a2430-cde0-487b-86de-0abdbf5b339b" alt=""><figcaption></figcaption></figure></div>

### Out Of Office Message

With the out of office message you will be able to add a notification to your widget and set the reply message too

{% hint style="info" %}
The out of office message will display when you are offline
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMq9ChWsfoiJDjjrtaA2W%2FCapture%20(3).PNG?alt=media&amp;token=0852c746-77b1-4e39-9f61-018030758352" alt=""><figcaption></figcaption></figure>

### Pre Chat Form

With this setting, you can capture essential data before the chat even starts and save this to any [system](/flow-builder/field-variable) or custom user field available.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKhccZ9Fm0MpboQceJSRh%2FCapture.PNG?alt=media&amp;token=fc25a621-63fb-4651-b717-56ad1ff3eb29" alt=""><figcaption></figcaption></figure></div>

Let's take a look at all the pre chat form settings below

First of all you will have the form Header where you can state the purpose of this form. After you will be able to insert a field form by pressing the button **+ Add Field**.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvCE4oBuKmr5uPqtkXFi1%2FCapture.PNG?alt=media&amp;token=fe9f3fb7-e87b-4186-951b-809d444f4a16" alt=""><figcaption></figcaption></figure></div>

You will then be able to select any of the following field types:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEJF7qAFUqEgyBzmPaMh2%2FCapture.PNG?alt=media&amp;token=ddba88c0-83ff-4023-82ad-8a8da9ed4956" alt=""><figcaption></figcaption></figure></div>

Once you are editing any of the fields you will have several options to choose from. Let’s take an email type field as an example

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3bmiY2pWRKCYWC0Sn8jI%2Fb9e7d9bf-041e-461e-bfad-ac656feb67c1.png?alt=media&amp;token=b8ae0864-74cb-4362-8489-9a43f91b13ec" alt=""><figcaption></figcaption></figure></div>

First of all, you can select the [**system**](/flow-builder/field-variable#system-field) or [**custom user**](/flow-builder/field-variable#create-custom-field) field you want to save the value given by the user to. Then you will be able to set the name of the form field label. Inside the placeholder, you will be able to give an example of the format you would like to receive the email in. The hint section will allow you to give additional information about this field type.

&#x20;

The last two options will allow you to determine if the field is required and what width you want the field to be. As a result, it will then look like this

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgsYaIBP3dNzRpDStP9BT%2FCapture.PNG?alt=media&amp;token=78ff8398-1e5e-4edb-8432-cf69e9e1297c" alt=""><figcaption></figcaption></figure></div>

Once you have fully edited the field to your liking you can press the button **done** at the top of this field to save the changes.&#x20;

Lastly below the fields you will have an additional option to allow the user to write a message prior to entering the chatbot

<div align="right"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgNbUIEv754oNddhG9Ctl%2FCapture%20(4).PNG?alt=media&amp;token=0886ee33-412b-4a9c-926a-b3e8f6d95a99" alt=""><figcaption></figcaption></figure></div>

And finally, this is how the pre-chat form will display 😊

### **Default Start Flow**

If the [pre-chat form](#pre-chat-form) is **not** enabled then you will be able to set a default starting [**flow**](/flow-builder/flow-builder-overview) of your own choosing

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJCq6QMwEuxkLwjBlfcIx%2FCapture.PNG?alt=media&amp;token=483b9f09-d3db-4868-a670-fc5e9bf56da5" alt=""><figcaption></figcaption></figure></div>

Once pressed you will be able to select any of the flows you have created beforehand

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKJr5I0fAtNnwT2cqO076%2FCapture.PNG?alt=media&amp;token=ca1f38d2-cc5c-4422-8cdd-bde5d4eb8f25" alt=""><figcaption></figcaption></figure></div>

### Settings Tab

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRasFrCbsbwAJwlPwPHX3%2FCapture.PNG?alt=media&amp;token=fe0e7460-eb93-4f73-b055-7dea11ff90fd" alt=""><figcaption></figcaption></figure></div>

Inside the settings tab you will have the following options to customise:

* [Language](#undefined)
* [Notification Sound](#notification-sound)
* [Features](#features)
* [Whitelist Domain](#whitelist-domain)

Let's dive a little deeper in the settings tab

### Language

With the language setting you can change the display language of a few sections inside the widget. Just select the language on the left-hand side and you will see the changes reflected in the preview on the right instantly. Below we changed the language to display French. As you can see some of the text components have automatically updated.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNqCmaKDIkOcDBNuoLINY%2Ftempsnip%20(4).png?alt=media&amp;token=96445547-8095-4449-991f-b4c1b19652f6" alt=""><figcaption></figcaption></figure>

### **Notification sound**

With this option, you will be able to set up your sound for new message notifications your users will hear when in conversation with your webchat widget. You can also mute if required.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJDGgBb0umwK67JOlzDO7%2FCapture.PNG?alt=media&amp;token=ffb890f8-73ae-4511-b43b-8888f756e8db" alt=""><figcaption></figcaption></figure></div>

### **Features**

You will have access to the following options;

* **Allow Emoji Picker** -› let users pick from pre-set emojis
* **Allow Upload Attachments** -› let users upload documents, images and or videos
* **Allow users to end chat** -› this option will allow the user to close the chat conversation.
* **Allow popup Chat Window** -› this allows users to change the chat widget into a pop up which results in a bigger display of the chat
* **Allow to Continue Chat in Mobile** -› Users can scan a qr code to continue the conversation on their phone. Smooth experience if they start on a computer and want to continue the conversation with your business while being in the road

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FB6RCGfSJyDnmyjnHcio6%2FCapture.PNG?alt=media&amp;token=d3c80fb1-ea25-4f2b-935f-aedb59d31203" alt=""><figcaption></figcaption></figure></div>

### **Whitelist domain**

{% hint style="success" %}
In order to display the widget on your website, you will need to whitelist your domain. You only have to add your root domain and all subdomains that you may have will automatically be recognised.
{% endhint %}

### Channels

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjYNSZd2NwsHWY4earZ7p%2Fchannels.PNG?alt=media&amp;token=8261948e-8819-4292-9676-035d8a7d20e9" alt=""><figcaption></figcaption></figure>

Channels enables you to take your website visitors to chat on their favourite messenger channel.&#x20;

Select your channels, add the styling components and you are done.&#x20;

{% hint style="success" %}
Make sure you have already added your channels to your existing chatbot
{% endhint %}

### Appearance <a href="#appearance" id="appearance"></a>

With these options, you are able to customise your webchat to match your brand colours and preferences

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FS1IKmSVm9axnENcbACtc%2FCapture.PNG?alt=media&amp;token=0d4d64a4-03cc-4f7d-ba54-d1b7c5055e42" alt=""><figcaption></figcaption></figure></div>

You have the following options to choose from;

* [Theme ](#theme)
* [Font](#undefined)&#x20;
* [Colours](#colours)
* [Start Chat Button](#undefined)
* [Quick Reply Button](#undefined)

### Theme

With themes you are able to customise the visual appearance of your webchat widget with pre-set values

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJtXB4sKPTAjnxLofRd3M%2FCapture.PNG?alt=media&amp;token=3abc5106-bf7d-4288-a529-4f017a12cc0f" alt=""><figcaption></figcaption></figure>

The great thing about these themes is that they give a look and feel that users are already familiar with like when using Messenger of WhatsApp. These themes will create a similar chat experience directly with your visitors.

### Font

With fonts you can totally change the appearance of the webchat widget by matching it to your own brand, or to create a really unique experience.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoT4cDaF9DkEO6KeO4kxc%2FCapture.PNG?alt=media&amp;token=24187f12-f5c3-4bd5-99a0-37a62833ab2d" alt=""><figcaption></figcaption></figure>

### Colours

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0gi4SdL3e2LE6l1IuWxC%2FCapture.PNG?alt=media&amp;token=604dc497-885a-472a-93cd-8a09081912b6" alt=""><figcaption></figcaption></figure>

Keep your chat widget on brand with multiple colour styling options to choose from.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FAQcShxCN9wt8DIFBelL3%2Ftempsnip%20(5).png?alt=media&amp;token=0571cb47-0f4f-4909-8963-d7b50ea59683" alt=""><figcaption></figcaption></figure>

### Start Chat Button

With this option you can change the border radius of the button “start conversation” or choose the option custom to add your own radius instead. It will help you keep things in sync with your own website buttons.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fd8gCFbC8S2f7A300KZu2%2FCapture.PNG?alt=media&amp;token=0d9df1c3-e02a-4e16-a476-3cf79bc89048" alt=""><figcaption></figcaption></figure>

### Quick Reply Button

A great way to really show your brand off or even being a little quirky with your design. Is to style your quick reply buttons. If you are not sure what quick reply buttons are click [**here**](https://docs.sendly.co.uk/flow-builder/steps/steps#facebook-send-message)

Quick reply buttons are designed to help your visitor navigate to what they want FAST!&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9Ia2QlHVpag9HITGx6Z4%2F1212.png?alt=media&amp;token=de154693-56a3-4a74-92e8-7fb687adfe90" alt=""><figcaption></figcaption></figure>

### Display Style

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrwR9eljqD5Hd7CWrdv3S%2FCapture.PNG?alt=media&amp;token=0528cd0a-f75f-4bdb-a804-b6576a557248" alt=""><figcaption></figcaption></figure>

The display style option will give you multiple ways of using the webchat on your website. Let’s take a look at the different options

#### **Style**

You have 4 different styles to choose from as to how you would like to use the webchat channel on your website.&#x20;

* Floating Modal -› which will give you the live chat icon on the bottom on your page
* Full Page -› allowing you to embed the chat widget as a full page instead
* Embed Chat Window -› allows you to display the chat window anywhere on your page
* Popup Modal -› Allows you to pop up a window with the conversation with your chatbot. Anything on your page can be the trigger as long as you apply a class to it.&#x20;

The best part of it is that, for the same website, you can actually install different style of web chat on different pages.

{% tabs %}
{% tab title="Floating Modal" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNHfpdR20ucVBLFfHs9dh%2FCapture.PNG?alt=media&amp;token=b9beda2f-e8ac-4df0-93a8-9cb2ca5c2274" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Full Page" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBuEQ7rqtyEuDTgXdJEXb%2Ffull%20page.png?alt=media&amp;token=3bf8f6df-daf7-4a85-b746-0039867625af" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Embed Chat Window" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FO2QmL31P1p5nUlnCwITV%2Fembed%20window.PNG?alt=media&amp;token=0098eac0-a6ba-4b89-8758-0e152b9c580f" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Popup Modal" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FekgsKuECjzdr58frFoUr%2Fpop%20up%20modal.png?alt=media&amp;token=38151db6-5fe2-4e2a-a640-7ff643a831fe" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Design

With the design tab, you will be able to set the conversation widget settings of the style of widget that you selected. Below is an example of a floating Modal moved to the left side.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDYjBL8BGVYCje6IhOSSw%2FCapture.PNG?alt=media&amp;token=1baeecef-d0d4-4662-9c92-2c29eb679c5d" alt=""><figcaption></figcaption></figure>

### Install Code

The install code will generate your script of the desired style of chat widget you want to put live on your page it will look something like this 👇

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FyspGu4k1YaOXdniKsqCd%2FCapture.PNG?alt=media&amp;token=46f3e266-06e6-4c69-b646-c8bcb2219be6" alt=""><figcaption></figcaption></figure>

### Advanced Chat Functions

Trigger dedicated chatbot flows depending on what website page, landing page or even funnel steps that your web visitors are viewing.&#x20;

#### Simplified

{% embed url="<https://youtu.be/nP-Sh2ypQzg>" %}

#### Advanced

{% embed url="<https://youtu.be/dwYpHDB3D2w>" %}


# WhatsApp + 360Dialog

In this help document, we will show you step by step how to get your WhatsApp chatbot set up.

### Checklist <a href="#checklist" id="checklist"></a>

In order to build your first WhatsApp chatbot, you will need the below 3 things to get started

* [x] **Verified Facebook Business Manager**: You will need to have a verified business manager account, if you don’t have it, you can still test the bot with the sandbox we offer. But the features will be limited.
* [x] **A new phone number** that hasn’t been used with WhatsApp: you can buy a new phone number or cancel your phone number for other BSP providers.
* [x] Connect the number to Flochat

That’s all you need to have to set up your first WhatsApp chatbot.

### Verified Facebook Business Manager <a href="#verified-facebook-business-manager" id="verified-facebook-business-manager"></a>

If your Facebook business manager is verified:

The green tick should be under your Business verification process.

### Sign up with 360Dialog <a href="#sign-up-with-360dialog" id="sign-up-with-360dialog"></a>

After you got a verified Facebook business manager account. [Dialog flow](https://www.360dialog.com/whatsapp-business-api) (open in new window)

The process will be simple 3 steps, first, you need to complete the application form as in the screenshot below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FyWvPOLGuewRUuwIdqXeJ%2Fwhatsapp_api_02.d5fb13f5.png?alt=media&amp;token=fb523c3a-9dc8-41e4-9463-7f3116297a35" alt=""><figcaption></figcaption></figure>

Make sure you provide your credit card details to sign up. After you submit your application form, it will redirect you to log in to your Facebook account and authorize your account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkmaEenft7kBwEoLnhI1T%2Fwhatsapp_api_03.d5f34639.png?alt=media&amp;token=052f5603-1d3c-469a-a6ce-d3f58877ca11" alt=""><figcaption></figcaption></figure>

Click continue to authorize your Facebook account to 360Dialog, and then you need to fill up the display name & select the business category, and description for this WhatsApp account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2ba5XWM2Rd0qvqUT9sUp%2Fwhatsapp_api_04.2025f7db.png?alt=media&amp;token=7555ec92-6140-41e3-915f-3184137f3113" alt=""><figcaption></figcaption></figure>

Please note WhatsApp have certain requirement about “display name”, you can find out more details [here (opens new window)](https://developers.facebook.com/docs/whatsapp/overview/display-name).

You need to verify your phone number by SMS or Voice, choose the way you want to verify your phone number, and after the verification, you will be redirected to the 360Dialog dashboard.

Please note this link to sign up is for a new number ONLY, the number needs to be never used with WhatsApp or WhatsApp business.

If the number has been used with another WhatsApp business service provider, you need to fully cancel from them.

### Connect 360Dialog <a href="#connect-360dialog-with-uchat" id="connect-360dialog-with-uchat"></a>

After you log in to your 360Dialog dashboard, you can click the “Generate API key” button, and then you will get your API key and address in the pop-up window like the screenshot below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZntRcZq9ZC3Vv5lRkWRX%2Fwhatsapp_api_05.35e82e35.png?alt=media&amp;token=9b43511b-ad3c-41a7-a139-1df0e2b48138" alt=""><figcaption></figcaption></figure>

In order to connect your 360Dialog account, you need to copy your phone number & API key, and then go to your dashboard, and go into the WhatsApp channel, click add new bots.

You need select 360Dialog as the provider, and then paste your API keys and phone number. It should connect.

Then you can start building your first WhatsApp chatbot.


# Email Templates

### Create Template <a href="#create-template" id="create-template"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQ2DwEhXDsXcQTlkOP8bO%2Ftempsnip.png?alt=media&amp;token=d3664a31-839d-4332-bae7-f838a9aecaa2" alt=""><figcaption></figcaption></figure>

Navigate to the my contents tab > email templates > New email template 'button'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlCV5uBNwCKu4iKULyRJ9%2Ftempsnip.png?alt=media&amp;token=6d9c7dda-b2af-4e20-9086-991d4c082b1b" alt=""><figcaption></figcaption></figure>

1. You can get started with a sample template
2. Use the tools on the right sidebar to edit your email
3. Preview your email on computer or phone
4. Define up to 10 variables for later filling

Remember to save your template after you finish.

### Use Template <a href="#use-template" id="use-template"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTkzMhAcYoNEJ6zSrFYQc%2Ftempsnip.png?alt=media&amp;token=85e786e6-a492-4315-8f03-0382c0939a26" alt=""><figcaption></figcaption></figure>

In your flow, right click to create a Send Email Step, edit it, click on "Change Template".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fpxx9Aa3xDDWfdktpKQlx%2Ftempsnip%20(6).png?alt=media&amp;token=52c134ad-5cd1-4c81-bbcc-e224d5f63e36" alt=""><figcaption></figcaption></figure>

Choose a template and map values for your pre-defined variables in the template.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrYJHNicfLNwXAQRarYyC%2FCapture.PNG?alt=media&amp;token=0dbb5061-7bd1-4b7b-8b97-c0d24658c739" alt=""><figcaption></figcaption></figure>


# WhatsApp Cloud

{% embed url="<https://developers.facebook.com/products/whatsapp/>" %}

## Create Your App 👇

{% embed url="<https://developers.facebook.com/apps/>" %}

The first steps to creating your WhatsApp Cloud Application is to head to the link above. Then select create app.&#x20;

Select Business App 'as shown below'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVA5lQJKVO8zzyQ1HVcsp%2FCapture.PNG?alt=media&amp;token=4aefdb50-db2a-4b21-a22d-aabe61251ae1" alt=""><figcaption></figcaption></figure>

The next step is to configure your information in the text bars provided 'see below' Once complete, select the Green create app button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXQEAauCLip1BsvsetFDv%2FCapture%20(5).PNG?alt=media&amp;token=44b69ab4-48cd-44ce-b0f4-5b0f8a64ecd8" alt=""><figcaption></figcaption></figure>

Great, you're almost there. Next scroll to the bottom of the page and select the WhatsApp box

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJKgSJbLAkelauPekuiVx%2FCapture.PNG?alt=media&amp;token=d4e277a4-4552-45cf-a492-15d188ead1f5" alt=""><figcaption></figcaption></figure>

Now you will see this screen, select continue.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fx3yP5qjR74ZG9LyfTeWD%2Ftempsnip.png?alt=media&amp;token=bae64f0c-991c-41fb-89e4-95940376e36b" alt=""><figcaption></figcaption></figure>

Next, navigate to your chatbot dashboard and select the WhatsApp Cloud tab and press the blue button to connect

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FesbEFmOXYrEJ1TLcudQw%2Ftempsnip.png?alt=media&amp;token=f43e0474-3477-4def-b5e7-c1cb07ddf69c" alt=""><figcaption></figcaption></figure>

Verify your Facebook account and continue

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWryMT9I3ckzbcu5n0AdN%2Fvarifiy.png?alt=media&amp;token=3ba6aeee-a13c-4bc7-a2a1-9d6d28a2eef9" alt=""><figcaption></figcaption></figure>

Now you will see your WhatsApp Test Account. Select and click next.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fg96MlDnKAJbKBxWuBSMq%2FCapture.PNG?alt=media&amp;token=ac1d13e3-9762-4455-9855-549002cd74a2" alt=""><figcaption></figcaption></figure>

Leave all selected items to YES and click done.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQ9JKAGO9jdCZBj8C7RzM%2FCapture%20(6).PNG?alt=media&amp;token=2742e621-049d-4013-a743-41d6ffda1ea9" alt=""><figcaption></figcaption></figure>

Now your WhatsApp and chatbot have been successfully connected and click OK

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6dxQTXUvTQF6aWTa38sC%2FCapture.PNG?alt=media&amp;token=e446bd43-d78b-44de-bbc9-aae35491ef3b" alt=""><figcaption></figcaption></figure></div>

Your chatbot dashboard will now display the image below 😊 click the button **'List businesses with WhatsApp phone numbers'** 👇

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRo966kyp17Ndc1pHsFWB%2FCapture.PNG?alt=media&amp;token=b06d933b-b1cd-4fe9-9a77-d6a0094da256" alt=""><figcaption></figcaption></figure>

Select the assets you want to use and click select.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fe1ZoOffecLYgXL6zdP0K%2Ftempsnip.png?alt=media&amp;token=965ce0b6-581d-40c9-80a9-1ab979b37060" alt=""><figcaption></figcaption></figure>

## Webhook

Now you will see the display below. Firstly, copy the webhook URL as highlighted below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcUoZRQFraNZyubg4M8SR%2Ftempsnip.png?alt=media&amp;token=8b0389c8-c944-4911-bbfe-15b99d6948c8" alt=""><figcaption></figcaption></figure>

Head back to your WhatsApp application

1. Select the Configuration tab
2. Click the Edit button
3. Paste in the webhook URL you just copied
4. Paste in the Verify Token Key

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0Cnhkp28oPc8DJRYrytJ%2FCapture.PNG?alt=media&amp;token=65cccf4e-b259-4a1d-92aa-741677457b25" alt=""><figcaption></figcaption></figure>

Select Verify and save. Now you will see a new button labelled Manage, select the button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FV0xt5bMHHXwLO2eAXhX1%2Ftempsnip.png?alt=media&amp;token=aecaf659-5fb6-45f6-b3bb-e7fea7a1929d" alt=""><figcaption></figcaption></figure>

Webhook configuration. Once you select the Manage button a new page will display. You need to select the **messages tab and subscribe**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtcbKiwuhUqrQQyUseicx%2Ftempsnip.png?alt=media&amp;token=541ad518-d794-4fe5-a4ac-862c3463e00a" alt=""><figcaption></figcaption></figure>

Great that's you all connected 🚀 Head back over to your chatbot dashboard and select 'Create Chatbot' to test out your new WhatsApp bot automation.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvPHWSzZF7DNRZeRyGpGE%2Fcreate%20bot%20button.png?alt=media&amp;token=29933bff-5264-44ad-bfac-0bc211284609" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6sESzTJynu0tKjpCiWlm%2FUntitled%20design%20(27).png?alt=media&amp;token=3795246d-c75d-4aa1-ac85-e3912b80e600" alt=""><figcaption></figcaption></figure>


# Flow builder overview

This section will give you an overall idea about how to use the chatbot flow builder. You can open a flow and try side by side when you learn it.

IMPORTANT

{% hint style="info" %}
💁 Please make sure you go through every detail on this page before you start building bots.
{% endhint %}

### Flow, Sub Flow and Step <a href="#flow-sub-flow-and-step" id="flow-sub-flow-and-step"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPiUSfo9A6RyCixrbKLvy%2Fflow.0a01bdf5.png?alt=media&amp;token=0af12f0e-4477-40ec-a7cf-a5dedd6c1315" alt=""><figcaption></figcaption></figure>

### Flow Type <a href="#flow-type" id="flow-type"></a>

To begin with, you need to create a **flow**. Currently, Flochat provides you with 11 types of flow:

<img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEIgY2GVhiYkgk1GphtRA%2Fflow_type.6ebfa00c.png?alt=media&amp;token=64dfa29c-94b1-4246-8cf4-82a1733c7979" alt="" data-size="original">

### Sub Flow Type <a href="#sub-flow-type" id="sub-flow-type"></a>

Flow consists of **sub flows**. There are 3 types of sub flow:

| Sub Flow                                                                                                                                                                                                                       | Usage                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| ![](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZ6YJzCjo2ScwjRrrfu3a%2Fdownload%20\(4\).png?alt=media\&token=a2de2892-8ac2-46cf-ad53-cf7aff0ed9d2) | general sub flow, varies in flow type |
| ![](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNH0nuWi1uiU4RLIQMFCd%2Fdownload%20\(5\).png?alt=media\&token=663eb999-c5d0-43fe-a5ca-d78cccc25406) | call / trigger background tasks       |
| ![](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3pWKh6p47QjlYSXUV4GT%2Fdownload%20\(6\).png?alt=media\&token=5391bd11-04ed-4774-b825-2006aa6e4f28) | process repetitive tasks              |

### Step Type <a href="#step-type" id="step-type"></a>

Sub Flow consists of **steps**. There are 8 types of steps:

| Step                                                                                                                                                                                                                                | Usage                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzMZYgyifPyGCUHbKUe4s%2Fdownload%20\(3\).png?alt=media\&token=e4210a3a-272c-41a6-b024-f72df4055e31)  | display information                                             |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3Hh6pIKnPxTdUPNBJDw7%2Fdownload%20\(7\).png?alt=media\&token=bb42b771-239d-4656-ac23-e2c2a261277a)  | ask question and wait for user input                            |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBtk612gmd8IMc2YugxOY%2Fdownload%20\(8\).png?alt=media\&token=d624f768-2f2d-4c63-b55b-1130533c18d4)  | process data and tasks via integrations, APIs, notifications... |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2kzLYXMDZlLb1RVpraqQ%2Fdownload%20\(9\).png?alt=media\&token=c97002fb-ebfc-4cd7-a24f-9e54333f303c)  | go different steps depend on conditions                         |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGg7M6yLKjISSG5r7Kepy%2Fdownload%20\(10\).png?alt=media\&token=2641ad8f-c55a-449b-85de-150867e2fbe3) | go different steps depend on probability                        |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrCBlxRXkh4TIm6yUKGK0%2Fdownload%20\(11\).png?alt=media\&token=d14c94a1-4ece-4846-842c-28e7744f8e59) | send full email instead of short email notification             |
| ![step](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTdSbdXuNIB43v6abMnGj%2Fdownload%20\(12\).png?alt=media\&token=83d03fea-4a84-4903-9f8a-cea0d17d8cca) | jump to a step or sub flow rather than using a line connector   |
| ![](https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTQ4V6kOt9zT7tN8RyQ2C%2Fdownload%20\(13\).png?alt=media\&token=815b89e5-3eb9-4c7f-a1d4-1146a686e453)     | define output for the function flow                             |

{% hint style="info" %}
The differences among different types of flow are **Flow Setup**, **Send Message Step** and **Question Step**. Each channel has its own limitation of message types. For example, you can display a product gallery in Facebook Messenger while the SMS channel doesn't support that.
{% endhint %}

### Publish Version & Draft Version <a href="#publish-version-draft-version" id="publish-version-draft-version"></a>

Each flow has a Publish Version and a Draft Version.

* Publish Version

  > Your bot talks to clients using the publish version.
* Draft Version

  > Any editing of steps will be saved automatically to the draft version. you can edit your flow without influencing the bot and test the draft version before you "Publish".

#### From **Publish Version** to **Draft Version**, 1 way: <a href="#from-publish-version-to-draft-version-1-way" id="from-publish-version-to-draft-version-1-way"></a>

* click "Edit Flow" on the upper left/right corner of the flow to enter the draft version

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMYFOlzjLoQ6sk40CAHfg%2FCapture.PNG?alt=media&amp;token=44f361cc-9856-4a07-b1b0-dc5863a1c49a" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
You must enter Draft Version before you edit a flow.
{% endhint %}

#### From **Draft Version** to **Publish Version**, 3 ways: <a href="#from-draft-version-to-publish-version-3-ways" id="from-draft-version-to-publish-version-3-ways"></a>

* click "Publish" to save your draft to a new Publish Version
* discard changes and revert to the newest Publish Version
* keep draft and switch to Publish Version (by doing this, you can have a look at your publish version and when you click edit and come back, your draft is still here)

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqYZHM0gDTXrgShbUGAZ3%2Ftempsnip.png?alt=media&amp;token=22782eca-85f1-4d7d-b690-2a948133f1d1" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Don't worry if you accidentally quit during your editing, the system will keep all your modifications in Draft Version. So when you come back, simply enter Draft Version again and you can see your modifications remain intact.
{% endhint %}

{% hint style="success" %}
**TIP**

You might want to create a flow first, then open the flow side by side when you read the following instruction.
{% endhint %}

After entering a flow, this is what you will see:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGP3Wjd02ZgzM1nrbJhmk%2Ftempsnip%20(7).png?alt=media&amp;token=ac19fec7-768d-40a4-af89-fd3c50560bbc" alt=""><figcaption></figcaption></figure>

### Preview Feature

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLSfG9DOI7BjCeMIHXFRz%2FCapture.PNG?alt=media&amp;token=786018e1-76f3-4eac-a22b-0ceae262c007" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that "Preview" feature is not supported in all channels. Channels support "Preview": Web, Facebook, Instagram, Telegram, WhatsApp, Line and Viber.
{% endhint %}

On the left-hand side, there is a sidebar. From top to bottom there are:

| Section      | Usage                                                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| Flow Builder | build subflows here                                                                                                                   |
| Flows        | manage all your subflows                                                                                                              |
| Analytics    | bot data analysis                                                                                                                     |
| Live Chat    | inbox for all the conversations, make a human reply here                                                                              |
| Bot Users    | manage bot user profile. import, export, search or delete bot users                                                                   |
| Automation   | manage keywords, sequences, triggers and comments                                                                                     |
| Contents     | manage custom fields, tags, OTN, personas, user menus and customer feedback                                                           |
| Tools        | manage error logs, draft version tester, bot admins, widgets, multiple language and shortcuts, Facebook Ads, inbound webhooks         |
| Broadcasts   | send/manage broadcasts                                                                                                                |
| Settings     | (some are owner only) manage bot users limit, Facebook greeting text, chat widget customization, ice breakers and authorized websites |

{% hint style="info" %}
Features in Automation, Contents, Tools and Settings can be different from channel to channel. In Settings, usually owner can see all the settings like bot user limit while admin and member only see part of them.
{% endhint %}

### Flow Builder <a href="#flow-builder" id="flow-builder"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQ7qUq3FWXHGbcnPZPf5y%2Ftip1.a27dedcc.gif?alt=media&amp;token=e62c0743-735e-4fe3-88d7-af0ffbfe0491" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvwFsCOANjLRzQkkRcr9g%2Ftip2.a057f4cb.gif?alt=media&amp;token=d506b2ce-cfe0-4fdb-b714-01ffaa3478c3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fan51O1fuemimzGfwunYT%2Ftip3.69bd3943.gif?alt=media&amp;token=6097bd08-f2fb-4f4d-b7e9-393850e737ce" alt=""><figcaption></figcaption></figure>

### Change Themes <a href="#change-themes" id="change-themes"></a>

Before you start, you can pick your favourite theme by clicking "Change Theme":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fk9bRJtyqCxG8j52m6ddZ%2Fdownload%20(38).png?alt=media&amp;token=6aabf7df-0f52-4a9a-9703-b06465e7ed91" alt=""><figcaption></figcaption></figure>

choose one of them and "Apply Change".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzlgFtyLOOy4OiM5SnmCp%2FCapture.PNG?alt=media&amp;token=c763d883-fbe0-484e-ae5c-375010236e2e" alt=""><figcaption></figcaption></figure>

### Available Themes

PS:JelllyBean is the most popular 🤗

{% tabs %}
{% tab title="IceCream" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fn464B3RRzjSCNtw9iDO0%2FCapture.PNG?alt=media&amp;token=7e8d9881-7260-4d03-aada-ffdd24f93f30" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Honeycomb" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FZN88MzTMbFoWDswprzKR%2FCapture.PNG?alt=media&amp;token=295c0113-9556-44bd-8cde-b20a383557fa" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="GingerBread" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fv7bd2QUpY1NkztDaB1lS%2FCapture.PNG?alt=media&amp;token=f030f36b-df6e-4a5c-b16f-a291c9fcb5fc" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Froyo" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F04HYAcmKftr9avCy8MwW%2FCapture.PNG?alt=media&amp;token=860fc343-c3d7-4db6-8a8d-452e41320242" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Eclair" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlEjQ6mYu7qs3PQ6uFSSk%2FCapture.PNG?alt=media&amp;token=3944cf0b-8321-44f9-82e4-cf72171fe5df" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Donut" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjOMqMFbcDyOABptIRwvH%2FCapture.PNG?alt=media&amp;token=2b888005-0faf-4a7c-8efc-90a491616130" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="CupCake" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfBD0XJMzS9FkYw0Shqq1%2FCapture.PNG?alt=media&amp;token=569a18e2-9059-4550-8a03-b4518b0c08c8" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Banana" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpNGRorqTCgXkAr82RSCM%2FCapture.PNG?alt=media&amp;token=d5209dba-b96a-4b53-8d2d-34c0c67fe888" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Apple" %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Frlfp513DOszu2UTdrrly%2FCapture.PNG?alt=media&amp;token=3d40e94f-3386-4215-b10b-a5ad26155831" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Hide Mini-map or Tooltips <a href="#hide-mini-map-or-tooltips" id="hide-mini-map-or-tooltips"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fp9b6cX8lgYYMf3aHzvyP%2Fchange_theme3.369d6b4b.png?alt=media&amp;token=bf665d28-9fea-491d-8e1e-382fa89855a9" alt=""><figcaption></figcaption></figure></div>

With tooltip, you can see description for every feature you see in the flow builder like this:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOncr9rFNeiSrIc6LTlsj%2Fchange_theme4.7c9fcd6b.png?alt=media&amp;token=9d862d8a-16b6-4ec4-a167-9ef3b69d9c2b" alt=""><figcaption></figcaption></figure>

The tooltip includes a title, description, image, video link and documentation link. It is friendly to new users. For users who are already familiar with the system, you can choose to disable the tooltip by clicking the "Hide Flow Tooltips" option.

### Basic Operations to Build Flows <a href="#basic-operations-to-build-flows" id="basic-operations-to-build-flows"></a>

#### Edit Step: <a href="#edit-step" id="edit-step"></a>

Click on a step to edit it, "Edit Panel" will show next to the sidebar.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRbfDSJ5wpLezqZbDPXPS%2Fworkspace1.f2c327b9.png?alt=media&amp;token=bff56e83-d110-44ee-ae94-d6bc686d6cb0" alt=""><figcaption></figcaption></figure>

Click step name to edit it. You can choose the next step at the bottom of the edit panel or drag connectors from the circle to the tile of another step.

### Connect Steps: <a href="#connect-steps" id="connect-steps"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLtQkRPpxxIFwDIJId5jP%2Fworkspace2.7ae21c04.png?alt=media&amp;token=4a688278-aea4-43e3-bf57-fd6a66ea17cf" alt=""><figcaption></figcaption></figure>

Create a new step or choose an existing one to be the next step. For dragging connectors, see below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsIvujLGfvuruK0kSntrj%2Fconnect_step1.83458edd.gif?alt=media&amp;token=0dfb71a0-51e8-493f-aad8-81db1d5f9e26" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJwowMhAG7YB6BFLjsbhL%2Fconnect_step2.f19da962.gif?alt=media&amp;token=75059f43-7d6b-4c53-89f7-8804714013de" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When you choose an existing next step, a line will be connected from the current step to the next. Too many lines can be messy, get a Goto step to help you organize! In a Goto step, you can nominate the next step without creating a line connector.
{% endhint %}

### Select Multiple Steps (Move to Canvas/Sub Flow) <a href="#select-multiple-steps-move-to-canvas-sub-flow" id="select-multiple-steps-move-to-canvas-sub-flow"></a>

We've just learned how to move the builder by clicking and dragging. For selecting multiple steps, it's a bit similar. Hold the **Shift** key then click and drag to cover the steps you would like to select:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJ0UdXoxWdReci44lSJWt%2Fselect_steps1.aa273864.gif?alt=media&amp;token=e3395ab9-a676-4442-99a9-683dd69d9bc2" alt=""><figcaption></figcaption></figure>

Alternatively, ctrl + click them one by one:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXU1cTYlQ2DddI7rSF6TY%2Fselect_steps2.0b0ad2ad.gif?alt=media&amp;token=7d7705cb-777a-44c3-b7a2-2088bb7cd4d0" alt=""><figcaption></figcaption></figure>

The selected step has a green border. After selecting multiple steps, click "Create New Canvas" to organize these steps in a canvas box, or move them to an existing sub flow. To **delete** multiple steps, hit the "delete" button on your keyboard after choosing several steps:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fk5wxhnhfwlSHBDPrMLsP%2Fdelete_steps.9455f5d0.gif?alt=media&amp;token=e6a39932-357f-402b-86a2-990d8b9eba24" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Delete on Mac**

On Mac OS computer, hold **fn** and hit **Delete** to remove steps. Or use the "**Delete Selected** button in the editing panel.
{% endhint %}

{% hint style="success" %}
The green start point is the entrance of a sub flow. It can't be moved to other sub flows or deleted even you include it in a group of steps.
{% endhint %}

### Copy and Paste Steps <a href="#copy-and-paste-steps" id="copy-and-paste-steps"></a>

After you select a step or multiple steps, use **Ctrl + C** to copy and **Ctrl + V** to paste it to:

* the same subflow
* different subflows in the same bot/flow
* different bots/flows but the same channels (associate custom fields will be created automatically)
* different channels (unsupported features will be removed)

{% hint style="info" %}
Please note that you can only paste ONCE. Copy again for another paste. This is to prevent bulk pasting which can quickly blow up the flow.
{% endhint %}

That's all about it for Flow Builder Overview!! 🎉 Try building your first flow now. 😎


# Field variable

{% hint style="info" %}
Before the detailed introduction of each step, let's take a look at what is **field(variable)**. It might take you a moment but this is essential to know more about the system. Field, aka variable, is a container to hold a value.
{% endhint %}

| Classification                                                                                             | Description                                                                                                              |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **system** field and **custom** field                                                                      | system field is created by the system with pre-defined variable name and type, while custom field is defined by yourself |
| **bot** field and **user** field                                                                           | bot field is shared in the whole bot, while each user has his/her own set of user fields                                 |
| **text** field, **number** field, **boolean** field, **date** field, **datetime** field and **JSON** field | see variable type                                                                                                        |

### User Field <a href="#user-field" id="user-field"></a>

User field belongs to users. For example, each user has their own name and email address. So "name" and "email" are user fields.

### Bot Field <a href="#bot-field" id="bot-field"></a>

Bot field belongs to the bot. For example, a restaurant bot holds an address and contact number of the restaurant. So "restaurant\_address" and "restaurant\_contact" should be created as bot fields. Because you don't want to manage different addresses or contacts of your restaurant for every user.

### System Field <a href="#system-field" id="system-field"></a>

System field is created by the system with pre-defined variable name and variable type. There are system bot field and system user field:

Some system fields only exist in the specific channel. Check the table below for how to edit system field:

<table><thead><tr><th>Field Name</th><th width="121">Field Type</th><th width="143">Variable Type</th><th>Description</th><th>How to Edit</th></tr></thead><tbody><tr><td>User Ns</td><td>user field</td><td>text</td><td>user identification in </td><td>non-editable</td></tr><tr><td>User Id*</td><td>user field</td><td>text</td><td>user identification from the channel</td><td>non-editable</td></tr><tr><td>First Name</td><td>user field</td><td>text</td><td>profile info</td><td>in Question Step/Action Step</td></tr><tr><td>Last Name</td><td>user field</td><td>text</td><td>profile info</td><td>in Question Step/Action Step</td></tr><tr><td>User Name</td><td>user field</td><td>text</td><td>profile info</td><td>in Action Step</td></tr><tr><td>Gender</td><td>user field</td><td>text</td><td>profile info</td><td>in Action Step</td></tr><tr><td>Email</td><td>user field</td><td>text</td><td>profile info</td><td>in Question Step/Action Step</td></tr><tr><td>Phone</td><td>user field</td><td>text</td><td>profile info</td><td>in Question Step/Action Step</td></tr><tr><td>Profile Image</td><td>user field</td><td>text</td><td>profile info</td><td>in Question Step</td></tr><tr><td>Locale</td><td>user field</td><td>text</td><td>profile info</td><td>non-editable</td></tr><tr><td>Timezone</td><td>user field</td><td>text</td><td>profile info</td><td>non-editable</td></tr><tr><td>Language</td><td>user field</td><td>text</td><td>profile info</td><td>in Action Step</td></tr><tr><td>Subscribed</td><td>user field</td><td>datetime</td><td>subscribed time</td><td>non-editable</td></tr><tr><td>Last Text Input</td><td>user field</td><td>text</td><td>user's last input</td><td>edited by system</td></tr><tr><td>Last Interaction</td><td>user field</td><td>datetime</td><td>last action time</td><td>edited by system</td></tr><tr><td>Last Button Title</td><td>user field</td><td>text</td><td>last button pressed</td><td>edited by system</td></tr><tr><td>Flow Ns</td><td>bot field</td><td>text</td><td>flow(bot) identification</td><td>non-editable</td></tr><tr><td>Sub Flow Ns</td><td>bot field</td><td>text</td><td>sub flow identification </td><td>non-editable</td></tr><tr><td>Page Name</td><td>bot field</td><td>text</td><td>connected Facebook page name</td><td>non-editable</td></tr><tr><td>Page Id</td><td>bot field</td><td>text</td><td>connected Facebook page id</td><td>non-editable</td></tr><tr><td>Page User Name</td><td>bot field</td><td>text</td><td>username of the page in Facebook</td><td>non-editable</td></tr><tr><td>Last FB Comment</td><td>user field</td><td>text</td><td>user's last comment text in the Facebook page</td><td>edit by system</td></tr><tr><td>Last FB Comment Post Id</td><td>user field</td><td>text</td><td>post id of where user put the last comment</td><td>edit by system</td></tr><tr><td>Last FB Comment total tagged users</td><td>user field</td><td>number</td><td>tagged users amount in last comment</td><td>edit by system</td></tr><tr><td>Last FB Comment total new tagged users</td><td>user field</td><td>number</td><td>tagged but haven't subscribed(to bot) users amount</td><td>edit by system</td></tr><tr><td>Last FB Comment is existing users</td><td>user field</td><td>number</td><td>before this comment, is he/she an existing user? yes=1,no=0</td><td>edit by system</td></tr><tr><td>Live Chat Url</td><td>user field</td><td>text</td><td>(for agent) visit to talk to user in live chat</td><td>edit by system</td></tr><tr><td><strong>NOW</strong></td><td>user field</td><td>datetime</td><td>current time in user's timezone*</td><td>edited by system</td></tr><tr><td><strong>TODAY</strong></td><td>user field</td><td>date</td><td>current date in user's timezone*</td><td>edited by system</td></tr><tr><td><strong>BOT_CURRENT_TIME</strong></td><td>bot field</td><td>datetime</td><td>current datetime in workspace's timezone</td><td>edited by system</td></tr><tr><td><strong>ITEM</strong></td><td>user field</td><td>array (JSON)</td><td>each item in a JSON</td><td>in "For Each" message</td></tr><tr><td><strong>SELECT</strong></td><td>user field</td><td>array (JSON)</td><td>selected item</td><td>in "Select" new step</td></tr><tr><td><strong>SHOP</strong></td><td>bot field</td><td>array (JSON)</td><td>store information</td><td>in Ecommerce Integration</td></tr><tr><td><strong>CART</strong></td><td>user field</td><td>array (JSON)</td><td>user shopping cart</td><td>in Action Step</td></tr><tr><td><strong>ORDER</strong></td><td>user field</td><td>array (JSON)</td><td>user's last order</td><td>edited by system</td></tr><tr><td><strong>User</strong></td><td>user field</td><td>array (JSON)</td><td>user's profile</td><td>edited by system according to other profile values</td></tr><tr><td><strong>DialogFlow</strong></td><td>user field</td><td>array (JSON)</td><td>DialogFlow response</td><td>edited by DialogFlow agent</td></tr></tbody></table>

{% hint style="info" %}
If the channel doesn't support timezone in user's profile, or, the channel supports but the user don't have a timezone value, workspace timezone will be used instead.
{% endhint %}

### User Id in Different Channels: <a href="#user-id-in-different-channels" id="user-id-in-different-channels"></a>

| Channel   | Meaning                           | Example Value                        |
| --------- | --------------------------------- | ------------------------------------ |
| Facebook  | Unique Id in your Facebook page   | 6288386817841812                     |
| Instagram | Unique Id in your Instagram bot   | 6570462892993643                     |
| Telegram  | Unique Id in your Telegram bot    | 1173717756                           |
| Slack     | Unique Id in your Slack workspace | U017MKNENH                           |
| WeChat    | Unique Id in your WeChat account  | oNzS3wpEjnA3tXmOcNxpqtAnBwWg         |
| WhatsApp  | User's phone number without **+** | **61412345678**                      |
| SMS       | User's phone number               | **+61412345678**                     |
| Voice     | User's phone number               | **+61412345678**                     |
| Google    | Conversation Id from Google       | 8095938e-90cf-4347-ab94-9224308672b0 |
| Line      | Unique Id in your Line bot        | Ub02c77c69c59c5be5597d58ce2701ebe    |
| Viber     | Unique Id in your Viber bot       | mdY9hOWdeQC6J/Sl19Qh8A==             |
| Vk        | Unique Id in your Vk bot          | 705862439                            |

&#x20;

{% hint style="info" %}
The unique id from the channel is only unique in your Facebook page, Telegram bot, Slack workspace or WeChat account, not the unique id in the whole Facebook, Slack, etc.
{% endhint %}

### Variable Type <a href="#variable-type" id="variable-type"></a>

There are 6 types of variable in Sendly:

<table><thead><tr><th width="158">Type</th><th>Storage</th><th>Example</th><th>Operations Supported</th></tr></thead><tbody><tr><td>Text</td><td>letters, words, sentences...</td><td>Hi, Sendly.</td><td>cutting, change case, encode, decode...</td></tr><tr><td>Number</td><td>numbers</td><td>123.45</td><td>+ - x ÷, mod, power, log, root, round...</td></tr><tr><td>Boolean</td><td>either "1" or "0", for true or false</td><td>1</td><td>assign</td></tr><tr><td>Date</td><td>date</td><td>2021-03-30</td><td>format, add months/weeks/days</td></tr><tr><td>DateTime</td><td>date and time</td><td>2022-01-01T12:00:00+10:00</td><td>format, add months/weeks/days/hours/minutes</td></tr><tr><td>JSON (array)</td><td>a series of variables</td><td>{"name":"Jack", "age":"20"}</td><td>load, get, update, remove, count, sum, average, sort, shuffle, reverse...</td></tr></tbody></table>

### Boolean Value <a href="#boolean-value" id="boolean-value"></a>

When these values stored in the field, the boolean return **false**, otherwise it goes **true**:

* null
* empty
* 'false'
* false
* 'no'
* 0

### Create Custom Field <a href="#create-custom-field" id="create-custom-field"></a>

Wow, now you are a master 👨‍🎓 of field! Let's try it out! 😎😎

You can create variables in 2 ways:

| Place                                                                             | Type Supported         |
| --------------------------------------------------------------------------------- | ---------------------- |
| in Contents section                                                               | user field & bot field |
| anywhere you need to map result to variable, e.g. Question step, Integration, etc | user field only        |

### Create Custom Field in Contents Section <a href="#create-custom-field-in-contents-section" id="create-custom-field-in-contents-section"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVKiceqIVOOrNMUHD6fp7%2Fquestion2.c75fbeab.png?alt=media&amp;token=600fc958-f13f-492f-934d-560b69a0abf7" alt=""><figcaption></figcaption></figure>

1. go "Contents" from the left sidebar
2. select User Fields or Bot Fields
3. use folder to organise your fields if needed

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FaqvA4bgIQhnR2mJMQWBn%2Fquestion3.668bd8e2.png?alt=media&amp;token=73bbe4de-fa15-42e7-8c23-30d7783a30df" alt=""><figcaption></figcaption></figure>

Click the blue "+ New User/Bot Field" button on the right side to create a field. "Field Name" is a must. You can use any character to separate words like underline or space. We suggest you keep the field name as concise as possible, to avoid any possible display issue.

After that, pick a variable type. Add default value or description if needed. (default value is for bot fields only)

Folders can be used to organise variables. Trust me, you will need it when your flow goes big. 🧐

### &#x20;Create Custom Field in Question and Action Step <a href="#create-custom-field-in-question-and-action-step" id="create-custom-field-in-question-and-action-step"></a>

To create new fields in for example, the question step:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGmWm6v2ocusNP9pDjQC3%2Fquestion4.07398aeb.png?alt=media&amp;token=c596b43f-6cb4-4c66-8a9d-690d99e2848d" alt=""><figcaption></figcaption></figure>

Type in a new variable name in the "Enter Field Name" box and click it in the drop-down list. Select correspond variable type and here you go.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F5IoCIBIAmcm5bXACQUEe%2Fdownload%20(14).png?alt=media&amp;token=04756b0d-ab3a-426c-a734-becb0dbd1f4d" alt=""><figcaption></figcaption></figure>

Another example, create in an integration:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMPGHgNA7o3qnzzciI9UJ%2Fquestion38.daaa0bf7.png?alt=media&amp;token=f8136f66-a8df-4d8d-a40a-87e71f78bd97" alt=""><figcaption></figcaption></figure>


# Steps


# Steps

A few simple steps to send out your first message:

* click the green start point
* in the edit panel, "Select Next Step"
* choose "Send Message" step
* click the "Send Message" step

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FIoeydf9I3KMH6zXFAR6u%2Ftempsnip.png?alt=media&amp;token=0994c0c0-cd18-4ac0-9c28-c0228e8c44a2" alt=""><figcaption></figcaption></figure>

* click text type message
* enter your message
* "Publish"

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoA1Yr3jK1WO8VcYYkIbP%2FCapture.PNG?alt=media&amp;token=7efffdef-1aea-4e55-b98b-23a40db84546" alt=""><figcaption></figcaption></figure>

That's it! Let's test!

Click "Preview" from the navigation bar and "Open the flow".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhLICT4fTt0YbNVbSpYt1%2Ftempsnip.png?alt=media&amp;token=f64a602f-43bd-4abb-9f38-38e7da4c2dbd" alt=""><figcaption></figcaption></figure>

Preview Feature

Please note that "Preview" feature is not supported in all channels. Channels support "Preview": Web chat, Instagram, Facebook, Telegram, WhatsApp, Line and Viber.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fc87rqvjoA3X98xoiRydj%2FCapture.PNG?alt=media&amp;token=5adfb9f1-fbcd-4c70-9311-03ef393e79fe" alt=""><figcaption></figcaption></figure>

* **Preview in pop up**: This opens a preview window in your flow builder
* **Open in web browser**: Opens flow in a new web browser tab
* **Copy Ref Url**: A unique shareable link to your flow

Congrats! Your bot is working now. 🤖🤖

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxnexKPAiyoR2Vijl6NSr%2FCapture.PNG?alt=media&amp;token=5350711e-2bb2-4e6f-b893-3d6a2a73196c" alt=""><figcaption></figcaption></figure></div>

Let me show you some more details about Send Message step. These are the message type in common for all/some of the Channels. Check by type below:

### Insert Custom Field Value and Emoji <a href="#insert-custom-field-value-and-emoji" id="insert-custom-field-value-and-emoji"></a>

Wherever you see "\</>", you can insert emojis or variable values to the text.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgvDeEOPAfhoajFU5JoJ1%2Ftempsnip.png?alt=media&amp;token=3d56fe73-134c-4929-a293-339ea156527a" alt=""><figcaption></figcaption></figure>

Or simply type "{{" to call the field list:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsFrV9vUnCKdiyADvyNAk%2Finsert_value2.313ff557.gif?alt=media&amp;token=d0086712-1d94-4e4f-8334-1c6bf1f16fa9" alt=""><figcaption></figcaption></figure>

### Send Image / Audio / Video / File <a href="#send-image-audio-video-file" id="send-image-audio-video-file"></a>

There are multiple ways to send media type within a message:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcoAxo8f3CULKBYhwZXHF%2FCapture.PNG?alt=media&amp;token=79949741-977a-4ad6-b152-6c488266d643" alt=""><figcaption></figcaption></figure>

* upload from your computer (**size limited**)

  | Media Type         | Maximum Upload Size |
  | ------------------ | ------------------- |
  | video              | 10MB                |
  | audio              | 5MB                 |
  | file               | 5MB                 |
  | others(e.g. image) | 2MB                 |

### Sending image files

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FH8lwock4wKI1Ifk2MpF1%2FCapture.PNG?alt=media&amp;token=4845be9d-e32c-47b9-8d9a-bfec2a03a4af" alt=""><figcaption></figcaption></figure>

* Sending images from an URL link (**RECOMMENDED**)

  > You can search pictures online and copy their direct URL links. But this direct link might change. Alternatively, you can upload photos to your server or other third-party photo storages like imgur.com, then get your direct URL links from that. **Direct URL link** means the link is pointing to a specific photo, not a website, ending with .jpg or .png, etc.
* search from GIFs gallery

  > We provide you with a GIFs gallery, you can search what you need here.
* from Library

  > Library is the place you can see all the photos, GIFs, audios and videos you have uploaded before. So that you don't need to re-upload the same media, just find them in your library.

### Send Card <a href="#send-card" id="send-card"></a>

Card is used to display a serious of information nicely like product information. There are 4 elements in a card: Image, title, subtitle and button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F1jpweYNA0aGoBHJcG3wr%2Ftempsnip.png?alt=media&amp;token=8d4994f9-d026-4430-aafb-58cb4159b9e2" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that to show a card, you must have a title and at least one other factor, picture, subtitle or button.
{% endhint %}

### Send "For Each" <a href="#send-for-each" id="send-for-each"></a>

This message type is also showing cards but in a more automatic way. With "For Each", you don't need to type in each card yourself. It automatically displays all items in a JSON variable. Check Action Step - What is [JSON variable](/flow-builder/steps/json-operation).

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvMSnwnXjSj8UwlNHOs9r%2Ftempsnip.png?alt=media&amp;token=56969c14-dd11-409f-8f40-2cc7c6db13eb" alt=""><figcaption></figcaption></figure>

1. choose a JSON variable first
2. click "\</>" or type "{{" in the text box
3. choose "ITEM" to get a sample item from the JSON variable

Value in the JSON variable:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNWNxmSJ9a003uY8eMfeH%2Fsend_message18.ba84256e.png?alt=media&amp;token=f820b049-3ede-48b2-9301-377832c8a873" alt=""><figcaption></figcaption></figure>

Value in "ITEM":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8CVIm3wiCkiDJR7oPRN4%2Fsend_message19.b5966a3e.png?alt=media&amp;token=010a9482-1f75-413f-8ffd-892b3a1302ed" alt=""><figcaption></figcaption></figure>

The "Sample data" is to quickly fill in the "JSON Path" field. For example, as shown in the picture, click the "price" row, and "$.price" appears in the "JSON Path" itself. This means that, we are displaying the price of each item here. If there is no sample data prompted, you can fill in the path yourself by typing "$.", which refers to each item in the JSON variable, followed by the key of a value.

### Value Format <a href="#value-format" id="value-format"></a>

Moreover, for numbers like percentage and price, for date value and time value, we have different formats listed for you. For example, in the above picture, the price value is "5" and after choosing a "F03" format, the bot will display it as "$5". While the value in the variable is still the number "5" so that you are able to use it in math calculation or condition comparison without malfunction.

### Hidden Keys <a href="#hidden-keys" id="hidden-keys"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FubuYQaMZDniFkMZsRrkk%2Fdownload%20(39).png?alt=media&amp;token=218a0a28-28ba-4999-a655-140e4fb4ef49" alt=""><figcaption></figcaption></figure></div>

Apart from the keys in the JSON variable, there are 3 hidden key you might need:

| Key Name | Description                         |
| -------- | ----------------------------------- |
| INDEX    | index of the item started from 1    |
| KEY      | key name of the item                |
| VALUE    | value of the item = the item itself |

**INDEX Example**

When you have a JSON with a list of JSONs in it, use INDEX for checking the sequence number of an item. Let's add an index number before the item name:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYPR4yZ95wYRm5c3ryHzo%2Fdownload%20(40).png?alt=media&amp;token=bef0748b-1946-4ae5-bf7b-0c73e8e1b69b" alt=""><figcaption></figcaption></figure>

Testing result:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWqhWx5TZFrEN5ASYpzWe%2Fsend_message32.db0c93b6.png?alt=media&amp;token=eda28bb7-0cb7-4841-bf0f-02b577482333" alt=""><figcaption></figcaption></figure>

**KEY/VALUE Example**

When you have a JSON as shown in the following picture instead of a JSON holding a list of JSONs,

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzggaMaFiOnndhYStlHNK%2Fdownload%20(41).png?alt=media&amp;token=dade3999-a2ec-467f-b52d-9c303ba82243" alt=""><figcaption></figcaption></figure></div>

These are what you will get by using the three keys:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fmt25z3qHaRT4yJoedUKD%2Fdownload%20(42).png?alt=media&amp;token=15d65ee1-acad-430f-bcab-ad41d46a5c93" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpYLgJDaM6jDCOPOddXvt%2Fsend_message31.9f5b073c.png?alt=media&amp;token=f7947099-eeb6-4524-baa4-1f8763930aca" alt=""><figcaption></figcaption></figure>

Testing result:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtIefPPi4yxrVZm98FVXy%2Fsend_message33.cca3f7de.png?alt=media&amp;token=6d171346-ede5-43f6-bf62-5990a1347e12" alt=""><figcaption></figcaption></figure>

### Send SELECT after "For Each" <a href="#send-select-after-for-each" id="send-select-after-for-each"></a>

When you add a button to your "For Each", the button is going to show with every card. Usually, you might want to put a "Buy" or "Select" button here in the case that you are listing some products or options.

How does the the bot know that which card did the user select?

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FznSYUYxubtJKsrUJg3GV%2Fdownload%20(43).png?alt=media&amp;token=c3e00348-4486-4c6a-b2bd-2e8a3fe14adb" alt=""><figcaption></figcaption></figure>

When you select next step for the button, choose "Select":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FF9aIbWb5SRxpvFhAgGKh%2Fsend_message23.f21339bc.png?alt=media&amp;token=94ccf0d0-b35c-4caf-9794-779b3ff71a59" alt=""><figcaption></figcaption></figure>

Then select a next step as you usually do, like a Send Message Step to show the selected item or Action Step to deal with the data. You can then access the selected item in "SELECT":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOnyFXkD5ipHeGC0nwtc4%2Fsend_message24.f5a3ae35.png?alt=media&amp;token=86d0140d-7ecc-4bc3-926a-32a10e5fc969" alt=""><figcaption></figcaption></figure>

For example, let's add a Send Message step, find the system field "SELECT":

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXkMLooyvSg8AX2SMXI8c%2Fsend_message25.15ff647d.png?alt=media&amp;token=d84571e8-bdd9-471b-afa1-fa863ad2a67f" alt=""><figcaption></figcaption></figure>

1. click the row "item" to get the path "$.item" or type in the path directly
2. in the JSON path, add key name if needed. In this case, let's show the name of the selected item. So add ".name" after the path.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2ARDoeNiN7tPJIbYrZXn%2Fsend_message26.6ab54cca.png?alt=media&amp;token=288b4f1a-310b-4c68-a29a-87e51244d203" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgdZkb5Qvq5iKW9y0IaCZ%2Fdownload%20(44).png?alt=media&amp;token=998a83a5-33fa-4bb2-a470-d1aa12b5f903" alt=""><figcaption></figcaption></figure>

You will see this when you test it:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdWJ5igWGRw6zbceYZkfe%2Fsend_message28.7a9fbc65.png?alt=media&amp;token=ee7db405-7d12-4a90-9f86-3a94dd739a64" alt=""><figcaption></figcaption></figure>

### Send Dynamic Content <a href="#send-dynamic-content" id="send-dynamic-content"></a>

Dynamic Content helps you send out an API request, to your server or a third-party server, in order to get a response to display. The server can reply differently each time. In this way, your bot is able to display dynamic content to your users.

This feature is practical when your bot logic is complex and rely heavily on other servers. For example, you have your own AI algorithm to analyze users' questions and calculate corresponding response on your server, in this case, you can send the question in the API request. And the server can generate a response based on the question. Finally, the server sends the response back to the chatbot to display to your users.

A response message can contain several messages, buttons and quick replies with actions. You can even apply simple actions like add tag directly in the response JSON.

* Check Action Step - [External Request](/flow-builder/steps/external-request) for how to send an API request,

### Send Location <a href="#send-location" id="send-location"></a>

To send a location, search it on a map, then right-click it to copy its latitude and longitude values:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjsaVUDqceh4npEprQZ49%2Ftempsnip.png?alt=media&amp;token=ca9f0a93-9810-4141-a62a-419359cab238" alt=""><figcaption></figcaption></figure>

Enter your location name, paste the data and add a label if needed. A label gives additional information like floor or room number.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fmmk6PRlhCzcn6rV6hAqB%2FCapture1.PNG?alt=media&amp;token=b9514dec-504b-45b3-9eaf-64c7385cf2ec" alt=""><figcaption></figcaption></figure>

### Send Ecommerce Product <a href="#send-ecommerce-product" id="send-ecommerce-product"></a>

Check [Ecommerce](/platform/introduction/ecommerce) for how to setup and use built-in ecommerce system.

### Facebook - Send Message <a href="#facebook-send-message" id="facebook-send-message"></a>

Facebook allows the bot to send texts with 3 buttons and 10 quick replies at most.

### Send Text with Button & Quick Reply <a href="#send-text-with-button-quick-reply" id="send-text-with-button-quick-reply"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FiSxQgfCZqvy8XqGyhcuf%2Fsend_message1.09c09b43.png?alt=media&amp;token=1fb8c218-d618-4ae1-9f50-e1aa4dc7d071" alt=""><figcaption></figcaption></figure>

The difference between button and quick reply on Facebook Messenger:

| Type        | Usage                                               |
| ----------- | --------------------------------------------------- |
| button      | once sent, always in the conversation to be pressed |
| quick reply | similar to button, but disappear when used          |

Try to add some buttons, quick replies and test it. You will see their differences.

### Telegram - Send Message <a href="#telegram-send-message" id="telegram-send-message"></a>

Telegram flow is our newly added flow type. It is similar to Facebook flow except for some exclusive features with Facebook. Text tutorial about Telegram flow will be updated shortly.

### WeChat - Send Message <a href="#wechat-send-message" id="wechat-send-message"></a>

WeChat allows the bot to send texts with 10 buttons at most. Message type with WeChat:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqikYYciXQgeeO9iLjeL1%2Fdownload%20(45).png?alt=media&amp;token=1389b8f2-880f-4187-84fe-32e3eddcd98b" alt=""><figcaption></figcaption></figure>

### Send Article <a href="#send-article" id="send-article"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsOLYJmUoGs0EmyEcypZD%2Fsend_message10.ec9e8c06.png?alt=media&amp;token=45b327a1-525d-4b28-ba85-18909d9b3bbd" alt=""><figcaption></figcaption></figure>

This is how it looks like in the chat:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FX6n8fjzL1zi4xVgbxo8M%2Fsend_message11.c4e067dd.png?alt=media&amp;token=243ea034-37db-4808-bcc7-ab9e1427fe14" alt=""><figcaption></figcaption></figure>

### Send Mini Program <a href="#send-mini-program" id="send-mini-program"></a>

You can also send mini-programs that associates with your official account.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdX6OlLYldIRktG97u9kb%2Fsend_message12.20b55d6a.png?alt=media&amp;token=4a80c7c3-b767-4cdf-ac47-8fb34c423739" alt=""><figcaption></figcaption></figure>

### WhatsApp - Send Message <a href="#whatsapp-send-message" id="whatsapp-send-message"></a>

Message types with [WhatsApp](/platform/whatsapp-+-360dialog):

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNms7FJXMGBlsAIGpyRKq%2Fdownload%20(46).png?alt=media&amp;token=90848a52-acf6-4367-bb3e-7cc32e842082" alt=""><figcaption></figcaption></figure></div>

Button in WhatsApp is a bit different from that in Facebook. A button in Facebook can be pressed for multiple times while in WhatsApp, only once.

### SMS - Send Message <a href="#sms-send-message" id="sms-send-message"></a>

SMS bot can send only text and image.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3XhOLkh8UkrR9xLc9xPF%2Fdownload%20(47).png?alt=media&amp;token=c50f06bd-e1e0-4b17-a853-78f2d08a3381" alt=""><figcaption></figcaption></figure></div>

### Voice - Send Message <a href="#voice-send-message" id="voice-send-message"></a>

#### Send Text / Audio <a href="#send-text-audio" id="send-text-audio"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3w6uFflbrisQ29a0hjtH%2Fsend_message9.8aa52f78.png?alt=media&amp;token=72b4d68a-eb90-479b-acd6-bbd178428f50" alt=""><figcaption></figcaption></figure>

You can have the bot read out the text with a specified language or record your own audio and upload it.

{% hint style="info" %}
For voice bot, you can set a default language at the Green Start Point or set it separately for each send message/question step.
{% endhint %}

We have a Mini-App called "VoiceMaker" using a third party API which provides you with a better quality of text-to-voice conversion! Download the Mini-App in integration section.

### Google My Business - Send Message <a href="#google-my-business-send-message" id="google-my-business-send-message"></a>

Message types with Google my business flow:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnUkeE9eCA2r0NfUqhZfz%2Fdownload%20(48).png?alt=media&amp;token=223da6d5-918b-44d3-9cb8-27687f560c25" alt=""><figcaption></figcaption></figure></div>

All types are covered above, please check message type in common for all/some of the channels. Find location type in "Rich Media".


# Question step

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FIOduDlCao6inubuYxyq6%2Fquestion1.a744690f.png?alt=media&amp;token=85c31c6b-24cc-4062-8f37-ce9afa65a6fd" alt=""><figcaption></figcaption></figure>

### Set Quick Answers <a href="#set-quick-answers" id="set-quick-answers"></a>

Quick answers are convenient for users to click rather than typing. When you set quick answer:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjgJNNkOhk22tMUaBznEs%2Fquestion21.e3620d5a.png?alt=media&amp;token=826038ee-e146-4dfc-b9f2-a5bd8b092073" alt=""><figcaption></figcaption></figure>

"Answer Text" is shown to users while "Answer Value" is saved to the variable.

{% hint style="info" %}
You can set quick answers across all channels. However, some channels display the quick answers as buttons for pressing like Facebook, while some don't such as SMS. For the latter case, you can still set quick answers but at the same time, you will need to prompt that how to trigger the quick answers.
{% endhint %}

### How to give prompt and set quick answers? <a href="#how-to-give-prompt-and-set-quick-answers" id="how-to-give-prompt-and-set-quick-answers"></a>

In the question box, for example, put "reply 1 for service A, reply 2 for service B", etc. Then in the quick answer, set "Answer Text" to be "1", "2", etc for matching, and "Answer Value" to be "service A", "service B", etc to save user's option.

| Channel  | How to Provide Quick Answers                                                       |
| -------- | ---------------------------------------------------------------------------------- |
| Facebook | quick answers will be displayed as buttons                                         |
| Telegram | quick answers will be displayed as buttons                                         |
| WeChat   | use buttons instead of quick answer or give prompt                                 |
| WhatsApp | quick answers will show in "Select Option"                                         |
| SMS      | give prompt                                                                        |
| Voice    | give prompt and use Speech question or DTMF question to ask for keypad/voice input |
| Google   | quick answers will be displayed as buttons                                         |

### How does the matching work in quick answers? <a href="#how-does-the-matching-work-in-quick-answers" id="how-does-the-matching-work-in-quick-answers"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0GQJbjm1MCA8mOoF9DXp%2Fquestion22.623e9a29.png?alt=media&amp;token=5e804f16-165e-4a8e-bf5c-ac109bde7226" alt=""><figcaption></figcaption></figure>

Once the user's input contains one of the "Answer Text", the quick answer is matched (non case-sensitive). Plus, the order of those quick answers matters because the bot will check in order. Once a quick answer matched, it will stop the matching.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2CjnkxhPSj9FRnvmNvo6%2Fquestion23.b2102154.png?alt=media&amp;token=768837d3-5147-45d8-89d7-2f9a347bf6ad" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fis8hTB2X99WwXr03yVSC%2Fquestion24.a0a677b5.png?alt=media&amp;token=185dc848-dca3-444a-bb7c-520050d12518" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqnQimXKSumot3rlXHdro%2Fquestion25.b9a24000.png?alt=media&amp;token=72bf5248-404e-413f-936e-c0417e1d08d2" alt=""><figcaption></figcaption></figure>

### Skip Button <a href="#skip-button" id="skip-button"></a>

Add skip button if the question is ok to skip. Also, the label of the skip button is editable.

### No Match <a href="#no-match" id="no-match"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fy3eR2ttlkoBNnr0xBZ0b%2Fquestion6.921b5ac2.png?alt=media&amp;token=63b6fdcb-86ea-4135-856b-c3ff3df285f6" alt=""><figcaption></figcaption></figure>

"No Match" is a very practical feature because different answer types have different specified patterns. Email address, for example, has to be "\[email protected]". You can put something like "Wrong email, please try again" as your retry message and jump to another step if no match on several times.

However, a "\[email protected]" format just filters out wrong email but fake email. To check whether an email is real or not, try **Mini-App** for using a third-party verification tool.

### No Input <a href="#no-input" id="no-input"></a>

Similarly, "No Input" helps you redirect the flow when user input expires. By default, a question expires in 1 hour. Make it shorter if needed.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3dcsa5wq9UEAuQo4YjRF%2Fdownload%20(49).png?alt=media&amp;token=6c8264db-abaa-4cad-b09c-fe94463c1921" alt=""><figcaption></figcaption></figure>

### Ask for Image / Audio / Video / File / Record <a href="#ask-for-image-audio-video-file-record" id="ask-for-image-audio-video-file-record"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F58wzqGKmCRX0ehnoGLMg%2Fdownload%20(50).png?alt=media&amp;token=b85706ce-75f5-451d-99eb-07f60bf61615" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
You will need text variables to save the URL links of these 5 types of answers
{% endhint %}

When the user uploads a document, an URL link pointing to the document is saved in the variable rather than the document itself. Because media document can be very large. Later, if you want to send that document in send message step, you will need to choose "Send Media From URL" and type in the variable there.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6njMs8jkBUWuGVvBPiH1%2Fdownload%20(51).png?alt=media&amp;token=d97009b5-e6ae-4ec2-8e54-9c9747125707" alt=""><figcaption></figcaption></figure>

### Ask for Choice <a href="#ask-for-choice" id="ask-for-choice"></a>

This is a question type listing limited quick answers and user have to choose only from these quick answers. For example, when choosing property type, list only house, townhouse and apartment as quick answers. Therefore, if the user doesn't click one of these three, a retry message appears.

### Ask for Date / Datetime <a href="#ask-for-date-datetime" id="ask-for-date-datetime"></a>

{% hint style="info" %}
Except from Facebook Messenger and Google My Business, the rest channel doesn't have a date picker when user makes Date/Datetime input. So you have to prompt users "Please input the Date / Datetime as exactly the format: YYYY-MM-DD / YYYY-MM-DD hh:mm:ss". Any other format won't be recognized successfully.
{% endhint %}

### Ask for Phone <a href="#ask-for-phone" id="ask-for-phone"></a>

The basic validation for Phone number Question is:

* only these 11 characters are allowed: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +.
* "+" sign is only allowed in the front of the phone
* more than 6 characters

### Question Step in Voice Bot <a href="#question-step-in-voice-bot" id="question-step-in-voice-bot"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fcswn5ExY8Mz69XDXRWLj%2Fdownload%20(52).png?alt=media&amp;token=d6062205-a75c-4e0c-9473-507e5eabbf25" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
You can always put a URL link pointing to your mp3 file in the text box (started with "https\://" and ended with ".mp3" or ".mav") of a Send Message Step or Question Step. In that way, the bot will play the audio file instead of transferring the text to audio.
{% endhint %}

{% hint style="info" %}
You can put the link directly in the text box or store the link in a text variable. You can also combine audio URL with text when you use it. But remember that don't let the URL and text connect to each other, because the system cannot recognize it as an audio URL link. See screenshot below.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEdh7rXhpbpfhkzyCj21T%2Faudio_question.6b15d748.png?alt=media&amp;token=a8cf6b8e-f745-45ea-a8df-273d25149761" alt=""><figcaption></figcaption></figure>

### Voice Bot - Ask for Speech <a href="#voice-bot-ask-for-speech" id="voice-bot-ask-for-speech"></a>

Speech is usually used to get short answers. When the bot asks for speech input, it will listen to what the user says and convert the speech to text with a confidence score. The score is between 0 and 1. The closer to 1, the more confident the speech analysis was.

{% hint style="info" %}
You might want to add a Condition step to discard any conversion with low confidence. For example, when the confidence score is less than 0.7, ask for re-input.
{% endhint %}

Use "Advanced Settings" to help improve the conversion:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FowLGbuMTs0AEs5WiIkzr%2Fquestion11.a6d4d04c.png?alt=media&amp;token=c3e40783-8029-438d-8730-53339f7df32a" alt=""><figcaption></figcaption></figure></div>

Select correspond speech model and language. "Numbers and Commands" speech mode can help improve the recognition rate when the answer is a string of numbers, etc. **Please note that,** [**Twilio**](/platform/introduction/integrations/twilio) **charges for using this mode.** More importantly, provide the bot with some hints, keywords that might appear in speech (separated by commas and no space).

### Voice Bot - Ask for DTMF (Keypad) <a href="#voice-bot-ask-for-dtmf-keypad" id="voice-bot-ask-for-dtmf-keypad"></a>

DTMF refers to keypad input, including number 0 to 9, \* and #. Usually, it is used to make a main menu for your voice bot, just like what you might hear before "Hi, press 1 for xxx, press 2 for xxx, ..."

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzQOWu2gwE7diuVEES0aH%2Fquestion12.1b2f911d.png?alt=media&amp;token=fc3c71a3-6222-447b-ab0c-5c9ad7370fd5" alt=""><figcaption></figcaption></figure></div>

"Number of Digits" means how many digits to expect. For example, a credit card number needs 14 or 16 digits while a postcode needs 4 or 6 digits.

"Stop Key" is set to "#" by default, but it is also editable. You will need "Stop Key" when you don't know how many digits to expect. Don't forget to mention the "Stop Key" in the question box. 🤖🤖

{% hint style="info" %}
"No Input" timeout in Voice Question plays an important role. Often, it will be set to just few seconds while in other channels, the default timeout is 1 hours.
{% endhint %}

### Voice Bot - Ask for Record <a href="#voice-bot-ask-for-record" id="voice-bot-ask-for-record"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpjrlYbllvRCYUNmBZRjG%2Fquestion13.289a0cda.png?alt=media&amp;token=481d030c-dbb3-481b-abdc-a367190769b3" alt=""><figcaption></figcaption></figure></div>

Again, same as asking for picture, audio, video or file, you will need a text variable to save the URL link of the record file. Check advanced settings for more details such as "Stop Key" and "Max Record Duration".

You will be able to access the record file through the URL link or manually from the "Recordings" section shown as below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FiOsjJCBOCMH3A57ktLaH%2Fquestion26.2a199e0e.png?alt=media&amp;token=126ed0f3-9a76-4a7d-8a84-73c56db6b3bb" alt=""><figcaption></figcaption></figure>

Here you can see all your "Record Question" and "Transfer" recordings with a "Play" button to play the audio.

### Voice Bot - Ask for Transfer <a href="#voice-bot-ask-for-transfer" id="voice-bot-ask-for-transfer"></a>

The transfer feature is more like an Action rather than a Question. Since actions in the Action step are shared across all the channels, we put transfers in Question steps.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbtZy1OHprauSlhAmEavR%2Fquestion14.5fe72cb9.png?alt=media&amp;token=4a751679-27ce-4991-9dce-5d32694b818a" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
The transfer number should be in E164 format. e.g. +61412345678
{% endhint %}

You can record the conversation after transferring for training purposes, etc. Similarly, check the recording from the "Recordings" section from the left sidebar.

### Hang up Calls <a href="#hang-up-calls" id="hang-up-calls"></a>

One thing to mention, if your clients need to come back to the bot after the transferred conversation. There are 2 ways to do so:

* the transferred party hang up first
* your clients press the star key (need to enable the option in advanced settings)

In either way, don't forget to mention it to your clients before the transfer.

### Add Extension to Phone Number <a href="#add-extension-to-phone-number" id="add-extension-to-phone-number"></a>

Add extension to a phone number by using a hash key. e.g. +61412345678#wwww1234. Each "w" will wait for half a second.

Let say I have a voice bot for the number +61412345678, and I put a DTMF question after the Start point of the main flow. The extension "1234" will be considered as the input for this DTMF question. In this way, you are routing the calls automatically.

### Transfer to Multiple Numbers <a href="#transfer-to-multiple-numbers" id="transfer-to-multiple-numbers"></a>

You can put multiple numbers in the "Transfer To Phone Number" field, separated by ONLY commas. e.g. +61412345678,+61412345679#wwww1234,+61412345670

The bot will call these 3 numbers simultaneously, the first person who answers the call get this transfer, the rest call stops ringing. Your phone number provider will only charge you for one call because only one number is transferred successfully.

### Voice Bot - Ask for Payment <a href="#voice-bot-ask-for-payment" id="voice-bot-ask-for-payment"></a>

The payment feature is more like an Action rather than a Question.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0Y9saxFph8z9UdL191Sx%2Fquestion15.ecf80dc7.png?alt=media&amp;token=5c9214dc-de49-42ca-a58f-a6c30e63bb9b" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhDDpgbu8FTo18UaWscx4%2Fdownload%20(53).png?alt=media&amp;token=445c06ed-b8a6-4c9b-b88a-b9c5d8b469e0" alt=""><figcaption></figcaption></figure></div>

### PCI Mode (Twilio) <a href="#pci-mode-twilio" id="pci-mode-twilio"></a>

For Twilio users, you will need to enable the PCI mode in your [Twilio](/platform/introduction/integrations/twilio) account to capture a payment either in test or live mode.

Search "Voice Settings" from your account,

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fi2zbYaliWRfzQsDFNMj0%2Fquestion29.356e2667.png?alt=media&amp;token=87a72be2-e4c8-4253-b52f-31b0d2cb3408" alt=""><figcaption></figcaption></figure></div>

click the "Enable" button:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhYdiGyuttyOXhEzvW6dE%2Fquestion30.f030fd6e.png?alt=media&amp;token=771a1249-f53d-44d8-962a-684fee8d02e8" alt=""><figcaption></figcaption></figure></div>

#### Edit Prompts <a href="#edit-prompts" id="edit-prompts"></a>

All prompts are already set in English. Feel free to change it if needed like changing to another language. There are 4 pieces of information to gather for a card.

1. credit card number
2. expiration date
3. CVV
4. postcode (if needed, enable the option in advanced settings).

Each information has 3 speeches to set, asking, timeout and invalid:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpkL3qdKKq7wxrZAd86Pq%2Fdownload%20(54).png?alt=media&amp;token=66e72d70-25fa-4f69-a39f-cc517d8f88ee" alt=""><figcaption></figcaption></figure></div>

#### Payment Connector <a href="#payment-connector" id="payment-connector"></a>

To get a "Payment Connector", which is "Unique connector ID", you will need to access your phone number provider and payment service provider. Twilio and Stripe, for example, go [twilio.com (opens new window)](https://www.twilio.com/), follow step 1 to 4 in the following 2 pictures:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJRLqxUlZkW8f0rQaXG2r%2Fquestion17.49b04c33.png?alt=media&amp;token=235b2bef-1407-4ec5-9954-c4ec938fa934" alt=""><figcaption></figcaption></figure>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FImib6ihdwXHg52NfVQTI%2Fquestion18.65c2a8ed.png?alt=media&amp;token=6550c899-6d86-4935-b10f-5f172b7dd60e" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4jgQMuLVVUJej53KgR1x%2Fquestion19.d0ba3be7.png?alt=media&amp;token=0d2bd0db-8530-48f0-a40c-4f9dcbbf2ff6" alt=""><figcaption></figcaption></figure>

Install, name a "UNIQUE NAME" yourself and click "Connect with Stripe". This "UNIQUE NAME" is then your "Unique connector ID", copy it back to the chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLcihnDrhCRIa3ONmercE%2Fquestion20.769b37b4.png?alt=media&amp;token=baf9a404-bf87-468e-a707-42cbe4db18c5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note that for "MODE", choose "test" when you are testing the payment process and choose "live" when you are ready to accept real payment.
{% endhint %}

### Charge Amount <a href="#charge-amount" id="charge-amount"></a>

Put direct number like "99.99" or a number variable here.

### Response <a href="#response" id="response"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F94cdmWoRshGeownYsY94%2Fdownload%20(55).png?alt=media&amp;token=60568bd9-46b4-4ed4-ae7f-b17f89c750bb" alt=""><figcaption></figcaption></figure>

You will need a JSON variable to hold the payment result. This is a response example including some card details, confirmation code and payment result.

### Payment Fail <a href="#payment-fail" id="payment-fail"></a>

You can deal with the situation via the "Payment Fail" option. For example, send "Something went wrong" and goto the Payment Step again.

### One Time Token <a href="#one-time-token" id="one-time-token"></a>

You can choose to capture a payment **right now** or **later**.

* If you decide to charge right away:

> give a value more than 0 in the "Charge Amount" box

* If you wanted to get the payment later

> put a "0" in the "Charge Amount" box. In this way, you will get a token for future capture.

{% hint style="info" %}
There are 2 types of token, **one-time token** and **reusable token**. With a one-time token, you can charge the client once. While with a reusable token, you can charge the client for multiple times.
{% endhint %}

Under the situation that you set the charge amount to "0", if you enable the "One Time Token" option in advanced settings, you will get a one-time token. Otherwise you get a reusable token.

By different combinations of charge amount and "One Time Token" option, you will get different payment results:

<table><thead><tr><th width="172">Charge Amount</th><th width="158">One Time Token</th><th width="185">What Will Happen</th><th>Payment Result</th></tr></thead><tbody><tr><td>0</td><td>Enabled</td><td>get one-time token</td><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTX0ZLuBdjZ2zBK98OUy5%2Fdownload%20(56).png?alt=media&amp;token=54a3d070-b97f-436e-9ba8-09d38c5bb2b0" alt=""></td></tr><tr><td>> 0, e.g. 5</td><td>Enabled</td><td>charge $5</td><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fp4Da1Y3FJUJdWnhBzGEV%2Fdownload%20(57).png?alt=media&amp;token=486e4035-b96f-4fb9-b2ee-03bf6721855f" alt=""></td></tr><tr><td>0</td><td>Disabled</td><td>get reusable token</td><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtRixC2ajq6GMdVbAKbLU%2Fdownload%20(58).png?alt=media&amp;token=81c943be-12a4-4fe7-bb49-14bbb9919265" alt=""></td></tr><tr><td>> 0, e.g. 5</td><td>Disabled</td><td>charge $5</td><td> <img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGVXmsEjO8zenImoLrrua%2Fdownload%20(59).png?alt=media&amp;token=9bca0623-8a47-4817-8350-04f3f295259c" alt=""></td></tr></tbody></table>

That means, whenever you set a charge amount greater than 0, it doesn't matter whether you enable the One Time Token option or not, you will charge your client right away and get a payment confirmation code. The code starts with "ch\_" if you are using Twilio.

On the other hand, an one-time token starts with "tok\_" if you are using Twilio. And a reusable token refers to customer's ID, starting with "cus\_" if you are using Stripe.

### How to Charge with Token <a href="#how-to-charge-with-token" id="how-to-charge-with-token"></a>

Check the documentation of how to create a charge with your payment service provider. Let's take Stipe as an example, to make a payment with a reusable token.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUOeRcVJksS9MHSK7VwcA%2Fquestion35.049ec9e4.png?alt=media&amp;token=d10a7232-d86c-46ea-a6c7-1b8cbbf4f678" alt=""><figcaption></figcaption></figure>

In the example, a post request is sent to Stripe with a testing API key and a charge amount, currency and the reusable token, i.e. the customer ID.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJJEf3BpsRHaxnzUK7lss%2Fquestion36.ef4b07e0.png?alt=media&amp;token=c9a7ff64-51ae-477e-a1e9-95d8e1ae3dff" alt=""><figcaption></figcaption></figure>

After hitting the test button, this is the response if succeed:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEbHKM5wLgvuSE6ZQZTaV%2Fquestion37.eb0feb0a.png?alt=media&amp;token=ce153738-a215-4e2a-8510-5f052a11a259" alt=""><figcaption></figcaption></figure>

In the response you can see there is an id started with "ch\_", which is the payment confirmation code. That means, you've successfully made a payment.

### Description <a href="#description" id="description"></a>

"Description" is submitted along with the payment details. For example, you can put “Payment of $20.52 submitted from Phone Number (xxx)-xxx-xxxx” to create a record to show which call created the payment.

### A Credit Card for Testing <a href="#a-credit-card-for-testing" id="a-credit-card-for-testing"></a>

Use the following card details for testing if needed:

> Credit card number: 4242 4242 4242 4242
>
> Expiry date (MM/YY): 12 25 (pick a date in the future)
>
> Zip code: 94105
>
> CVC security code: 333


# Variable Operation

Built-in operations for variable modification.

There are 6 types of variable:

<table><thead><tr><th width="145">Type</th><th>Storage</th><th>Example</th><th>Operation</th></tr></thead><tbody><tr><td>Text</td><td>letters, words, sentences...</td><td>Hi, Flochat.</td><td>cutting, change case, encode, decode...</td></tr><tr><td>Number</td><td>number</td><td>123.45</td><td>+ - x ÷, mod, power, log, root, round...</td></tr><tr><td>Boolean</td><td>either "yes" or "no"</td><td>yes</td><td>assign</td></tr><tr><td>Date</td><td>date</td><td>2021-03-30</td><td>format, add months/weeks/days</td></tr><tr><td>DateTime</td><td>date and time</td><td>2021-03-30 16:52:00</td><td>format, add months/weeks/days/hours/minutes</td></tr><tr><td>JSON</td><td>a series of variables</td><td>{"name":"jack", "age":"10"}</td><td>load, get, update, remove, count, sum, average, sort, shuffle, reverse...</td></tr></tbody></table>

Click "Basic Actions" in the Action step and here are the "Set Variable Value" and "Clear Variable Value".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtP5r1lBZb3lqvJHP6xNS%2Ftempsnip.png?alt=media&amp;token=83d680e3-0671-43a9-badf-c4b43eb68f9a" alt=""><figcaption></figcaption></figure>

### Clear Custom Field / Clear JSON <a href="#clear-custom-field-clear-json" id="clear-custom-field-clear-json"></a>

To clear text, number, boolean, date, datetime variable, please use the **Clear Custom Field** action.

To clear JSON variable, please use the **Remove All Items** operation in the [**JSON Operation**](/flow-builder/steps/json-operation).

### Input value <a href="#input-value" id="input-value"></a>

"input value" operation is used to assign value to a variable. This operation works for any variable type.

{% hint style="info" %}
"input value" for text variable can be used to connect several text variables. See the below picture for where to put original value and operated value.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F38J2sRjE5cSSjdLHcfuS%2Fvariable2.d9eebed4.png?alt=media&amp;token=70fa9cc3-eb18-4ece-83f4-e8b4d71c88e6" alt=""><figcaption></figcaption></figure>

### Math Formula <a href="#math-formula" id="math-formula"></a>

![condition](https://i.imgur.com/sHDee6i.png)

With this operation, you can now do formula calculation directly in the Action Step - "Set Variable Value" and Condition Step - "Value".

Math operations and function supported:

+, -, \*, e, pi, PI, abs(), min(), max(), ceil(), floor(), log(), pow(), round(), sqrt(), sin(), cos(), tan()

{% hint style="info" %}
If the formula is invalid, the system will return 0 to number variable and empty to text variable.
{% endhint %}

## &#x20;Set Text Variable <a href="#set-text-variable" id="set-text-variable"></a>

#### Trim text <a href="#trim-text" id="trim-text"></a>

| Description                            | e.g. Before | e.g. After |
| -------------------------------------- | ----------- | ---------- |
| remove spaces before or after the text | " abc "     | "abc"      |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPSG7SqqwknVPmWhRm8Gg%2Fdownload%20(60).png?alt=media&amp;token=e050f62c-3859-48c7-b3a3-0e2eaaa22fe5" alt=""><figcaption></figcaption></figure>

### Sub string <a href="#sub-string" id="sub-string"></a>

| Description          | e.g. Before   | e.g. After |
| -------------------- | ------------- | ---------- |
| get part of the text | "Hi, Sendly!" | "Sendly"   |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXfSKszTDIbvADTI0Edqw%2FCapture.PNG?alt=media&amp;token=bbc027f9-381f-4178-a166-21917b11b8ec" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Index starts from 0. Every character counts including space and punctuation.
{% endhint %}

### Replace string / replace string case sensitive <a href="#replace-string-replace-string-case-sensitive" id="replace-string-replace-string-case-sensitive"></a>

| Description              | e.g. Before    | e.g. After        |
| ------------------------ | -------------- | ----------------- |
| replace part of the text | "Hi, Flochat!" | "Hello, Flochat!" |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHu1llaXAPjgjrROX3WZk%2FCapture.PNG?alt=media&amp;token=81585742-fb94-4a74-a15e-071f22494be1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In case sensitive situation, you have to put exactly "Hi" rather than "hi", "HI" or "hI".
{% endhint %}

### To lower / upper case <a href="#to-lower-upper-case" id="to-lower-upper-case"></a>

| Type          | e.g. Before    | e.g. After     |
| ------------- | -------------- | -------------- |
| to lower case | "Hi, Flochat!" | "hi, flochat!" |
| to upper case | "Hi, Flochat!" | "HI, FLOCHAT!" |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJeV6bDOpwZ8On1GMBtct%2FCapture.PNG?alt=media&amp;token=85c2d7ee-f474-4431-ac19-25ad9c328ec1" alt=""><figcaption></figcaption></figure>

### Generate random text <a href="#generate-random-text" id="generate-random-text"></a>

| Description | e.g. Before            | e.g. After             |
| ----------- | ---------------------- | ---------------------- |
| as the name | "code: XXXX-####-xxxx" | "code: UBWT-3657-lkzb" |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FIRI1gwORq9l6vhrcTKj0%2FCapture.PNG?alt=media&amp;token=1bb61b80-2e11-494d-8bff-ef57360477c8" alt=""><figcaption></figcaption></figure>

This feature is useful when you need to generate one-time verification code or reference code.

### url encode / decode <a href="#url-encode-decode" id="url-encode-decode"></a>

| Type   | e.g. Before        | e.g. After         |
| ------ | ------------------ | ------------------ |
| encode | "Hi, Flochat!"     | "Hi%2C%20Flochat!" |
| decode | "Hi%2C%20Flochat!" | "Hi, Flochat!"     |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUEPNziA6Ykrzvdvs44CB%2FCapture.PNG?alt=media&amp;token=602888d4-add9-4db7-890c-793ee73ec91d" alt=""><figcaption></figcaption></figure>

### Base64 encode / decode <a href="#base64-encode-decode" id="base64-encode-decode"></a>

| Description | e.g. Before        | e.g. After         |
| ----------- | ------------------ | ------------------ |
| encode      | "Hi, Sendly!"      | "SGksIFVDaGF0IQ==" |
| decode      | "SGksIFVDaGF0IQ==" | "Hi, Sendly!"      |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoQxb6uvoSJeB29ekKOQ5%2FCapture.PNG?alt=media&amp;token=5554df1b-f497-4b9e-bf22-67177da824c9" alt=""><figcaption></figcaption></figure>

### To URL friendly slug <a href="#to-url-friendly-slug" id="to-url-friendly-slug"></a>

| Description                                           | e.g. Before       | e.g. After       |
| ----------------------------------------------------- | ----------------- | ---------------- |
| replace spaces with hyphens and remove the rest signs | "it's a good day" | "its-a-good-day" |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHHi4B6JIXLtcjO6Dqke0%2FCapture.PNG?alt=media&amp;token=331f05da-e2a3-47a9-b07b-fcb383b45878" alt=""><figcaption></figcaption></figure>

#### Get text before/after ... <a href="#get-text-before-after" id="get-text-before-after"></a>

Description: get part of the text.

| Type                                       | e.g. Before                   | e.g. After              |
| ------------------------------------------ | ----------------------------- | ----------------------- |
| get text before another text               | name: Sendly, city: Melbourne | name                    |
| get text before last occur of another text | name: Sendly, city: Melbourne | name: Sendly, city      |
| get text after another text                | name: Sendly, city: Melbourne | Sendly, city: Melbourne |
| get text after last occur of another text  | name: Sendly, city: Melbourne | Melbourne               |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FybDeinLnPvrkMvA8zvsv%2FCapture.PNG?alt=media&amp;token=995af3b2-f2cc-4fb6-857a-e77f6cbb7da9" alt=""><figcaption></figcaption></figure>

## Set Number Variable <a href="#set-number-variable" id="set-number-variable"></a>

### Get text length <a href="#get-text-length" id="get-text-length"></a>

| Description | e.g. Before | e.g. After |
| ----------- | ----------- | ---------- |
| as the name | 500.59      | 6          |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F40FkPouE10gI7sZx2YSP%2Fdownload%20(61).png?alt=media&amp;token=26dd0893-4923-44f2-8510-58a002e22d07" alt=""><figcaption></figcaption></figure>

### Generate random number <a href="#generate-random-number" id="generate-random-number"></a>

| Description | e.g. Before | e.g. After |
| ----------- | ----------- | ---------- |
| as the name | n/a         | 56         |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F1vMT7DAPXqwqCQP63oK5%2Fdownload%20(62).png?alt=media&amp;token=ae988477-89c9-4bec-9a31-7e2be3269a02" alt=""><figcaption></figcaption></figure>

### Add / subtract / multiply / divide / modulus / power / natural logarithm / square root <a href="#add-subtract-multiply-divide-modulus-power-natural-logarithm-square-root" id="add-subtract-multiply-divide-modulus-power-natural-logarithm-square-root"></a>

| Description | e.g. Before | e.g. After |
| ----------- | ----------- | ---------- |
| as the name | 7           | 8          |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6s7TkL1gYW5HW8JtDIXS%2Fvariable16.f1b406f2.png?alt=media&amp;token=1c0b680f-bfdd-4765-9e2c-7c6b3b768c23" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
in "natural logarithm", when you are calculating log2(8) = ? put 8 as "Value" and 2 as "Number".
{% endhint %}

### Round <a href="#round" id="round"></a>

| Description | e.g. Before | e.g. After |
| ----------- | ----------- | ---------- |
| as the name | 7.8693      | 7.87       |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKJXAZtVz7PHRQoBLqYQv%2Fdownload%20(63).png?alt=media&amp;token=16a83432-4c6f-49d2-b169-525944051b4d" alt=""><figcaption></figcaption></figure>

### Floor / ceil <a href="#floor-ceil" id="floor-ceil"></a>

Description: get approximate integer.

| Type  | e.g. Before | e.g. After |
| ----- | ----------- | ---------- |
| floor | 6.55        | 6          |
| ceil  | 6.55        | 7          |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGet3vZA5m1KrpxYvQuKC%2Fdownload%20(64).png?alt=media&amp;token=eaf67399-bf7f-4669-9b00-84e7c6ab57e9" alt=""><figcaption></figcaption></figure>

## Set DateTime Variable <a href="#set-datetime-variable" id="set-datetime-variable"></a>

### From formatted text <a href="#from-formatted-text" id="from-formatted-text"></a>

| Description                            | e.g. Before             | e.g. After          |
| -------------------------------------- | ----------------------- | ------------------- |
| get DataTime value from formatted text | 00:00:00 30th Aug, 2020 | 2020-08-30 00:00:00 |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8pPGLWs6u4Yl3TQJ0wMW%2Fvariable19.ef7184e3.png?alt=media&amp;token=53dc191a-e7df-4291-9527-9081631d7b12" alt=""><figcaption></figcaption></figure>

### Add minutes / hours / days / weeks / months <a href="#add-minutes-hours-days-weeks-months" id="add-minutes-hours-days-weeks-months"></a>

| Description | e.g. Before         | e.g. After          |
| ----------- | ------------------- | ------------------- |
| as the name | 2021-01-01 00:00:00 | 2021-01-01 00:01:00 |

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRRninpuGgTA3t1hzYTHD%2Fdownload%20(65).png?alt=media&amp;token=6762d5c9-aa03-422f-80a1-c50bd20538cf" alt=""><figcaption></figcaption></figure>


# JSON Operation

JSON is also a type of variable. It is used to store and manage a series of variables including normal variable and JSON variable.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fq4KM4XRWbPBgYYt2xR7X%2Fjson2.f6a1e095%20(1).png?alt=media&amp;token=7e048f87-73b3-4c75-ba84-05980caa75bb" alt=""><figcaption></figcaption></figure>

For example, this is a JSON storing a customer's detail:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkrjUJTn3aPAct9NIsZk8%2Fdownload%20(15).png?alt=media&amp;token=ba3572c7-f3a3-4538-a16f-4b8f85261863" alt=""><figcaption></figcaption></figure>

The "JSON Operation" is sitting in the "Basic Actions" list of the Action step.

TIP

{% hint style="info" %}
Various examples have been already embedded in the operation. Select an operation and use the "Examples" button to explore it!
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlRHrv26izlQVO1gsHuZY%2Fjson3.ad87dd56.png?alt=media&amp;token=41234772-dd71-4ed8-95de-f06644bc7104" alt=""><figcaption></figcaption></figure>

For example, how to insert an item to a JSON variable:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FIVakthlCLKQXUoujIVi7%2Fjson4.a63bf6d7.png?alt=media&amp;token=391a743b-9698-45a7-90f0-540b73d679e2" alt=""><figcaption></figcaption></figure>


# External Request

With external requests, you can call APIs from other third parties or your own server to request data, submit data and etc.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2vOukgbaPRqTe1JIyhiy%2Fexternal-request1.7c27838f.png?alt=media&amp;token=e184c580-6f1e-4802-9950-bd901f5db51f" alt=""><figcaption></figcaption></figure></div>

In an Action step, find "External Request" in "Advance Actions" and click "Add your request" then start editing it:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F52LLWoqJN5pj73jfMluO%2Fexternal-request2.cddb7524.png?alt=media&amp;token=eaada289-ea19-4d66-90a1-f7378746842b" alt=""><figcaption></figcaption></figure>

1. choose a request type such as GET, POST, etc
2. paste your request URL / endpoint
3. adjust "URL parameters", "Headers", "Body" or "Authorization" section if needed. e.g. setup API key
4. click "Test" and area 5 will show in the "Response" section with a response code
5. click on "Response Headers" to expand the header for more details and the received data is in blue
6. choose which part of the data you need by clicking the circle on the left-side accordingly
7. after clicking area 6, the JSON path for the selected data is automatically shown here. $ means the whole JSON.
8. choose which custom field to store the data. You can create a new field here by typing in a field name and clicking it in the drop-down. Click the "Add" button to add to the mapping list
9. finally, the mapping shows in area 9. Add as many mapping as needed and click "Save".

{% hint style="info" %}
Make sure you provide testing data for any one of the fields/variables in the settings before you use the **Test** button.
{% endhint %}

### URL Params <a href="#url-params" id="url-params"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBOkTBGkeg2HMq0WHUH1x%2Fexternal-request3.b9dc4b09.png?alt=media&amp;token=5bcd7f96-38b5-46f2-9e39-62b207bd80ab" alt=""><figcaption></figcaption></figure>

In the above screenshot, we can see that there is a URL parameter in the endpoint called "user\_name". Remember to copy the endpoint down and provide a testing value.

Alternatively, you can use the **URL Params** sections for the same result.

### Headers

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXA8wHiWCdeSzc1BYoSll%2Fdownload%20(66).png?alt=media&amp;token=f9d76ee7-a431-4722-875a-596efab41421" alt=""><figcaption></figcaption></figure>

Same as **URL Params**, put your key name first, then insert the variable and provide a testing value.

### Authorization

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fp13EeXhVhsJ17pZDlQ0R%2Fexternal-request5.41686223.png?alt=media&amp;token=544687cf-c600-4896-ab91-81d91503ac15" alt=""><figcaption></figcaption></figure>

Alternatively, put the token in the **Authorization** section. It's going to be less error-prone (sometimes people just forgot the "Bear " in front of the token).

Moreover, for **Basic Auth**, simply put your username and password value and the system will do the base64 encoding for you.

### Body <a href="#body" id="body"></a>

To include a file itself in the parameters, use **multipart/form-data**:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMayixVSvMPyLXWBvDtXy%2Fexternal-request6.48902713.png?alt=media&amp;token=3ea755b1-5e03-4d4f-b778-09deec1fc94a" alt=""><figcaption></figcaption></figure>

**x-www-for-urlencoded** works just like **URL Params** or **Headers** section.

Instead of listing all the payloads in **x-www-form-urlencoded**, you can also paste the example payload in raw JSON:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fz7NlCbzkw623J8N9eiz7%2Fexternal-request7.a95b57ba.png?alt=media&amp;token=bfc1c2cf-0b81-40c5-bb92-a7b326336bd6" alt=""><figcaption></figcaption></figure>

On the left-hand side, **Body Content**, paste or write your JSON first, when you insert a variable, the **Test body content** shows on the right side immediately. It's to specify a testing JSON value.

Click on **Copy from body content** to copy the whole JSON structure. All the variables will be replaced by {{`variable_name`}}. Remove the placeholder and put your testing values.

### Testing <a href="#testing" id="testing"></a>

Once you are ready, click on the **Test** button next to the URL endpoint or in the **Response** section.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDwdmaMhqAyYrTy8ng08y%2Fexternal-request8.d05241c5.png?alt=media&amp;token=df4100dd-2686-4b64-80d7-67c5758cd8c3" alt=""><figcaption></figcaption></figure>

Besides the tips about how to map data above, you might also want to save the values in the response header for later use. Simply expand the header, click on a value in the header and the JSON path to it shows automatically there.


# Send Notification

This action allows your bot to send notification through various channels, including

* Email
* Slack
* SMS
* Phone Call
* WhatsApp
* Telegram
* Viber
* Live Agent

It's all in the "Notification" of your Action step.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FFlr3ZRmf0cD5gt6sYKcW%2FCapture.PNG?alt=media&amp;token=5e1cf0eb-d14c-4115-8530-026f81166807" alt=""><figcaption></figcaption></figure>

### Email Notification <a href="#email-notification" id="email-notification"></a>

To send an email notification, you will need to setup your email integration first. Check [how to setup email integration](/platform/email-templates)?

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Ffu04mZhf48zWfsgZHFlC%2FCapture.PNG?alt=media&amp;token=9d9645b0-eb84-4164-a62b-8a972b75b923" alt=""><figcaption></figcaption></figure>

Unlike "Send Email" step, email notification only supports text message type. Check "[Send Email](#email-notification)" step in "Email Integration" page if you need more message types like images, buttons, files, etc.

Put the sender's address at "Email Profile" and the receiver's address at "To Email".

### Slack Notification <a href="#slack-notification" id="slack-notification"></a>

Similarly, to send a slack notification, you will need to setup your slack integration first. Check how to setup slack integration?

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F72ETEB7KGzMs6M3M3Qbc%2FCapture.PNG?alt=media&amp;token=58abfa01-c9ca-4497-a6a5-2b2e23316ab3" alt=""><figcaption></figcaption></figure>

In the pop-up window,

1. choose a Webhook
2. choose a default channel or name another one
3. pick a message type, add as many as needed
4. for example, "Section" type, put your message at area 4 and add photo or field value if needed
5. use the "Test" button to send the message for test and adjust accordingly
6. once finished, click "Save".

### SMS Notification <a href="#sms-notification" id="sms-notification"></a>

Setup a sender number before you make a SMS notification. Check how to add [phone number](/platform/connect-to-channels#whatsapp-sms-voice-bot)?

You can use the "generate random text" operation with text variable to get a random security code and send out for verification purpose.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBIMeRRMn5KX1aSPtRBkJ%2FCapture.PNG?alt=media&amp;token=37827937-fae9-4f13-a497-c6f1a6c0255d" alt=""><figcaption></figcaption></figure>

Choose a sender and receiver, put message and here you go!

### Make Phone Call <a href="#make-phone-call" id="make-phone-call"></a>

Same as SMS notification, a phone number is needed to make a phone call. Check how to add phone number?

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPGtfvu024gJEhpscwrFX%2Fnotification5.c0ce6875.png?alt=media&amp;token=f109a530-db7d-4696-98ec-d4247a1e5574" alt=""><figcaption></figcaption></figure>

Moreover, you must make a voice flow connected to this phone number otherwise your voice bot don't know what to say.

### Ref Payload <a href="#ref-payload" id="ref-payload"></a>

**Ref payload** is used to passing on a message to the voice bot.

For example, set the payload to "support" here in the notification action and in your voice flow:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCvOrYMc3bVk6j7cRveEk%2Fnotification6.9db9e112.png?alt=media&amp;token=bb3a53cc-7463-44a2-a690-e29c0582fb67" alt=""><figcaption></figcaption></figure>

Goto the **Start Step** in your **Main Flow** and save the ref payload in a custom field.

{% hint style="info" %}
You can pass on a JSON variable in the ref payload but base64 encode and decode are needed before and after this. See base64 operations in **Set Custom Field**.
{% endhint %}


# Condition Step

With the Condition step, you can go to different steps/sub flows depends on conditions.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBZbx1hphoWqzxhPptEeZ%2Fcondition1.774d8436.png?alt=media&amp;token=44d403a6-0e36-487e-b210-dfeee52539c4" alt=""><figcaption></figcaption></figure>

In your Condition step, click on "+ Add Condition Group" to set at least one condition group. "Otherwise" group is always there.

You can make as many condition groups as you need. The matching start from the top to the bottom, once a group matched, the system goes to a named step. When it fails to match all condition group, the "Otherwise" group will take over it. So it's always a good practice to name a step in the "Otherwise" group even it is very unlikely to be used.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvT81NimWWA652gSiYKos%2Fcondition2.893ff9da.png?alt=media&amp;token=96debbe1-c01d-4777-9d9a-0a776f924723" alt=""><figcaption></figcaption></figure>

Another important thing to know is the difference between "All conditions" and "Any conditions". It is sitting at the upper right corner of each condition group.

You can list more than 1 condition in a condition group. When you do, it matters whether you choose "All" or "Any".

"All Condition" means to get this group matched, you will need to have all the conditions matched in the group.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbURjaue6qLKVhNbWofA4%2Fcondition3.6595780e.png?alt=media&amp;token=c8eab12b-439e-48ac-b053-371481066567" alt=""><figcaption></figcaption></figure>

However, to get a group with "Any Condition" matched, you only need to have one of the conditions matched.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtMWnJBb69MWTOtgqHeCd%2Fcondition4.7106b88e.png?alt=media&amp;token=abd83ad9-5cbd-455a-9eee-cc773002c543" alt=""><figcaption></figcaption></figure>

### Tag & Sequence Condition <a href="#tag-sequence-condition" id="tag-sequence-condition"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMFSqBuvgxiPDYZmwBHEy%2Fdownload%20(67).png?alt=media&amp;token=254c4245-e21b-41e6-a7fc-7b3ed119d5bd" alt=""><figcaption></figcaption></figure>

For tag and sequence condition, you can choose "in" or "not in" from the "Operator". Choosing multiple tags/sequences is allowed.

### Text Variable Condition <a href="#text-variable-condition" id="text-variable-condition"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWp4CTICW8f4w3BhwD67q%2Fdownload%20(68).png?alt=media&amp;token=8163db69-31ff-420f-a747-5bc6625b3827" alt=""><figcaption></figcaption></figure>

These are all the operators for text condition.

For "**has any value**" and "**is empty**" of all variable types, when you clear a variable, the variable becomes empty. Thus, "has any value" is false and "is empty" is true for this variable.

### Number Variable Condition <a href="#number-variable-condition" id="number-variable-condition"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpvnhJorDERQJUsdo89Ym%2Fcondition7.45b2d1df.png?alt=media&amp;token=ec56e5ca-4892-44bf-a59b-4bc66739396f" alt=""><figcaption></figcaption></figure>

These are all the operators for number condition.

### DataTime Variable Condition <a href="#datatime-variable-condition" id="datatime-variable-condition"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8LhSBoO4wLSHk2dO3l0b%2Fdownload%20(69).png?alt=media&amp;token=c47cd1e1-7113-4852-8dd5-28346062215e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FePLFBqzgjdXnPinR86HJ%2Fdownload%20(70).png?alt=media&amp;token=89354d40-3a0b-4bc0-bd4c-1ebd11837e5f" alt=""><figcaption></figcaption></figure>

These are all the operators for DateTime condition.

Note that you will need to put "value" always as the correct format "yyyy-MM-dd HH:mm:ss" no matter which displayed format you choose for that variable.

{% hint style="info" %}
"**before/after**" is different from "**time before/after**". The former compare the whole **datetime** value while the latter only compare the **time** value.
{% endhint %}

### JSON Variable Condition <a href="#json-variable-condition" id="json-variable-condition"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcwCwJPFxbyH1zewSfCXb%2Fcondition10.e0e406e9.png?alt=media&amp;token=191b9e5f-8d13-4c8a-a5b7-6aee59348ca2" alt=""><figcaption></figcaption></figure>

These are all the operators for JSON condition.

{% hint style="info" %}
The very last 3 operators, "has item matched with ...", require the JSON to be a list of variables, not a list of JSON. In other words, if your JSON is storing a list of normal variables, these 3 operators work. They won't work for a JSON storing a list of JSON.
{% endhint %}

### Custom Input <a href="#custom-input" id="custom-input"></a>

Custom input is built for compare values in JSON variable. Search "custom input" in the **if** field:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzoGe2e6pKqnWg1LiVqLb%2Fdownload%20(72).png?alt=media&amp;token=d79f8f25-64f9-4025-bcf2-1307757a6e9b" alt=""><figcaption></figcaption></figure>

Pick a value from a JSON, then you can compare it as you use the text variable condition.

### Math Formula <a href="#math-formula" id="math-formula"></a>

![condition](https://i.imgur.com/sHDee6i.png)

With this operation, you can now do formula calculation directly in the Action Step - "Set Variable Value" and Condition Step - "Value".

Math operations and function supported:

+, -, \*, e, pi, PI, abs(), min(), max(), ceil(), floor(), log(), pow(), round(), sqrt(), sin(), cos(), tan()

{% hint style="info" %}
**Please note that**

If the formula is invalid, the system will return 0 to number variable and empty to text variable.
{% endhint %}


# Split Step

With Split step, you can go to different steps/flows depends on probability.

Split step can be used to build many interesting functions, like

* changing speeches rather than same responses all the time
* testing your new functions with just a small group of clients to get feedback
* or making a fun lottery!

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FSOUyv4UVgRre4AGkXxEa%2Fdownload%20(73).png?alt=media&amp;token=06461d82-4b01-4b81-887a-be74c48d9d62" alt=""><figcaption></figcaption></figure></div>

In your Split step,

1. click "+ New Variation", add more than 2 variations
2. change variation title if needed
3. adjust weights as you want
   * directly put percentage numbers like 30 and 70 then you will get 30% and 70%
   * alternatively, put weights like 1 and 2 and let the system calculates the percentages 33% and 67% for you
4. select next steps for each variation
5. save the picked variation for later use if needed

### Usage Examples <a href="#usage-examples" id="usage-examples"></a>

Changing Speeches:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Ftn4JJcHaoN9Ga7nEBTiv%2Fsplit3.ba702983.png?alt=media&amp;token=d0b96b70-fc5e-4657-8413-2c23215c9136" alt=""><figcaption></figcaption></figure>

Testing new Functions & Get Feedback:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXaEY9CFpouzxbDk5Ggfg%2Fsplit4.03a7fc4e.png?alt=media&amp;token=a80c8de1-3c95-4dae-a06f-f3229ee2cc5b" alt=""><figcaption></figcaption></figure>

Fun Lottery:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtLWOPylHls3YLUsWkpEQ%2Fsplit1.8b9e952e.png?alt=media&amp;token=77f8868c-1b9b-462c-9d4f-6ce3ec37b285" alt=""><figcaption></figcaption></figure>


# Go To Step

"Goto Step" helps you jump to another step in the current subflow or jump to the start point of another subflow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkYncldx1TUgEJQc5FlCu%2Fgoto3.be4463a0.png?alt=media&amp;token=e9684816-dfdd-4444-8a52-320185f7efa1" alt=""><figcaption></figcaption></figure>

Create new subflow directly, or choose an existing one. You can only jump to a step in the current subflow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNrZgGAsthKUUbBD2lKIT%2Fgoto4.ce510ca8.png?alt=media&amp;token=8f961b2f-b4b7-4076-82dd-eee9196af27b" alt=""><figcaption></figcaption></figure>

Goto Step is going to make your flow look more organized and clear to understand.

Before using Goto:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJq3ntgPn0kYSVSLYcUKb%2Fgoto1.b2a5cf98.png?alt=media&amp;token=7dd4a29b-2130-4391-8cff-bdb0909a63ee" alt=""><figcaption></figcaption></figure>

After using Goto:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fzb4OwXSQ5fd1sAKzRIUl%2Fgoto2.d9243c90.png?alt=media&amp;token=1351e3fd-9f13-4082-b4cd-fad2679b22ef" alt=""><figcaption></figcaption></figure>


# Sub Flows


# Sub Flow

&#x20;"Sub Flow" organizes steps in the whole chatbot/flow.

### Create Sub Flow <a href="#create-sub-flow" id="create-sub-flow"></a>

Navigate "Flows" from the sidebar, click "+ New Sub Flow", choose a flow type, give a name and save.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbVaS64Xg3ixfl5vgCgO0%2FCapture.PNG?alt=media&amp;token=37fcf213-dacf-48fb-92d0-7d8e21b5b24a" alt=""><figcaption></figcaption></figure>

| Flow Type      | Description                                                |
| -------------- | ---------------------------------------------------------- |
| Normal Subflow | Varies in channels, basic subflow                          |
| Workflow       | work at the backend without influencing the front end task |
| Function Flow  | perform repetitive tasks                                   |

Click on the subflow to enter and start editing it. For more operations, click on the 3-dots icon. The **Sub Flow Ns** is a unique subflow ID in the chatbot.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqsLqlDkQnufFRVUXT3jf%2Fdownload%20(34).png?alt=media&amp;token=43c0ea87-afae-424e-b423-b6f170c1a7e3" alt=""><figcaption></figcaption></figure></div>

Folders are used to organize subflows.

### Move Steps to Sub Flow <a href="#move-steps-to-sub-flow" id="move-steps-to-sub-flow"></a>

To move a step or multiple steps to another subflow, select the steps first, then you can either

* use the **Move to Subflow** button in the editing panel, or
* copy and paste them

To select multiple steps, hold the **Shift** key, click and drag to cover the steps.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8mz2ecBUyG2h8DNHxLIW%2Fworkspace3.ce17a72e.png?alt=media&amp;token=272bb201-a9ee-4298-a7b8-791974565c33" alt=""><figcaption></figcaption></figure>

Alternatively, hold **ctrl** key and click steps one by one:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnoDatqtvRo8vygsHdFwZ%2Fworkspace4.58de402e.png?alt=media&amp;token=105879d8-89d3-4974-9122-fb6d3f3a7003" alt=""><figcaption></figcaption></figure>

After selecting multiple steps, editing panel shows. "Select sub flow", then click "Move to sub flow".

{% hint style="info" %}
You will need to select at least 2 steps to create a canvas or move them to other sub flows. So if you have only 1 step to move or put in a canvas, try adding a temporary step to help and discard it after that.
{% endhint %}

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F39GO63zHPl1E8mv9lTtW%2Fsubflow1.ff69be06.png?alt=media&amp;token=5e377fa3-8d17-4ea7-b5b1-e2fa2d7ee490" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
If you find yourself unable to click "Move to sub flow" after choosing a sub flow, perhaps you included the green **Start Step** in your selection. Because the green start point of any subflow can't be moved to other subflows. You can solve this issue by de-selecting the green start point.
{% endhint %}

To copy and paste, use **Ctrl + C** to copy the selected steps, then go to the destination subflow, use **Ctrl + V** to paste there.

### Call Sub Flow <a href="#call-sub-flow" id="call-sub-flow"></a>

After creating subflows, you can then call a subflow via:

* Goto Step
* Keyword
* Sequence
* Broadcast
* Facebook Widget
* Comment Growth Tool
* Triggers
* Live Chat
* Menu Items
* Inbound Webhooks
* API call


# Workflow

A workflow can be considered as a backend flow where you can automate tasks such as adding or removing tags, set custom field variables, do external API calls.

This way the conversation you have with the subscriber will not be affected by needing to wait to apply all those actions and the experience is as smooth as possible for that end-user.

### Create Workflow <a href="#create-workflow" id="create-workflow"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9DSrLbuKPU2MaRPqlEQ2%2FCapture.PNG?alt=media&amp;token=1f8db37f-437c-4d47-bef3-8b15692addaf" alt=""><figcaption></figcaption></figure>

To create a workflow just go to the flow overview by selecting **Flows** from the left-hand menu.

Then press the button **+ New Sub Flow**

Select the workflow flow type then give it a name. Once done press the button Create to start creating your workflow.

Once you create your flow and you end up in the flow builder you will notice that you will have access to fewer blocks than when selecting a regular or function flow.

Available blocks are:

* Action
* Condition
* Split
* Send Email

As mentioned this flow is meant to create a backend flow that you can trigger from any other flow inside your chatbot to handle system tasks like adding tags, set custom fields, but also sending emails.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoRaqVgZ6KXQFH1JP7QBh%2Fworkflow2.deebfc26.png?alt=media&amp;token=6100c824-dd8c-4c1d-96c6-b90c02ef307c" alt=""><figcaption></figcaption></figure>

### Workflow Example <a href="#workflow-example" id="workflow-example"></a>

Let’s take an example of how a workflow can be used.

A user signs up with an email and or phone number and you want to sync this information with your CRM platform of choice.

So soon as you grabbed the credentials from the user you can make an API call using the external request block inside of the action module.

You would also want to tag the user inside the chatbot for completing the onboarding step. After done we send an email notification to an admin that a new lead has been created to follow up on.

A workflow can then look something like this;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXitD1tIe0Y25Iph6EfC0%2Fworkflow3.7ac2b256.png?alt=media&amp;token=1df79973-4ba2-4d66-a944-1807f82e4e51" alt=""><figcaption></figcaption></figure>

If you were to incorporate this into the flow that has the actual conversation it might become an issue as the conversation could be on hold for several seconds or more to finish all these system processes. And you might lose the user as he or she thinks the conversation is done.

### Trigger Workflow <a href="#trigger-workflow" id="trigger-workflow"></a>

It is very simple to trigger the above workflow inside of any other flow that you build.

Just insert an action block, go to *advanced actions*, then choose *trigger workflow* at the bottom

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcZZCz4KPr8W1ypMOr1ES%2Fworkflow4.6a951507.png?alt=media&amp;token=bf6db7a9-fe99-42f4-87be-d0ee3b8ebc0e" alt=""><figcaption></figcaption></figure>

You can then select any workflow you created. This workflow will then be processed in the backend while the conversation with the user will not be affected and continue without any delay.


# Function Flow

A function flow is a fantastic way of preventing you to create repetitive flows over and over again. Think of when you need ask for emails or phone numbers.

With a function flow you will be able to send the user to that one flow, then once completed the user can continue exactly from the point they left off in the previous flow.

### Create Function Flow <a href="#create-function-flow" id="create-function-flow"></a>

To create a function flow go to **Flows** from your left-hand menu, then press the button **+ New Sub Flow**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTWwaKUmg179eATvBgdVY%2FCapture.PNG?alt=media&amp;token=579519be-5d74-4e85-be00-fe6d27c21692" alt=""><figcaption></figcaption></figure>

Select the **Function flow** type and name your flow. Once done press the button **Create** and you will be taken to the flow builder.

### Function Flow Example <a href="#function-flow-example" id="function-flow-example"></a>

Once inside the flow builder and wanting to insert a new block you will see that you have all the blocks at your disposal just like in a regular flow, and one extra called **Output**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKuAKlcMOeaOZv9fIXfOP%2Fworkflow6.6f06e699.png?alt=media&amp;token=859c6fd0-586f-4958-bfd4-d741f6153120" alt=""><figcaption></figcaption></figure>

This output is what makes this function flow so unique as it gives you the ability to send the user back to the previous flow (if you like) exactly where he or she left off.

Let’s create an example where we ask the user for an email and add an output module to it;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F5QcCu2QmUb3XaoWncX0w%2Fworkflow7.4ab17013.png?alt=media&amp;token=c2c01ca1-3be9-49b4-8d6e-bb41946e4a5e" alt=""><figcaption></figcaption></figure>

As you can see a simple flow but with the benefit this is the only function of the flow, asking for an email.

### Call Function Flow <a href="#call-function-flow" id="call-function-flow"></a>

After this flow is finished you can return the user to the previous flow to continue the conversation there if you like.

Let us show you how that could look like;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fh3XQywqqn8Z57UW3k0AJ%2Fworkflow8.e04c5761.png?alt=media&amp;token=d128ef55-0d13-4afe-bde6-a135f283ddc9" alt=""><figcaption></figcaption></figure>

There are many use cases for function flows so you can get as creative as you like.

### Multiple Outputs <a href="#multiple-outputs" id="multiple-outputs"></a>

Multiple **Output Steps** are supported in your Function Flow.

When you call a Function Flow with multiple outputs, the titles of those outputs will show in the Goto Step and you can handle it accordingly.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FAHwcSs4VK2L1URAXf3Ve%2Fdownload%20(37).png?alt=media&amp;token=191c0e69-1511-43e8-b669-28b18c448307" alt=""><figcaption></figcaption></figure></div>


# OpenAI | ChatGPT

{% hint style="success" %}
Video Series Coming Soon 🚀
{% endhint %}

Interact using AI. From replying to users to generating images, you can use OpenAI for a variety of tasks.&#x20;

Integrating OpenAI's ChatGPT with Flochat can provides numerous benefits to businesses looking to engage with their customers across various channels.

With all the channels Flochat support, such as Messenger, Instagram, WhatsApp, Google Business Messenger, Voice, SMS, Viber, Line, VK, web chat, WeChat, and more, connecting with ChatGPT, You can offer businesses AI-powered conversational capabilities that can understand and respond to customer queries in a human-like manner, improving the customer experience and increasing engagement.

ChatGPT's advanced natural language understanding and generation capabilities enable our chatbot to understand the context of the conversation and offer personalised responses that are relevant to customer queries.

Combined with our multichannel capabilities, businesses can engage with their customers across their preferred communication channels, enhancing their overall experience. The result is improved customer satisfaction, increased engagement, and streamlined customer support, all of which can help businesses grow and succeed.

Flochat offers native integration with OpenAI, which enables users to set up the complex flow with just a click of a button.

Let us first see how we can establish a connection between OpenAI and Flochat.

### Bridging Connection with OpenAI Account <a href="#bridging-connection-with-openai-account" id="bridging-connection-with-openai-account"></a>

1\. Visit [https://platform.openai.com](https://platform.openai.com/)

2\. Login using your credentials.

3\. Click on top-right corner on the “Personal” tab.

4\. From here, you will be able to generate an api key.

You will only be able to see your api key once, so you can save the copy to a safe place.

5\. Paste your API key inside Flochat and click “Save” to establish the connection.

Your account has successfully been connected with Flochat.

### OpenAI Native Actions <a href="#openai-native-actions" id="openai-native-actions"></a>

Flochat gives a lot of actions with OpenAI which users can use for their needs.

We will now discuss them in detail one by one.

### **Create Text Completion** <a href="#create-text-completion" id="create-text-completion"></a>

Text completion offers the functionality of sending prompts to OpenAI in textual form and based on the prompt receiving an answer.

#### **Input:** <a href="#input" id="input"></a>

Prompt: This is your main input for which you want the AI to give you an answer or output of. This can be a question, an instruction, etc.

Model: The model you want to use inside OpenAI for the task. By default, text-DaVinci-003 has been selected.

Max Tokens: Each task inside OpenAI consumes tokens. These tokens can be replenished using credit. This field puts a limit on the maximum number of tokens you want to use for a particular task.

Temperature: This acts as an accuracy gauge where higher values give more random answers and lower values give more deterministic and focused answers. It defaults to 1

Presence Penalty: This value makes OpenAI use unique phrases and texts when completing a task. The higher the value, less repetitive the words. It defaults to 0.

Number of Completions: The number of times you want the AI to generate a response based on your prompt. The higher value will result in more responses. It defaults to 1 in order to avoid the consumption of tokens.

Best of Completions: This returns the best possible response(s) for your prompt. It defaults to 1. This works with the Number of Completion field to choose the best possible answer from a group of responses.

#### **Response:** <a href="#response" id="response"></a>

#### Map the response to custom field <a href="#map-the-response-to-custom-field" id="map-the-response-to-custom-field"></a>

You can select the text under the choices, and then you can see the JSON Path selected, and then you can save the response into your own user custom field, and then use this response in your flow builder.

#### **Sample Response Data** <a href="#sample-response-data" id="sample-response-data"></a>

`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "id": "cmpl-6zchlUy0OiAjX91LHOPBcZjuXaDgE", "object": "text_completion", "created": 1680144809, "model": "text-davinci-003", "choices": [ { "text": " 1. Understand Your Target Audience - Before you begin any marketing campaign, it’s important to have a clear understanding of who you’re targeting with your message. Researching and understanding your target audience will help you create campaigns specifically tailored to their interests. 2. Leverage Social Media - Social media has become one of the most effective ways to communicate with your target audience. Utilizing social media channels such as Facebook, Twitter, and Instagram can help you build", "index": 0, "logprobs": null, "finish_reason": "length" } ], "usage": { "prompt_tokens": 4, "completion_tokens": 100, "total_tokens": 104 } }`

Id : The id of the text completion. A unique value.

Object : The action/task you gave to OpenAI. In our case “text\_completion”

Created : A date-time field that tells the instance of the creation of the response. It is in Unix timestamp format.

Finish reason : The reason for the stoppage of the said task.

Prompt tokens : The number of tokens used to complete the task.

#### **Best Practices:** <a href="#best-practices" id="best-practices"></a>

Sometimes the completed response you get back seems to be cut off. This is due to the lack of the number of tokens required for the completion of the task. Simply adjusting the value of Max tokens inside the input fields will fix this issue.

It is also advised to adjust values like temperature, the number of completions, best of completions, etc to your use case by means of split testing. Every use case is unique and you should want the best possible utilisation of the resources available.

### **Image Generation** <a href="#image-generation" id="image-generation"></a>

Image Generation is used to generate images based on the user-input prompts. This feature will generate the best possible image that matches your given prompt.

#### **Input:** <a href="#input-.1" id="input-.1"></a>

Prompt : This is your main input for which you want the AI to generate an image for you. This can be a question, an instruction etc.

Number of Images : The number of images you want the AI to generate for you. It is default to 1

Size : The dimensions you want the image to be. OpenAI support three sizes which are:&#x20;

&#x20;          512x512&#x20;

&#x20;          256x256

&#x20;          1024x1024

#### **Response:** <a href="#response-.1" id="response-.1"></a>

#### **Sample Response Data** <a href="#sample-response-data.1" id="sample-response-data.1"></a>

`1 2 3 4 5 6 7 8 { "created": 1680145479, "data": [ { "url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-2FEbJIRL7GXfKmGw2BT9wh9b/user-nk6UUN7L9nFqddzGEw67uTMonD/img-FhZpxMrCbiDBR4O62e7pPF08.png?st=2023-03-30T02%3A04%3A39Z&se=2023-03-30T04%3A04%3A39Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-03-29T17%3A40%3A49Z&ske=2023-03-30T17%3A40%3A49Z&sks=b&skv=2021-08-06&sig=4DF0dw/peG7FSVMUml4ShuQP98T0xECW1gE%2BeutdRAw%3D" } ] }`

Created : A date-time field which tells the instance of creation of the response. It is in Unix timestamp format.

Url : The public URL for your image(s).

#### **Best Practices:** <a href="#best-practices-.1" id="best-practices-.1"></a>

Generating Images consume more computational power and hence the replies can be a delayed based on the prompts you give.

AI is a developing field and hence the images produced can be quite inaccurate given the complexity of the prompts provided. Hence finding the correct prompt complexity can sometimes be a challenge.

### **Speech to Text** <a href="#speech-to-text" id="speech-to-text"></a>

Speech-to-text action is used when you want to convert audio input into text. This has variety of use cases such as implementation in IVRs.

#### **Input:** <a href="#input-.2" id="input-.2"></a>

File Url : This is the URL for the audio that you want to convert to text. Make sure that the url is a public hosted url ending with audio formats such as mp3. mpeg etc

Please note the url need to start with https\:// and end with mp3, or mp4, mpeg, mpga, m4a,wav, webm

Language : The language you want the speech to be converted into. We use ISO-639-1 format which means you need to put languages as ‘en’, ‘es’ etc.

#### **Response:** <a href="#response-.2" id="response-.2"></a>

#### **Sample Response Data** <a href="#sample-response-data.2" id="sample-response-data.2"></a>

`1 2 3 { "text": "Welcome to Rensen. This is a test to see if everything works well. And if the IVR can guide you to your work." }`

Text : The text which is converted from the speech.

#### **Best Practices:** <a href="#best-practices-.2" id="best-practices-.2"></a>

You can convert speech to text quite accurately using this feature. It is considered a best practice to provide the audio in the same language as that of the desired output for more accurate results and latency.

### **Translate Audio to English** <a href="#translate-audio-to-english" id="translate-audio-to-english"></a>

Translate audio to English action is used when you want to convert audio input into text in english language. This has a variety of use cases such as implementation in IVRs.

#### **Input:** <a href="#input-.3" id="input-.3"></a>

File Url : This is the URL for the audio that you want to convert to text. Make sure that the url is a public hosted url ending with audio formats such as mp3. mpeg etc

Please note the url need to start with https\:// and end with mp3, or mp4, mpeg, mpga, m4a,wav, webm

#### **Response:** <a href="#response-.3" id="response-.3"></a>

#### **Sample Response Data** <a href="#sample-response-data.3" id="sample-response-data.3"></a>

`1 2 3 { "text": "Welcome to Rensen. This is a test to see if everything works well. And if the IVR can guide you to your work." }`

Text: The text which is converted from the speech.

#### **Best Practices:** <a href="#best-practices-.3" id="best-practices-.3"></a>

Experimenting with different formats of audio can provide more (or less) accurate results. This is simply due to the quality of the audio provided so make sure you split test with different formats to achieve the best possible format for your use case.

### **Create Chat Completion - ChatGPT** <a href="#create-chat-completion-chatgpt" id="create-chat-completion-chatgpt"></a>

Chat completion offers a functionality of sending prompts to OpenAI in textual form and based on the prompt receive an answer. This is similar to text completion action but it uses ChatGPT which is 10x faster and cheaper as well.

#### **Input:** <a href="#input-.4" id="input-.4"></a>

System Message : This is an optional field and is used to provide additional context about you or your business when completing chats.

You can set up a detailed background information like this if you are building restaurant chatbot:

System: You are a steak restaurant helpful assistant. You will handle customer support, and guide the user and book reservations. The restaurant opening hours is 9am to 8pm Monday to Saturday, No pets allowed. Always offer the coupon code if you see it’s good timing to do so.

This will allow you to easily set up background information about the chatbot, and it can serve your client based on the information you instructed.

Message : This is your main input for which you want the AI to give you an answer or output of. Usually this is the user’s response. This can be a question, an instruction etc. You can add “user:” as a prefix to your prompt in order to provide more context to the AI for eg:

&#x20; “user : will it rain today?”&#x20;

It will also work if you don’t add “user” in front of the response. You can use our system field like {{last\_text\_input}}

Remember History: If selected “Yes”, the chat history between user and assistant will be saved in a system field to be used for later if needed.

The openAI action response will be automatically saved into assistant role. You don’t need to do anything.

Also, we have introduced a new system JSON field: {{openAI}} which will have all the chat history with the user:

You can find the openAI system field from your user profile. This JSON will save the system set up, and all the chat history.

Please note, our JSON field size limits is 20,000, if the chat history have more than 20,000 characters, we will delete from the oldest chat history in order to maintain the chat history within the limits.

Model : The model you want to use inside ChatGPT for the task. By default gpt-3.5-turbo has been selected.

Max Tokens : Each task inside ChatGPT consumes tokens. These token can be replenished using the credit. This field puts a limit on the maximum number of tokens you want to use for a particular task.

Temperature : This acts as a accuracy gauge where higher values give more random answers and lower values give more deterministic and focused answers. It is default to 1

Presence Penalty : This value makes ChatGPT use unique phrases and texts when completing a task. The higher the value, less repetitive words. It is default to 0.

Number of Completions : The number of times you want the AI to generate a response based on your prompt. The higher value will results in more responses. It is default to 1 in order to avoid consumption of tokens.

Best of Completions : This returns the best possible response(s) for your prompt. It is default to 1. This works with Number of Completion field to choose the best possible answer from a group of responses.

#### **Response:** <a href="#response-.4" id="response-.4"></a>

#### **Sample Response Data** <a href="#sample-response-data.4" id="sample-response-data.4"></a>

`1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 { "id": "chatcmpl-6zef5zEUdDzTx8VKu2r4gkIJfVcBE", "object": "chat.completion", "created": 1680152331, "model": "gpt-3.5-turbo-0301", "usage": { "prompt_tokens": 18, "completion_tokens": 100, "total_tokens": 118 }, "choices": [ { "message": {...}, // 2 keys "finish_reason": "length", "index": 0 } ], "messages": [ { "role": "user", "content": "can you help me with planting a mango tree?" }, { "role": "assistant", "content": "Of course! Here are some steps to plant a mango tree: 1. Choose a spot: Mango trees need plenty of sunlight and well-draining soil. They also need protection from strong winds, so choose a spot that's sheltered. 2. Prepare the soil: Mango trees prefer slightly acidic soil, with a pH between 5.5 and 7. If your soil is too alkaline, add sulfur or peat moss to lower the pH. If it's too acidic, add lime" } ] }`

Id : The id of the text completion. A unique value.

Object : The action/task you gave to OpenAI. In our case “text\_completion”

Created : A date-time field which tells the instance of creation of the response. It is in Unix timestamp format.

Choice -> Content : The content field inside the choice object contains the answer to your prompt.

Message: This is a JSON for complete conversation that has happened between the user and the assistant.

#### **Best Practices:** <a href="#best-practices-.4" id="best-practices-.4"></a>

Chat completion action enables you to provide JSON input as well hence you can save the complete conversation between the users and the assistant in a JSON to give more focused and contextual replies related to that conversation.

Since chat completion takes more input, the token consumption can be higher that text completion.

### User cases: ChatGPT <a href="#user-cases-chatgpt" id="user-cases-chatgpt"></a>

#### **How to fine tune ChatGPT for your business** <a href="#how-to-fine-tune-chatgpt-for-your-business" id="how-to-fine-tune-chatgpt-for-your-business"></a>

If you use openAI embedding along with ChatGPT, you can train the chatGPT to answer your business related questions with complete ease!

Check the video below to learn how to implement this in your own business.

#### **Generate the chatbot flow using A.I** <a href="#generate-the-chatbot-flow-using-a.i" id="generate-the-chatbot-flow-using-a.i"></a>

Have you ever imagined that with a simple instruction like “create a flow to order pizza” and then Flochat can generate the whole flow automatically for you.

Everything is done with ChatGPT & Flochat.

Check the video below to explore this feature to get you started easily with Flochat.

#### Power up your live chat with the AI assistant <a href="#power-up-your-live-chat-with-the-ai-assistant" id="power-up-your-live-chat-with-the-ai-assistant"></a>

Have you ever think that you can use smart A.I assistant to using openAI embedding to generate the suggestion replies automatically?

This will increase your customer support efficiency and lower your customer support cost.

#### OpenAI Training Reply to Facebook and Instagram post comments <a href="#openai-training-reply-to-facebook-and-instagram-post-comments" id="openai-training-reply-to-facebook-and-instagram-post-comments"></a>

Have you ever thought to use openAI to reply to your Facebook, Instagram post comments automatically, and most importantly the reply will be highly relevant and accurate to your own business.

The reason is that we are using openAI embedding to get the highly relevant answers from your own business database, and this can be done automatically, learn how to set up from the video below:

### **Clear Remembered Chat History** <a href="#clear-remembered-chat-history" id="clear-remembered-chat-history"></a>

Clear remembered history is used to delete or clear the system field where the chat history for chatGPT is stored.

This action will help you to reset the chat history.

The system field has a max character limit of 20000 characters after which it deletes the oldest key-pair value from the JSON in order to make room for newer values

### **OpenAI Embeddings & Building your Knowledge Base** <a href="#openai-embeddings-and-building-your-knowledge-base" id="openai-embeddings-and-building-your-knowledge-base"></a>

OpenAI gives you the ability to provide a knowledge base of your use case or business for the AI to generate responses from. This enables the AI to give more accurate, contextual as well as particular answers instead of filtering them from the internet.

#### **Create An Embedding:** <a href="#create-an-embedding" id="create-an-embedding"></a>

To create an embedding, go into the Integrations and select OpenAI

Click on “New Embedding”

Type : This is an optional field. This is used to classify embeddings based on a certain context. Is used as a filter when there are a large number of embeddings associated. Always better to provide this field as it gives more context and becomes easier for AI to filter through.&#x20;

Heading: The topic of the embedding that you have created. The title or summary.

Text : This is the text or main body of the embedding. The max character limit is 1000. You can put the details of the topic here for the AI to generate the response from.

#### **Importing Embeddings:** <a href="#importing-embeddings" id="importing-embeddings"></a>

Instead of manually creating embeddings you can create them in bulk by importing them as a CSV file.

Click on the drop-down arrow beside “New Embedding” and click on “Import CSV”

Now import the CSV file containing the embeddings and your embeddings will be created. If you have special characters like : è à ì ù, please select to “Import from csv without preview”

Make sure that the first rows of all columns should be the input fields name such as type, heading, text etc. and none of them should start with a capital letter.

#### **Embedding Match & Completion Actions** <a href="#embedding-match-and-completion-actions" id="embedding-match-and-completion-actions"></a>

The embedding match action is used to match the entered prompt with best-matching embedding from the knowledge base

**Input:**

Input : This is where you will input or map the prompt you want to match the embedding to.

**Response:**

Embedding : The heading of the embedding the prompt is best matched to.

Text : The text of the embedding the prompt is best matched to.

Input : The prompt that you input for embedding search.

Score : This is the % of the match between prompt and the embeddings available. You can use this score determine whether the following prompt should be used for completion or is not sufficient and will give inaccurate answers.

It is observed that a score of 0.79 and above gives the best possible embedding match. However this is an empirical value and you used split test for your use case in order to obtain best possible answers.

The embedding match and completion action is used to match the entered prompt with best matching embedding from the knowledge base and then generate the response using that particular knowledge base.

**Input:**

Input : This is where you will input or map the prompt you want to match the embedding to.

Introduction : This is used to provide more context to the prompt making the prompt more accurate and helps in raising the embedding match score.

**Response:**

**Sample Response Data**

`1 2 3 4 5 6 7 8 9 10 { "status": "ok", "result": { "heading": "Free trial", "text": "Flochat offer 14 days free trial. No credit card required, you can access to all the pro features. You can sign up here: https://www.flochat.ai", "score": 0.903164959234692, "input": "Free trial for Flochat", "completion": " Yes, Flochat offers a 14-day free trial. No credit card is required and you can access all the pro features. You can sign up here: https://www.flochat.ai." } }`

Embedding : The heading of the embedding the prompt is best matched to.

Text : The text of the embedding the prompt is best matched to.

Input : The prompt that you input for embedding search.

Score : This is the % of the match between prompt and the embeddings available. You can use this score determine whether the following prompt should be used for completion or is not sufficient and will give inaccurate answers. It is observed that a score of 0.79 and above gives the best possible embedding match. However this is an empirical value and you used split test for your use case in order to obtain best possible answers.

Completion : This is the output or the completion of the prompt the user input.

**Using openAI embedding to reply your Facebook & Instagram comments**

If you are running ads or have viral post on your Facebook page or Instagram. You may not have the time to attend those comments.

You don’t want to always reply some generic replies, and also you want to the reply is highly relevant to your business questions.

That’s why you need to use openAI embedding to provide highly relevant replies automated.

Check the video below to learn how to do it with Flochat:

### Video tutorial for openAI integration & ChatGPT integration <a href="#video-tutorial-for-openai-integration-and-chatgpt-integration" id="video-tutorial-for-openai-integration-and-chatgpt-integration"></a>

We have prepared series to teach you how to build your first openAI powered chatbot. You can learn from our learning center.

#### Flochat learning centre: <a href="#uchat-learning-centre" id="uchat-learning-centre"></a>

OpenAI integration:

ChatGPT integration:

#### OpenAI Integration mini course <a href="#openai-integration-mini-course" id="openai-integration-mini-course"></a>

**OpenAI Introduction**

**OpenAI Connecting OpenAI with Flochat**

**OpenAI text completion**

**OpenAI -AI image generations**

**OpenAI -Using embedding to build your business knowledgebase**

**OpenAI Training Reply to Facebook and Instagram post comments**

#### ChatGPT integration mini course <a href="#chatgpt-integration-mini-course" id="chatgpt-integration-mini-course"></a>

**OpenAI & ChatGPT integration with Flochat**

**ChatGPT is Live!!!**

**How to fine tune ChatGPT for your business**

**Create chatbot flows with ChatGPT!**

**Power up your live chat with the AI assistant**

**ChatGPT updates System message and saving chat history**


# Connect OpenAI

## How to set up your OpenAI account and connect to Flochat.

{% embed url="<https://content.app-sources.com/s/35615459206875191/uploads/AI_SERIES/Setting_up_your_openai_account_in_2024-0450639.mp4>" %}

{% embed url="<https://openai.com/>" fullWidth="false" %}

Once you have logged into OpenAI be sure to verify your email:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FuoEx8rhDZHXBok4QbJ5f%2Fverify%20email%20openai.PNG?alt=media&amp;token=cef0cee5-1269-4c83-b0f8-db1035730471" alt=""><figcaption></figcaption></figure>

After you verify the email you will be re-directed to your OpenAI account, from here you need to create/subscribe to a paid plan.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPARzNPZHNOl5OGl9G9gy%2Fopenai%20%20gpt%20plus%20account.PNG?alt=media&amp;token=ef4b2027-3987-4efa-9373-4b3276755b2d" alt=""><figcaption></figcaption></figure>

Now create your API key so that you can add it to Flochat - To do this you will need to verify via phone number to activate the API key settings

{% hint style="danger" %}
Once done, create your API key, name it and save it somewhere safe as you cannot retrieve it again once closed.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTOAlZegL3hopWMfpIkYk%2Fopenai%20verify%20phone%20number.PNG?alt=media&amp;token=69016be1-2889-4dc1-82d8-4ca7e5978d47" alt=""><figcaption></figcaption></figure>

Once you have the API key from OpenAI you can now paste it into Flochat. Navigate to the main dashboard and select the integrations tab:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOdr5PrjOdfDpkcZULJiL%2Fcc%20select%20integr.png?alt=media&amp;token=ce55ed08-3cba-477c-917e-113d24d8f1f3" alt=""><figcaption></figcaption></figure>

Now select the OpenAI integration and paste your key as shown below

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0Ta3iMhvfjThQvgxda89%2Fcc%20pate%20key.png?alt=media&amp;token=50696af6-dfe8-485c-9846-9f28bde79dcb" alt=""><figcaption></figcaption></figure>


# Chat with AI Basics

## We'll start with Chat Completions;&#x20;

Chat completions provide the option to utilize either an open source or a trained AI assistant tailored to your specific content. This feature allows you to send prompts to OpenAI in text format and receive a corresponding response. While similar to text completion actions, ChatGPT, which is used for this purpose, offers a speed and cost efficiency that is ten times faster and more affordable.

### Navigate to chat completions

Within your flow, create an action step following by clicking on the integrations tab. Next select the OpenAI integration. A new window will display above, now click the 'Edit Action'&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWl6TAYfgGR6qHrIMWDIl%2Fcc1.png?alt=media&amp;token=8e8bdbb5-f604-4686-a59b-d5dea174c192" alt=""><figcaption></figcaption></figure>

### Chat completions actions

There are 2 main actions regarding chat completions:&#x20;

* **Create:** Create chat completion
* **Delete:** Clear remembered chat history

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfF0Xl23WjvuCPUGvSGX4%2Fcc2.png?alt=media&amp;token=babdac43-0a66-44ec-9819-6396b13519b7" alt=""><figcaption></figcaption></figure>

### Create Chat Completion

Let's breakdown the components of the create chat completion action:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FN3f1fU83TcCL9uVUm9IE%2Fcc3.PNG?alt=media&amp;token=efaa8413-ac1b-4ca8-8d4d-b190137dab7b" alt=""><figcaption></figcaption></figure>

### System Message

This is an optional field and is used to provide additional context about you or your business when completing chats.

You can set up a detailed background information like this if you are building a support chatbot:

System: You are a 'Insert business name' helpful assistant. You will handle customer support, and guide the user and book demo. our pricing and plans are "insert plan details". Always offer the coupon code if you see it’s good timing to do so.

This will allow you to easily set up background information about the chatbot, and it can serve your client based on the information you instructed.

### Messages

This is your main input for which you want the AI to give you an answer or output. Usually this is the user’s response. This can be a question, an instruction etc. You can add “user:” as a prefix to your prompt in order to provide more context to the AI for eg:

&#x20; “user : will it rain today?”

It will also work if you don’t add “user” in front of the response. You can use our[ system field](https://help.flochat.ai/flow-builder/field-variable#system-field) like {{last\_text\_input}}

### Remember History

If selected “Yes”, the chat history between user and assistant will be saved in a system field to be used for later if needed.

The OpenAI action response will be automatically saved into assistant role. You don’t need to do anything.

Also, we have introduced a new system JSON field: {{openAI}} which will have all the chat history with the user:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHzneT8XAm4FWDKVhbdFl%2FCC4.PNG?alt=media&amp;token=7a40e60f-748b-4394-b949-f4e20d6b7d6a" alt=""><figcaption></figcaption></figure>

### Model

The model you want to use inside ChatGPT for the task. By default gpt-3.5-turbo has been selected.

To add a different model, simply copy and paste from the values displayed.

Now let's look at the lower portion of the chat completion window.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXRvEh84kpGya2XyaHUi2%2Fcclower.PNG?alt=media&amp;token=4d21b8a7-fb46-44e3-a592-b23b393a5af7" alt=""><figcaption></figcaption></figure>

### Functions

Functions are a super easy way to send users to different parts of your chatbot flows and also capture data like email addresses, phone numbers, and other important information using natural language. They provide a seamless and user-friendly experience for your audience.

### Max Tokens

Each task inside ChatGPT consumes tokens. These token can be replenished using the credit. This field puts a limit on the maximum number of tokens you want to use for a particular task. 200 seams to be the sweet spot, but do go and test to find yours.

### Temperature

This acts as a accuracy gauge where higher values give more random answers and lower values give more deterministic and focused answers. It is default to 1. Basically the creativity level of the response. the lower the number the less creative, but more focused. The higher the number, the more creative it will get 'beware' that it can deviate from the originating context. So find the right balance for you really depends on the type of response you'd like to output.&#x20;

Temperate ranges from 0 to 2

### Presents Penalty

This value, known as the diversity penalty, plays a crucial role in ensuring that ChatGPT generates unique and varied phrases and texts when completing a given task. By adjusting this value, users can control the level of repetition in the output generated by the model. A higher diversity penalty leads to a reduction in the repetition of words, resulting in more diverse and creative responses. The default setting for this value is 0, but it can be adjusted within a range of -2 to 2, allowing users to fine-tune the level of diversity in the generated text according to their specific needs and preferences. Ultimately, the diversity penalty feature enhances the flexibility and adaptability of ChatGPT, enabling it to produce more engaging and innovative content.

### Frequency Penalty

The default value for penalizing new tokens in a text generation model is set to 0. Positive values can be assigned to further penalize new tokens based on their existing frequency in the text generated so far. This helps to decrease the likelihood of the model repeating the same line verbatim, resulting in more diverse and coherent text outputs. By adjusting the penalty value, the model can be fine-tuned to generate unique and engaging content that captures the essence of the input data while avoiding redundant or repetitive phrases. This customization allows for a more dynamic and versatile text generation process, enhancing the overall quality and creativity of the generated content.

Frequency penalty ranges: -2 to 2

{% hint style="info" %}
Based on our testing with both user feedback and internal evaluations, it appears that there is no significant impact on either Frequency or Presents penalty when utilizing the latest language models like GPT3.5 Turbo and GPT 4.
{% endhint %}

### Stop Sequences

The AI has the capability to generate tokens continuously, however, there are up to 4 specific sequences where the AI will automatically stop generating further tokens. These stop sequences are essential for preventing any potential errors or issues that may occur during token generation. By using a comma as a separator for multiple stop sequences, users can easily input and customize these sequences according to their specific requirements. This feature ensures that the AI operates smoothly and efficiently, providing users with a seamless experience while utilizing the generated tokens.<br>

For example:&#x20;

{% hint style="success" %}
If you input the value of . 'fullstop' the response will stop generating when it reaches the first full stop in the response.&#x20;

Alternatively, if you think of some of the generic use cases where people ask AI to generate 5 blog posts, If you input the number 5 it will only create 4 blog posts 'as 5 is the hard stop'. You can see that this helps you control the amount of context and tokens used. Great if you don't want to allow users to generate code by inputting a { or to limit generating masses of content.&#x20;
{% endhint %}

### Number of Completions

Default is 1, How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota.

In basic terms, how many response options do you want. in most cases this is just set to one.&#x20;

### Response Format

You have 2 options to choose from, either Text or JSON ' javascript object notation'.&#x20;

When using JSON mode you must still instruct the model to produce JSON via system message.

In most cases you will just use the text option, JSON can be used in more advanced messaging when required.

### Let's Create Your First Assistant:

In this example we are going to be Gary Vaynerchuck - who is a top marketing influencer. <br>

Here is the input that we will test in the System Message block:

> You're stepping into the shoes of Gary Vaynerchuk, a powerhouse in the marketing world renowned for his dynamic approach and no-nonsense attitude. Craft a response embodying Gary's signature tone, drawing insights from his extensive repertoire of blogs, podcasts, and books to deliver actionable guidance.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfX4ikt7IEBU7Vmj1Fc5S%2Fcc5.PNG?alt=media&amp;token=64e71b43-cd9b-4c30-959e-e46c7389fa3b" alt=""><figcaption></figcaption></figure>

We are using the system field {{Last\_Text\_Input}}. Meaning it will answer based on whatever the users last text/message was. We have set the Remember History to Yes and left the model to default 'GPT3.5 Turbo' and everything else is left to default.&#x20;

Now to test the response type a question into the test value bar. Let's ask a question and view the response:&#x20;

{% hint style="success" %}
Question: What is your best advice about using ai for SaaS?&#x20;
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgohpZNQaj9Ebh1C13F3v%2FCC6%20GV%20QUESTION.png?alt=media&amp;token=f242f190-1133-48bd-ac7e-cfb845bd23b8" alt=""><figcaption></figcaption></figure>

Now scroll down and click the button 'Test Request'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjSQXWTMZ7GRH8S7eZigU%2Fcc7%20reposne.PNG?alt=media&amp;token=d6e2ce2c-6f97-4524-b63b-153f20c0e7c2" alt=""><figcaption></figcaption></figure>

Great it worked! Ok in the image above you'll see that we have a 200 response code, meaning everything worked and we had a reply. The main section we are focusing on is the Content: Listen up folks, because when it comes etc etc. This is the AI response to our question.

From here what you need to do is save the response.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcpGVIyT9QlnbOYDqAB0d%2Fcc%20ai%20response%20save.png?alt=media&amp;token=4c1fe375-9109-4878-bccf-8d7b285b97f6" alt=""><figcaption></figcaption></figure>

### To save the response so you can use it in the response to a user:&#x20;

1. Select the "Content' with the small circle until it turns blue. This highlights the data you want to save.&#x20;
2. Next - To the right side you will see in the JSON Path it has added a value. Below that in the 'Map response to custom field' bar. Select or create a custom field to save the response too.&#x20;
3. Next - Click the 'Add' button so it adds to the saved data at the bottom. Once done its ready to be used.&#x20;

### What the basic flow looks like

OK, let's put it to the test. Below we have added 2 additional nodes, both a question block. The first block says "*Hey it's Gary Vee, How can I help you bro?*"

The question block to the right will display the ai response from the saved 'content'.&#x20;

Be sure to test this basic example so you can understand the basics of inputting the data to displaying it back via the question block.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYQEGzQJFvcuYCQsnDkdx%2Fcc%20flow%20demo.PNG?alt=media&amp;token=cfecf7ed-27fc-4a87-82db-f330e4498f74" alt=""><figcaption></figcaption></figure>


# What are Functions

{% embed url="<https://content.app-sources.com/s/35615459206875191/uploads/AI_SERIES/WHAT_ARE_FUNCTIONS-2923134.mp4>" %}

Functions are a super easy way to send users to different parts of your chatbot flows and also capture data like email addresses, phone numbers, and other important information using natural language. They provide a seamless and user-friendly experience for your audience.

{% content-ref url="/pages/8mIObI2rdYNqMMj7p0Uq" %}
[Functions in Flows](/artificial-intelligence/openai-or-chatgpt/what-are-functions/functions-in-flows)
{% endcontent-ref %}

{% content-ref url="/pages/l7YpNB9zwLagk9qHFLu6" %}
[Capturing Data](/artificial-intelligence/openai-or-chatgpt/what-are-functions/capturing-data)
{% endcontent-ref %}

{% content-ref url="/pages/zatsIGlrJp6NyF01VFUx" %}
[Generate function with AI](/artificial-intelligence/openai-or-chatgpt/what-are-functions/generate-function-with-ai)
{% endcontent-ref %}

{% content-ref url="/pages/jxzIRjwv0pjCzthB5WJH" %}
[Combine chat completions & Functions](/artificial-intelligence/openai-or-chatgpt/what-are-functions/combine-chat-completions-and-functions)
{% endcontent-ref %}


# Functions in Flows

Leverage AI to streamline your chatbot's development by guiding users into the appropriate flow through natural language. This method not only accelerates the build process but also enhances user interaction.

### How to create a function

First we need to know how to create a basic function with AI. Navigate to the automations tab, to the left side of the builder window and select Intent 'Functions':&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6MUnKxCcxS4J7CRqUmwb%2Fcreate%20fun.png?alt=media&amp;token=dcfded77-1043-49d9-a379-c79cf26885e7" alt=""><figcaption></figcaption></figure>

To create a new function select the **+New Intent** button to the top right of the screen.

This will now open a new window to set up your functions.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FguJlkbTilBwJCHIZlXSo%2Fnew%20intent.PNG?alt=media&amp;token=6c739d8a-8c19-4958-9d64-ceb91521802a" alt=""><figcaption></figcaption></figure>

Let's start at the top left:&#x20;

**Name**: Label your intent function - This must be a unique name 'this helps the AI find it faster'&#x20;

**Description**: Optional, insert a description so you can recognise what the intent is about.

**Parameters**: We will cover this shortly. But what the parameters do is allow you to add multiple fields that captures users information, eg email, name etc. Which you can use later on.&#x20;

**Status**: As it says on the tin, its either On or off.&#x20;

**Minimum Confidence score**: Upon the user query, the AI will determine if there is an intent that can be searched. The higher the score the more exact it will find the correct intent. If the score is low, it can mean that no intents are found. The default setting at 0.8 we find works well.&#x20;

**Save Result to**: If you are capturing user information eg emails, phone numbers etc, all the user data will be saved in a custom field. Which can be used later on.

**Trigger Sub Flow:** Basically, when the intent is matched or the parameters are captured, where do you want to send the user. 'Which flow'&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMHtHpYGlitTxxPoSJUFu%2Fintent%20set.PNG?alt=media&amp;token=d7bf2fdc-bfaa-4dc4-8554-523f6894842c" alt=""><figcaption></figcaption></figure>

OK, see how it works using the basic intent. First let's look at the Auto intent detect switch.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FSO5sDXULxB0XYGjSL0hH%2Fauto%20intent%20detect.png?alt=media&amp;token=e4f8db68-1e47-4030-ae85-629d865e0434" alt=""><figcaption></figcaption></figure>

The Auto Intent Detect will automatically detect the users intent 'question' this overrides the keyword and default reply features.&#x20;

With it turned on and a users asks "Hey can you help with XYZ" the AI will understand that the users is asking for support, so the bot will respond accordingly/send them to the support flow automatically.&#x20;


# Capturing Data

Moving on from using Intent 'functions' [within a flow](/artificial-intelligence/openai-or-chatgpt/what-are-functions/functions-in-flows) to push users to specific flows. Here we will start capturing user data such as emails, name etc to create a free trial registration directly into the backend 'Your product, CMS, CRM' etc.

### Adding Parameters

Previously we create a basic intent whereas we were using an empty intent to move users around the chatbot flows based on their query. What we are going to do now is start capturing data as shown below.

* Name
* Email&#x20;
* Learn more

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxPmsEBM8gykBPiC0999A%2Fcc%20params.PNG?alt=media&amp;token=02c71f33-f9d0-44e3-80a0-cf80fa06bcb9" alt=""><figcaption></figcaption></figure>

You can add whatever parameters you  require for that specific intent. Once you create a parameter and new box will display:&#x20;

**System message for parameters** - This basically means if you want to add some kind of prompt to help capture the data. You could possibly add something like: Ask parameters in this order one at a time. This will encourage the AI to ask the questions one by one.&#x20;

You may of observed the Learn More parameter has a green switch in the on position. What does this mean?&#x20;

OK, here you're able to pre-define some options within the question. In this case we're asking the users what they would like to learn more of:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FFQFCvHMUMfZEynoEK4AF%2Fcc%20learn%20mroe%20of.PNG?alt=media&amp;token=e56dce24-c0a5-4a73-a65a-b33d9857c486" alt=""><figcaption></figcaption></figure>

Each option must be comma separated as show above. When you have this type of parameter, the AI questions would look like this: "Great, to get you started in the right place, what would you like to learn more of: AI, automation, integrations or developer apps".&#x20;

This makes the AI look more human like when asking questions. The user can reply with anything listed of even a different answer. This data will then be stored in the custom field "Save Result to"&#x20;


# Generate function with AI

Not sure what type of function to create or you have a function idea, but need help with the parameters? Great you're in the right place... Use the simple Generate functions with AI tab.

### Select the generate by ai button

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FehYR4tIV67rHQ11X1T9y%2Fai%20functions.PNG?alt=media&amp;token=3c9abb74-830d-4204-b376-b8cd15939746" alt=""><figcaption></figcaption></figure></div>

Next type in your idea for what you need the function to do. Once happy click get suggestion

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FONCl2DFJkzXtoDCMqG3C%2Fgenerate%20by%20ai%20functions.PNG?alt=media&amp;token=58943ea9-d2f1-4f6c-98d9-3f7071e69510" alt=""><figcaption></figcaption></figure>

Now you are ready to use your newly created functions in your flows.[ Learn more about functions here](/artificial-intelligence/openai-or-chatgpt/what-are-functions)


# Combine chat completions & Functions

Ok now that you understand how to [input content in a chat completion](/artificial-intelligence/openai-or-chatgpt/chat-with-ai-basics) for the ai to read from, and[ how to create basic functions](/artificial-intelligence/openai-or-chatgpt/what-are-functions/capturing-data) where we were capturing user data like emails addresses and names etc. It's time to put those 2 learning modules together and combine chat completions with functions to enable awesome conversational AI. &#x20;

### Starting off where we left off

In the image below is the chat completion module, where we inputted some information so that the AI is instantly trained on it. You will now notice that we have added our function "Free trial registration" shown below. What this will do now, is allow the user to ask questions about the context provided, and the AI will automatically pick up on the users intent, pushing them to register for a free trial by capturing their data from the function we created. [Learn more about functions here](/artificial-intelligence/openai-or-chatgpt/what-are-functions)

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fge7uwcFjvZzJdX4woRgQ%2FCC%20FF.png?alt=media&amp;token=9327b2f3-b4ff-4966-9655-97b37ffce30c" alt=""><figcaption></figcaption></figure>

From here we need to save some extra data - So to get this data click the test request button as we done in the capture data module [here](/artificial-intelligence/openai-or-chatgpt/what-are-functions/capturing-data)

When we successfully test the request we will get the normal response back from the ai where we saved the content to a response custom field.

We asked the AI "<mark style="color:orange;">How long is your free trial</mark>" and the response was "<mark style="color:orange;">Our free trial lasts for 14 days</mark>"

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLBPoqavp2usJgsOpCm1H%2Fcc%20ff%20response.png?alt=media&amp;token=32e87b5d-2274-40e0-bd64-d5fc7f30fc3b" alt=""><figcaption></figcaption></figure>

Just below the content line, you will see another line called "<mark style="color:orange;">finish\_reason</mark>" The finish reason denotes why the AI model stopped responding. There are 3 reasons why.&#x20;

1. **Stop**: Stop means that the AI has responded and provided a full response.
2. **Length**: This basically means that the response is too long for the pre-defined tokens. If you see it, you can increase your tokens settings in the Max Tokens tab - 400 should suffice.&#x20;
3. **Function call**: This happens when all parameters are captured from your function you created.&#x20;

### How to trigger the function\_call

To get all the extra fields we require, you need to input all the parameters in the message tab, for example: Our function call is to capture Name, email address and what they want to learn more about. Once you input all your parameters you can go ahead and test requests again. This will trigger the function call.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0VIU3T4wpk6GQld4AcAM%2Fcapture%20params%20.png?alt=media&amp;token=3287d703-223f-45eb-a6a2-c0b00b9dd67c" alt=""><figcaption></figcaption></figure>

Let's press test request and see what we get in the response;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Ffqy8hJh7ZDDGbAunAFuw%2Fcc%20ff%20save.PNG?alt=media&amp;token=ac7f913e-b976-4a4b-9ad5-13a98f9d97ae" alt=""><figcaption></figcaption></figure>

Perfect! We can see that the finish reason is now function\_call - This means that all data has been captured and the flow will be sent.

Above the function call you will now see the we have a new line called arguments. This is all the data that was captured in the function call itself. And we can use this data later on when required.&#x20;

Below is the full response as we captured it.&#x20;

```json
{
"id": "chatcmpl-9Gq1memz7M4I0qbSDVtAjeCevzGSf",
"object": "chat.completion",
"created": 1713800270,
"model": "gpt-3.5-turbo-0125",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"function_call": {
"name": "freetrialregistration",
"arguments": "{"Name":"Pete","Email":"pete@flochat.ai","Whatwouldyouliketolearnmoreof":"developer apps"}"
}
},
"logprobs": null,
"finish_reason": "function_call"
}
],
"usage": {
"prompt_tokens": 128,
"completion_tokens": 39,
"total_tokens": 167
},
"system_fingerprint": "fp_c2295e73ad",
"messages": [
{
"role": "system",
"content": "do you have a trial"
},
{
"role": "user",
"content": "My name is Pete and my email is pete@flochat.ai and id love to learn about dev apps"
},
{
"role": "assistant",
"content": null,
"function_call": {
"name": "freetrialregistration",
"arguments": "{"Name":"Pete","Email":"pete@flochat.ai","Whatwouldyouliketolearnmoreof":"developer apps"}"
}
}
]
}
```

### Now let's save the important data

You should of by now already saved the response in your system, if not go ahead and select the content line to save the AI response.&#x20;

Next we need to save the finish reason so we can use conditions later on when required.&#x20;

Last up, save the arguments line, but this time use an array field or known as JSON \</>&#x20;

#### Once you have all 3 saved - we can move on.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkbEU9gY5v909NzvZsxl9%2FCC%20SAVE%20DATA.PNG?alt=media&amp;token=b4818ba1-1da7-4347-b8f3-a118bdcf93fb" alt=""><figcaption></figcaption></figure>

### How to set up the basic flow design

Now let's set up a basic flow that answers the users questions and drives them to register for a free trial in this example:&#x20;

Additional nodes we are using:&#x20;

* **Condition:** We are using the first condition node to filter if the function call has been triggered, if no we direct it to the ai response node.
* **Action:** If the condition is met, meaning the function call has been made then we direct the flow toward the action step, where we will save the argument data to the correct custom fields. In this case it's the users name, email and what they want to learn about.
* **GO TO:** The the last step is our go-to flow ' where we'll be sending the users once the function is called' in this case, they will go to the free trial flow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHDnUwmclsWc7j5y8zLgO%2Fbasic%20flow%20cc%20ff.PNG?alt=media&amp;token=b67d678b-1c6e-4888-9470-4cb76d8ac4a6" alt=""><figcaption></figcaption></figure>


# What are Embeddings

{% embed url="<https://content.app-sources.com/s/35615459206875191/uploads/AI_SERIES/what_are_openai_embeddings-3261305.mp4>" %}

OpenAI's embeddings allow you to quickly upload large amounts of text content, making it easy to create FAQs or even comprehensive knowledge hubs for your users in just minutes. This is a convenient solution for providing first-line support across various channels.

{% content-ref url="/pages/oK0dSvLJqc1IcVY5IyV9" %}
[Create Embeddings](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/create-embeddings)
{% endcontent-ref %}

{% content-ref url="/pages/tflETyj4BQ38X2LSQPIi" %}
[Add Embeds to your Flow](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/add-embeds-to-your-flow)
{% endcontent-ref %}

{% content-ref url="/pages/RtkjFZ7YELOvJz6FAdzT" %}
[Error Handling](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/error-handling)
{% endcontent-ref %}

{% content-ref url="/pages/4tRo8O1sq1BAwAtkNGws" %}
[Combine Embeddings with Functions](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/combine-embeddings-with-functions)
{% endcontent-ref %}


# Create Embeddings

Embeddings are great for uploading tons of text so your AI can respond to your users with the correct content. But there is some structure to it! To help you get the best responses possible. So, in this module we'll take you through the best way to structure them.

### Where to find embeddings

First navigate to the main dashboard and select the Integrations tab to the left hand side task bar. Next select the OpenAI tab and the OpenAI window will display. At the top on the screen select the Embeddings tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F7Bitlj46NzcYGkmRzF69%2Femb1.png?alt=media&amp;token=cf75eaf6-7fc5-491e-a3db-593638082b2a" alt=""><figcaption></figcaption></figure>

The next step is to click the +New Embedding button to the top right side. This will now open the embeddings editing display.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FE9paFUOBJUHevEXc8cwa%2Femb2.PNG?alt=media&amp;token=f9268bd9-7e42-40c0-ae89-6b6922d173ca" alt=""><figcaption></figcaption></figure>

### Let's breakdown the 3 input boxes shown in the image:&#x20;

* **Type:** The type box is where you'll insert a title for the embedding. Although it's actually more than just a title. The Type input is how OpenAI searches all of your embeddings, so naming the title needs to be unique and not duplicated in other embeds.&#x20;
* **Heading**: Just like the type input, OpenAI also will search through the Heading context to 1, filter the search and also allow you to use conditions later on in your workflows. So again, keep the name here unique.
* **Text:** You can insert up to <mark style="color:orange;">1000 characters</mark> in this window. This is where you content/information will go.&#x20;

### Structure the text

This is optional. After many attempts, testing and user feed back we have found that structuring your text can help with providing a better response.&#x20;

If you just want to copy and paste your existing text then that's fine too. We personally find that OpenAI will read the text better when adding a little structure to it.&#x20;

So how do we structure the text input. As you'll see in the image below, that each section is broken down in to Headings and Sub-headings. For example:

Instead of just typing in the whole information about the pricing and plans, we broke it up in to smaller chunks denoted by the words <mark style="color:orange;">Heading</mark> and <mark style="color:orange;">Sub-heading</mark>.&#x20;

Be sure to test it yourself in your own embeddings, try it without headings/sub-headings and test it with them. Gauge if you see any differences on the output response.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FmXkjKsqh3zPnJsIZog1L%2Femb%20structure.PNG?alt=media&amp;token=9ae42296-2f97-4e4a-9c0a-ac324e16613e" alt=""><figcaption></figcaption></figure>

### Side-note:

You an also inject prompting in to the text box to if required. We also found that this method works really well also, not only in providing a better response, but also reducing hallucinated replies. Just like we added in our integrations embedding. **Labelled:** <mark style="color:orange;">Additional</mark>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FddFkC5f1IgRUGQBcIYgY%2Femb%20prompting.png?alt=media&amp;token=15227254-d33f-4a01-883a-f067e565be2c" alt=""><figcaption></figcaption></figure>


# Add Embeds to your Flow

### Adding embeds to your flows

Now that you understand what embeds are and more importantly how to structure them for the best possible responses. Let's go ahead and add the embeddings to a basic flow design.&#x20;

### Where to find the Embeddings in the flow

OK, first let's open a flow for testing or if you have a live flow you can follow the same steps.&#x20;

Open up an Action node > select integrations > Select OpenAI <br>

Once you have selected the OpenAI tab, a new window will display, scroll down a little bit and you'll see 2 Embedding actions you can use.&#x20;

1. Embedding Match
2. Embedding Match and Completion

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9YS3CTPpGUmfBuycBxq9%2Femb%20actions.png?alt=media&amp;token=9edabfb7-34ee-4226-a04a-6d8dbf1877de" alt=""><figcaption></figcaption></figure>

### Embedding Match

Open up the Embedding Match action and you'll see the editing window below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FikLhDFgqITTvZy5sxeG7%2Femb%20match%20action.PNG?alt=media&amp;token=09500ce8-9ebf-413f-8cad-b56cf60931a4" alt=""><figcaption></figcaption></figure>

Let's break it down -&#x20;

* **Input:** Within the input tab you can insert many text variables, most common will be the users question field. for example using the last text input field {{last\_text\_input}}.
* **Types:** Types are no longer support by OpenAI.&#x20;
* **Minimum score:** This is a confidence score that the response will give if/when the AI find the embedding you have created. The range is from 0 to 1. The higher the number the better AI will match if you have an embedding. We find a score of 0.34 to work in most cases.&#x20;

### Testing the Embedding Match action

With the basics out of the way, let's test the embedding match by asking a question. To ask a question first add a custom field value to the input box. We have used the {{last\_text\_input}} field for this example. Once you have added a custom field, a new box will display to the right. Type your question here 'Shown below' "Do you have a free trial"

Once inputted click the Test Request Button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHW3AIC5Y1EJVr7f7MJIy%2Femb%20ask%20q.PNG?alt=media&amp;token=5d3bc0ed-8556-405a-b24b-cb0ba97f2cbc" alt=""><figcaption></figcaption></figure>

Below you will see the response data the AI has sent back.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FrqMPSVqyaCINIScvY4hd%2Femb%20respo.PNG?alt=media&amp;token=bd2f80f2-3f60-4a90-97ef-ff65844f1a7f" alt=""><figcaption></figcaption></figure>

Great, now that you have a response back we can now use this information to do many things. First let's breakdown the full response so you understand exactly what it is.

#### Let's look at the heading first:&#x20;

The heading data displays the Heading title you created in the embedding it's self. But, it's more than just a heading! You can use this value to move your users around different parts or your chatbot workflows, which we'll cover in the error handling module.&#x20;

{% hint style="info" %}
Once you have selected the 'heading' line, denoted by the blue highlighted circle, you can now save the data into a text custom field over to the right hand side: 'Map response to custom field'. once done, click and save.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxaJlEgPn1m7QY95ovbOk%2FGroup%201171278010.png?alt=media&amp;token=5093598b-02df-4446-aa04-816f424de08b" alt=""><figcaption></figcaption></figure>

Next up is the **Text**. The text line displays all of the information you added to the embedding itself. It's optional if you want to save the information into a text custom field, just like we done above with the heading data. Just repeat the process if you need it.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FkUSR9UqloC8I3Fodwck0%2FGroup%201171278009.png?alt=media&amp;token=0abfab32-b0be-4857-ad82-3e8c36ce2794" alt=""><figcaption></figcaption></figure>

#### Ok, now on to the final value. The score.&#x20;

The score is generated by the AI - The score denotes how strong the match is. Basically if it exists or not and how good the AI could match the users question to the embedding. The value of the score ranges. If its low 0.01 for example, the match result is low, the higher the score the better the match. We find around the **0.34 is the sweet spot**. But as always, do go ahead and test your self.&#x20;

{% hint style="info" %}
Again, be sure to save it on the right side in to a custom field, this time it will be a number field. We can use this later on too.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXxZmadZXf5tCugHo6TN6%2FGroup%201171278008.png?alt=media&amp;token=ffe3d58b-9941-4482-9c16-aa3a083ab516" alt=""><figcaption></figcaption></figure>

### Embedding Match and Completion

The main difference between the embed match, and the embed match and completion is that the the completion action will display the answer from the AI, which will be sent to your user. Ok, let's take a look at the embedding Match and Completion action:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F5Eq31iqs9rqPey6TQvMl%2Femb%20compl.PNG?alt=media&amp;token=9121fc9c-91ed-4fdc-942c-121b7ffedc18" alt=""><figcaption></figcaption></figure>

Let's quickly break it down.&#x20;

**Input:** The input will be the users question, again in this example we're using the {{last\_text\_input}} custom field.

**Introduction:** The introduction is just like a prompt, so if you want to add an additional prompt or instruction here then you can 'optional'

**Max tokens:** You can change the amount of tokens for the response, **100 - 200 works fine**. But as always 'test'.

OK, next add a question so we can test the response. My question is "**Do you have a free trial?**"

Once done, click the Test Request button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgQyzirSWbbd9D9KzjesE%2Femb%20comp%20res.PNG?alt=media&amp;token=748c522a-2d34-44a3-a57e-0a9eb9b84621" alt=""><figcaption></figcaption></figure>

Great it worked! OK, so there are 2 points of interest here.

* Heading
* Completion

Just like the embed match heading, the embed match and completion also has a heading - go ahead and save that to a custom field too.&#x20;

The most important part is the Completion. The completion is the AI response. and as always save it to a custom field.

### What the flow looks like

Below is an example flow with the embeddings actions added. Either side of those we added a question node, one that asks a question the other displays the AI response. The last one that displays the ai response, loops back to the embedding match node. This way if the user asks another question it will reply again and again. In the Combine embed with functions module, you'll learn some smart ways to use embeddings... See you there.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCBKejn1RmGZBD8YFNwtr%2Femb%20compl%20flow%20ex.PNG?alt=media&amp;token=12c98628-c278-48f9-8384-605c7a759e4a" alt=""><figcaption></figcaption></figure>


# Error Handling

It's well known that AI can deviate from the source of truth, basically tell lies. In this module we'll take you through a few basic things that will help reduce hallucinated responses and also how to use the scoring value to direct users to other places in your workflows.

### Manage hallucinated responses

Thinking back to the previous module where we spoke about [Embedding Match & Completions](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/add-embeds-to-your-flow#testing-the-embedding-match-action), we'll start there. So head back in to your flow and navigate to the Embedding Match and Completions action step. Once in the action step let's focus on the Introduction bar.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbzQzZv2pjOove73BeaZc%2Femb%20compl%20prompting.png?alt=media&amp;token=d6fe3709-5fda-4d25-b518-931a78108206" alt=""><figcaption></figcaption></figure>

As mentioned in the previous module: The **introduction** is just like a prompt, so if you want to add an additional prompt or instruction here then you can 'optional'

OK, so let's add a basic prompt to the Introduction tab.

"Question {{last\_text\_input}}. assistant: extract data only from {{embed\_text}} do not respond with any context that is not within the extracted data."

This prompt using the information that we captured in the embedding match action step {{embed\_text}}, so what this will do is, provide the AI the exact content from the embedding again. With the intent to only use the provided context to extract an answer from.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fl29C8NZl9m9mX42s7Zyr%2FERROR%20HANDL.PNG?alt=media&amp;token=73e3683e-68e1-4f38-b657-e2f3edf88b95" alt=""><figcaption></figcaption></figure>

Another way to help reduce hallucinations is by actually heading back to the embedding and placing a prompt there instead. So head over to your Integrations tab > OpenAI and select the embeddings. Let's look inside the embedding

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fg67FViaaL2PmQeVmK34r%2Femb1.png?alt=media&amp;token=236e463a-0776-4396-9971-80794e78be7d" alt=""><figcaption></figcaption></figure>

So we mentioned back in the ['How to create embeddings'](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/create-embeddings) module that you could inject a prompt within the embed itself. We actually find this a better way than placing the prompt in the Introduction tab shown earlier. Here's a simple prompt that we inserted into one of the embeddings called Integrations:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fl82gDaKgnInBiE8CnRUp%2Femb%20prompting.png?alt=media&amp;token=7add4d05-72ce-4a63-aa15-f3cd6c283e76" alt=""><figcaption></figcaption></figure>

This really helped the AI stay on track and respond perfectly. All we done here was tell the AI in a heading called 'Assistant' that we only integrate with the list below, and any other integrations can be fulfilled via Zapier, Make or using external requests. If you have API documentation, then you can build your own application within Flochat.

And it done exactly that! We threw lots of questions about integrations that we currently don't have 'Yet' and to use Zapier etc etc.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3mlvF2nz43KigMi8uhu9%2Fno%20lies.PNG?alt=media&amp;token=67ff8f32-7f46-4732-a3a9-3ec59305cfdb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
A quick way to check if your AI diverts from the source of truth, is by testing a well know question. Try this: How far is the moon from earth.&#x20;
{% endhint %}

By doing this it shows you that by not responding to it, your AI is only focused on your content. This is done via the Scoring.

### How to use scoring

Scoring is possibly the most important part for your AI set up. When you test your Embedding Match action, you would of seen the data sent back from the AI containing a score.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVdCzmt8eu64Y1aEI5NCc%2FGroup%201171278008.png?alt=media&amp;token=aa9ce4dd-9fa8-4043-942d-7257bd497b92" alt=""><figcaption></figcaption></figure>

So once we have the score saved in a number custom field, we can now use it with a condition to filter the AI response based on the score. in the below image is the basic setup, then we'll show you how to create the condition and what to do with it.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F5mly33iqwdfTiqOgshdN%2Femb%20err%200-2.PNG?alt=media&amp;token=bd0f195a-07c1-4ba4-89f6-5e4295d2d903" alt=""><figcaption></figcaption></figure>

To create the condition based on the Score, open a [condition node](https://help.flochat.ai/flow-builder/steps/condition-step#number-variable-condition) - type in your score custom field - set the operator to: greater than or equal to and the value at 0.2 or up to 0.3.&#x20;

The reason why we chose 0.2 or 0.3 is that anything below that score could not be found in your embeddings, ie asking how far it is from the moon to earth. You can then either display a message that asks them to try again, or send to another flow where you may handle a human take over flow.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FgwSzyXdhie9LbBghgGiG%2Femb%20sca.PNG?alt=media&amp;token=ed25bf0e-0d1b-4c7e-93d2-8408badc0eb7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
As always be sure to test your self when using the scoring, to help you get the best output and also reduce the hallucinated responses.
{% endhint %}


# Combine Embeddings with Functions

In this AI series we covered how to set up [functions](https://flochat.ai/openai-series-capture-data)[ ](/artificial-intelligence/openai-or-chatgpt/what-are-functions/capturing-data)to enable data capture like email addresses etc, and also how to upload all your FAQ's to [embeddings](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/create-embeddings#lets-breakdown-the-3-input-boxes-shown-in-the-image). So in this module you'll discover how to move users from asking questions to quickly moving them into your conversions flows using one simple condition.

### How it works

In the previous module '[error handling](/artificial-intelligence/openai-or-chatgpt/what-are-embeddings/error-handling)' we spoke about how to use the scoring to help with directing users to the right flows and also decreasing hallucinated responses. And what parts of the response we'd like to save to use later on, for example the heading and the content.&#x20;

So this is how we use the 'heading' from the embeddings to quickly move users to our function flows to capture data.

Let's take a look at the Embedding Match and Completion action.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fq4mG1fMmWSddUrCipEQR%2Fpriccss.PNG?alt=media&amp;token=c9dbe733-5d56-4a5d-9e32-cf8084e2cd43" alt=""><figcaption></figcaption></figure>

Highlighted is the **Head line**. If you remember that when creating your embeddings you were required to create a heading, just like a title. This helps the AI search for the information. OK, so as we asked the AI "How much is the pro plan?" we get the response as expected. now the AI understands our intent it shows the correct data based on that. So let's save the heading into a custom field which we can use in the next condition step.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F7PQucAyDXcI8gAmvNvGK%2Fembd%20heading.PNG?alt=media&amp;token=d2f6e218-b24b-4a87-9bb7-892440ca9491" alt=""><figcaption></figcaption></figure>

Setting up the condition step: Once you open the condition step, look for the custom field that you saved the heading to. In our example we used {{embed\_Heading}} as you'll see in the 'IF' bar.&#x20;

Next select the operator 'IS' and the value is set to whatever your heading that you intend to filter, ours in this case would be 'Product Pricing and Plan Details. Now let's add this condition in to the flow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8DwZUyefcco5gDg5VkQi%2Fcon%20in%20flow.png?alt=media&amp;token=44c4856a-f5ef-46c5-8f7c-e89a61e6622a" alt=""><figcaption></figcaption></figure>

Let's zoom in a little further.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBXu63CShHEI6Ucq6sFS1%2Femb%20zoom.PNG?alt=media&amp;token=0f89d137-9bf4-4625-b5d1-1c0d6b10a66d" alt=""><figcaption></figcaption></figure>

Once you have added the condition in o the flow, you can now direct the user to different parts of your workflows. So as we're focusing on the plans and pricing in this example, we're sending the user to the plans and pricing flow which is in our main flow. If the heading does not contain 'Product Pricing and Plan Details' the AI will respond to whatever the question was.&#x20;

You can set up multiple headings in the conditions node and simply link out to follow on flows. We direct out of the embeddings so we can use the power of AI to capture user data and convert them easier. Basically you could use this simple setup for embeddings and filtering headings as your complete automated assistant. Pretty easy ah!&#x20;


# GitBook Lens AI

{% embed url="<https://content.app-sources.com/s/35615459206875191/uploads/GITBOOK_SERIES/New_GitBook_Demo_intro_Flochat-2597799.mp4>" %}

{% embed url="<https://www.gitbook.com/>" %}

### How to enable lens

To turn Lens 'On' : Navigate to your **'Customize'** tab and select **configure** as shown below. Once there, **simply toggle Lens on**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvxZZhbar9LRP7iBt0KLi%2Fenable%20lens.PNG?alt=media&amp;token=154fa7ed-3b58-46cf-8807-5da55639040c" alt=""><figcaption></figcaption></figure>

Once your Lens has been activated, let's take a look at how powerful Lens can be when adding it to your Website chat, or even automating support directly on your Facebook and Instagram posts!

### The magic

This tiny flow below will change the way you manage your entire automated and human assisted support!

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhKdiXKqvhehCgTSq6Bno%2Fgit%20flow.PNG?alt=media&amp;token=3fc8a926-65d6-4558-862a-bb85777b3cc7" alt=""><figcaption></figcaption></figure>

### Adding the app to your chatbot

To add the GitBook Lens AI chatbot app to your workspace, we have already created a getting started flow for you. Once you download the flow all you need to do is add your GitBook API key and SpaceID and you are ready to let the automation take over 'sorry employees' 😂

### App set up

To connect your Gitbook documents takes literally 5 seconds:&#x20;

* Open the Mini-apps tab
* Install app

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FygU1Dzhv37U6ggJUaPAD%2FAdd%20app.png?alt=media&amp;token=d6c0b8b3-55f0-4349-9c7c-8edeb137e830" alt=""><figcaption></figcaption></figure>

Once you have selected the GitBook Lens app, it will be added to your mini apps screen. The next step is to select the **settings tab** 'as shown below'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F78YxwYJJYitNQfaIkvej%2Fapp%20settings.png?alt=media&amp;token=f021b347-afc2-4c26-9875-09b202b51d80" alt=""><figcaption></figcaption></figure>

Now add your GitBook API key in the area displayed below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlYzLO7R7NKPeLkZRi02F%2Fad%20api%20key.png?alt=media&amp;token=17055463-2dc0-4641-aa48-66a77ac90b1c" alt=""><figcaption></figcaption></figure>

### Creating the flow

Open up a new sub-flow in your selected channel or omnichannel project. The first node you need to create is a **Question** node. This enables a users to input some text so your chatbot can store it within a [custom field](/contents/custom-fields). The type of [question](/flow-builder/steps/question-step) node is **'Message'**. Let's go ahead and create the node below:&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FoQJEX4iF2bqzM7G04KLU%2Fquestion%20node.PNG?alt=media&amp;token=8cc180a3-c716-4953-878b-77f17d62e46d" alt=""><figcaption></figcaption></figure>

### GitBook Action Step

The next step is to create an **Action** step. Once you have the action open - select the **Integrations** tab, scroll down and select the Gitbook Lens AI app. Then add it. It will now display as shown below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FI8pithHWesL9SS3LRYXa%2Fgitbook%20action.png?alt=media&amp;token=df756f84-8f1c-41ad-9ea6-ed39ce10f2e0" alt=""><figcaption></figcaption></figure>

### Gitbook SpaceID

The next step is to open the GitBook Lens app and add your space ID into the field provided. To find your space id, naviagte to your Gitbook account and select the workspace you want to use. Within the url string you will see a long stream of random letters. This is your workspace ID.

For example, our SpaceID is: <mark style="color:blue;">RaLazqQDW4JMiGe2iyKg</mark>&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdvSjXQyX6ozSU5cJKovM%2FSPACEID.PNG?alt=media&amp;token=4176855f-cd53-47c0-8020-3f11ba3b6990" alt=""><figcaption></figcaption></figure>

**Paste your SpaceID** into the box within the app as shown below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbGsvfVFcvi9QBNGq5ZT8%2Fsacid.png?alt=media&amp;token=dff5ea78-dbe1-417d-9250-6cdd70f5e368" alt=""><figcaption></figcaption></figure>

Now we need to add the custom field values that store the users query and fields that store the responses.

{% hint style="success" %}
Note: Ensure that the custom field in the User Query box, is the same field used in the previous question step. In our example the field that stores the users question is called {{gitquery}} and we use the same field in the User Query box above.
{% endhint %}

Response mapping: In the response mapping area we are storing two forms of data:

* GitBook Response
* Query Follow up response

**The GitBook Response:** Is the returned answer from the users query. Whereas the **Query follow up response** are additional question prompts that GitBook have added to help guide users to explore more answers.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtogLfm4ntdQKBzZohOwp%2Fquery%20prompts.png?alt=media&amp;token=6563df20-e038-487e-9edd-3bda21c8474a" alt=""><figcaption></figcaption></figure>

### Response Step

The next step is to create another question step. Within this question step the GitBook response will be displayed to the user. Along with the Query follow up response.&#x20;

First create a new question step > now add the git response custom field 'that was used in the GitBook lens app under the response mapping'&#x20;

Next is to save response to the other custom field gitquery. This is so that if a users askes another question it will go back through the GitBook leans app and return an additional answer.&#x20;

Next, if you want to add the query follow up responses, ie: additional helpful prompts the user can tap to read more. Click the **Dynamic answer** button and follow the lower image [here](#dynamic-response-settings).

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FaMREVCNxm81f7q1m84wS%2Fsd.PNG?alt=media&amp;token=91e0db9d-9c93-4883-98fe-e9c308333f33" alt=""><figcaption></figcaption></figure>

### Dynamic response settings:&#x20;

Using the custom field that the responses are stored in, copy the set up below.

{% hint style="info" %}
Note: The section that is labeled: **Limit to number of items**. Means how many prompts messages would you like to display. We personally suggest 3
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FjpBsbCwKioVIwxnkhtzl%2Fss.PNG?alt=media&amp;token=3e3381ea-90f0-41d6-818b-7d5fcde5cdb2" alt=""><figcaption></figcaption></figure>

OK, that's you all set up and ready to automate your GitBook documents. Be sure to connect the nodes correctly as shown in the image below.

{% hint style="info" %}
You will notice that from the last question node we have connected it back to the GitBook Lens app action node. And also connected the dynamic answer step back to the same GitBook Lens action.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhKdiXKqvhehCgTSq6Bno%2Fgit%20flow.PNG?alt=media&amp;token=3fc8a926-65d6-4558-862a-bb85777b3cc7" alt=""><figcaption></figcaption></figure>


# Stealth Seminar

The Ultimate Webinar Solution!

Host your webinars that feel live and engaging. Automate registrations across all supported messenger channels. It's time to captivate your audience and unlock the power of seamless webinar experiences with StealthSeminar and Flochat working in sync. Elevate your webinars today! 🎥💡

{% embed url="<https://youtu.be/2BMUwQFyJlk>" %}

### Get the template

{% embed url="<https://app.flochat.ai/.../rjv4sgtprpv6rxes77aj1rljnjjchyps>" %}

Manage all your webinar registrations in one convenient location.

1. **Simplified Registration Process:** Skip the lengthy landing page process. With StealthSeminar, registering attendees is faster and easier than ever before. Save time and eliminate unnecessary steps, ensuring a seamless experience for your audience.
2. **Quick Setup:** Add your webinar ID or IDs, and you're ready to go live! Flochat simplifies the setup process, allowing you to focus on delivering impactful content without getting caught up in technical complexities.

Revolutionize your webinar onboarding experience. Enjoy accelerated registration, and hassle-free setup. Elevate your webinars with Flochat.


# Live Chat

Besides being able to create chatbot automation you can also follow up with your subscribers through our live chat inbox. We have one available for every channel.

You can access the live chat in two ways:

1. Through the main dashboard overview
2. Each individual chatbot channel

### How to access live chat through the main dashboard <a href="#how-to-access-live-chat-through-the-main-dashboard" id="how-to-access-live-chat-through-the-main-dashboard"></a>

When at your main dashboard overview you will have a tab on the top named **Live Chat**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fi63TOKQBP67JrIIIoK1p%2Flivechat1.4044754a.png?alt=media&amp;token=43fba30d-7fe5-4a94-b6e8-61111ed7d246" alt=""><figcaption></figcaption></figure>

The biggest advantage of this overview is that you can see all the channels you have built chatbots on. So going to live chat from this main dashboard is very easy. Just select the chatbot and the live chat will appear.

### How to access live chat through a chatbot channel <a href="#how-to-access-live-chat-through-a-chatbot-channel" id="how-to-access-live-chat-through-a-chatbot-channel"></a>

If you are within any of your channels you can also access the live chat from that channel. Just choose Live Chat and the live chat will open up displaying all of your subscribers inside that chatbot channel.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzTRBORcYVOLPlPoL56B2%2Ftempsnip.png?alt=media&amp;token=c844e2ce-940d-4b25-95d0-abb7e6664b39" alt=""><figcaption></figcaption></figure>

### How to use Live chat <a href="#how-to-use-live-chat" id="how-to-use-live-chat"></a>

Once you select any of your subscribers you will then get to see the live chat in action. Many options and information are present so let us walk you through them.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fk9q44DxzLQsddMJ6U2Ds%2Ftempsnip.png?alt=media&amp;token=4fba81a5-ecda-409e-bdd0-6ef6321494e3" alt=""><figcaption></figcaption></figure>

#### User List: Displays subscribers(bot users) who interacted with the chatbot <a href="#section-1-displays-subscribers-bot-users-who-interacted-with-the-chatbot" id="section-1-displays-subscribers-bot-users-who-interacted-with-the-chatbot"></a>

* Click on **Inbox** to switch between **Inbox** and **Done**. When you finish a conversation, move the users to **Done**.
* Use the **Search** bar to search a conversation by user name.
* Click on a user to view conversation detail and user profile.

#### Conversation area: Shows the chat your subscriber has with your chatbot <a href="#section-2-shows-the-chat-your-subscriber-has-with-your-chatbot" id="section-2-shows-the-chat-your-subscriber-has-with-your-chatbot"></a>

* On the top of it, click the `<=` icon to hide Section 1, the user list area.
* Right next to it is the subscriber's profile photo and full name.
* In the upper-right corner, click on the tick icon to move the subscriber to **Done**.
* And the 3-dots icon offers a **Hide message from bot** option and **Manage Shortcuts** option.

**Hide message from bot** lists messages sent only by the user and agent, helping you get a clearer look at the conversation so that agents don't need to go through too many messages.

**Shortcuts** help agents make quicker responses to the user's query. You can also manage your shortcuts in **Tools** - **Shortcuts**.

* Hover your mouse on a message sent by the bot, click on the little v icon to resend the message or jump to this step in the flow, in case you want to edit anything.

#### Agent reply area: Allows agents to reply to your subscribers <a href="#section-3-allows-agents-to-reply-to-your-subscribers" id="section-3-allows-agents-to-reply-to-your-subscribers"></a>

* Write a reply in the blank area.
* Type a slash and keyword to search for a shortcut. Use up and down keys to go through shortcuts, hit the enter key to get the pre-written content.
* On the right side, \</> icon is used to call a variable, e.g. `First Name` of the user. You might also want to call it quicker by typing to left curly braces `{{` and searching a field name.
* On the bottom of it, the most left-hand side icon is used to change persona. The default icon refers to the default persona, the chatbot itself. Add persona via **Contents** - **Personas**.
* Switch between **Reply** and **Note** to change reply mode. When you are in **Reply** mode, the reply area is in white. The content will be sent to your subscriber directly. When you are in **Note** mode, the reply area is in yellow. The content will be displayed in the conversation area but in yellow and these notes won't be sent to your users. They are for internal reference only.
* the final 4 icons in the bottom-right corner are for sending emoji faces, media (image, gif, audio, video & file) and subflows. The last icon is to send the message/note. You can hit the **enter** key instead.

#### User profile: Displays the profile of the subscriber <a href="#section-4-displays-the-profile-of-the-subscriber" id="section-4-displays-the-profile-of-the-subscriber"></a>

#### User Data: Shows notes, tags, subscribed sequences, OTN topics and all custom user fields <a href="#section-5-shows-notes-tags-subscribed-sequences-otn-topics-and-all-custom-user-fields" id="section-5-shows-notes-tags-subscribed-sequences-otn-topics-and-all-custom-user-fields"></a>

* Add or remove tags from this overview directly. Very useful when it comes to getting subscribers into lead funnels and such.
* For OTN topics and sequences you can only remove them from the user.
* The same goes for the user fields, you can view, adjust the values or delete them entirely.

### Sending subflows to users <a href="#sending-subflows-to-users" id="sending-subflows-to-users"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvRH5Ep7PkkbQfRZ0gJOi%2Ftempsnip.png?alt=media&amp;token=1d005076-5adc-4882-90fb-e05e22f8356f" alt=""><figcaption></figcaption></figure>

After you finished a talk with a subscriber you might want to send them to a subflow. This is easily done by pressing the icon. A popup window will then appear where you can select or search for your flow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHrSzA5yNzgS1GoSR5D7g%2FCapture.PNG?alt=media&amp;token=03991141-fb10-491c-b2fb-60d7ee2509cb" alt=""><figcaption></figcaption></figure>

Once you select your flow press the blue button named Send Sub Flow and the flow will be sent.

{% hint style="warning" %}
&#x20;*Do make sure you have disabled live chat mode before sending the subflow. Otherwise the chatbot will not be able to send the messages inside the flow.*
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FTbABWdCxr3r9hr7ksoVU%2Ftempsnip.png?alt=media&amp;token=b6c51715-6395-4be9-9d91-840c56522f77" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Whenever agents reply in section 3, you will see the **Pause Automation** area automatically starts a 30 minutes count down. This means that, the chatbot will stop responding during the time. Agents can add on more time if needed. When time is up, the bot starts to reply again.
{% endhint %}


# Bot Users

People who opt-in to your chatbot by interacting with it are considered bot users. These become contacts inside of your chatbot channel and during the course of a single or multiple conversations, the chatbot will be able to gather information about them to give you more insights into your audience.

You can go to your bot users by going to the corresponding section in the left-hand menu once you have logged into one of your chatbots.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWHyG9iThteKC6UjrEyW8%2Ftempsnip.png?alt=media&amp;token=4e26f9b3-1cda-4e44-a17d-38b1ff03d0e3" alt=""><figcaption></figcaption></figure>

From here you will see a list with a complete overview of all users that have interacted with and therefore opted into your chatbot.

### Filter bot users based on conditions <a href="#filter-bot-users-based-on-conditions" id="filter-bot-users-based-on-conditions"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJuhrbrCyhCwyA4BG3b9Q%2FCapture1.PNG?alt=media&amp;token=d2175f7b-f75a-4dcc-aa48-0d453ae3bab0" alt=""><figcaption></figcaption></figure></div>

Once on this overview, you can also quickly segment your users by using the filter option. Once pressed you will be able to use any condition/filter you like.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBmpjVeHWeNci3wj9QLz2%2FCapture.PNG?alt=media&amp;token=3b652c62-c2b9-4a23-8a7a-135e0a5430af" alt=""><figcaption></figcaption></figure>

This gives you the ability to quickly see what tags someone has, or what values a custom user fields are.

An example of a filter could be that you want to know who amongst the bot users has given its email.

Another example could be when a user finishes the initial onboarding flow you tag them as such and you want to be able to see who did this.

### User information <a href="#user-information" id="user-information"></a>

Once pressing a certain bot user a popup will appear and it will show all the collected bot user details so far.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FFfsWAsh4Txka6wJjO0gU%2FCapture.PNG?alt=media&amp;token=88b0ee0f-0ab2-4428-9293-6f8a34d88407" alt=""><figcaption></figcaption></figure>

You will see the following on the left side:

* Name
* Gender
* Language
* Timezone
* Local time

Below the profile image, you will have the ability to either delete the user or download the user data. This will help you become GDPR compliant as users might request this from you.

You will also see the specific channel user id and some date and time information like subscribed, last interaction and such.

If we go with the right side of the user information you will see tabs for:

* Notes
* User tags
* Subscribed Sequences
* OTN Topics
* Custom User fields

Only you press one of the tabs you will be able to view the data collected.

For tags, you will have the most options at your disposal.

You will be able to add tags directly to the user but also remove them as well.

For the topics **Subscribed Sequences, OTN Topics** you will be able to only remove them from the user.

For **Custom User Fields** you can either remove or change its value.

### Importing or creating new users <a href="#importing-or-creating-new-users" id="importing-or-creating-new-users"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FznXtrAHWCTDadGGOa0Rg%2FCapture.PNG?alt=media&amp;token=f85d5fa4-a470-4a6a-a06b-75701f34b603" alt=""><figcaption></figcaption></figure></div>

For the SMS and voice channels, it is also possible to import or create users manually. In the top right, you will have the buttons to do so.

### Creating a new user&#x20;

Adding a single user manually, add the users details then press create.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBOLXtQew6DCmvcL0E5dm%2FCapture.PNG?alt=media&amp;token=0d4d43ea-c8a0-499d-b231-d79664b09bf7" alt=""><figcaption></figcaption></figure>

### Importing via CSV file

Import many users in one go by using the import by csv button

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlVOuPZtDbKwmyY7C9LA0%2FCapture.PNG?alt=media&amp;token=8b0225ff-e4c1-461c-9234-f18199334992" alt=""><figcaption></figcaption></figure>

### Import from Manychat

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCEag7LEtDrCqnegNJxIR%2FCapture.PNG?alt=media&amp;token=d7db5936-4230-4a75-9425-50bfa3087f34" alt=""><figcaption></figcaption></figure></div>

Great, you've made the switch from Manychat. Import all your contacts in one swoop! Including custom fields and tags.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FCQ12i8gvmeyMy378oBgN%2FCapture.PNG?alt=media&amp;token=e93c780b-c6ee-4e96-9c69-d80471199b26" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fe8piyfLdv0O4CFKvpV5M%2FCapture.PNG?alt=media&amp;token=bd5b15e7-dd8e-4cda-9512-d9c3c74bcd5c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlKdQ2MNra2hiuWtfjA7b%2FCapture.PNG?alt=media&amp;token=3ad4ffac-5b53-462e-8e7c-887d03caf4c7" alt=""><figcaption></figcaption></figure>

Great, your Manychat users are now moved across!

{% hint style="success" %}
If you don't see them straight away, re-fresh your Flochat dashboard
{% endhint %}

To ensure that everything is connected when using Facebook and Instagram chatbots you will need to change the primary receiver in your Facebook settings.&#x20;

### Switching Primary Receiver

First head over to your Facebook page and select settings at the bottom left hand side 👇

Next, head over to advanced messaging and ensure you can see our chatbotApp connection. And remove the Manychat connection. And that's it! You're ready to start chatting with your customers again 🚀

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYBFftw9e0ufEqcto0air%2Fchatbot%20app%20permissions%20facebook%20advanced%20messaging.png?alt=media&amp;token=a0ad62c0-cd39-4764-a705-5a340cb73ccc" alt=""><figcaption></figcaption></figure>


# Keywords

With "Keyword", your users can easily jump to sub flows by typing in keywords rather than being lost in menus or buttons.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FK7TxS2DS3vOF6U1fRXdH%2Ftempsnip.png?alt=media&amp;token=b4b8818d-0cdb-4c7a-aa1e-9c5a6f2f69ec" alt=""><figcaption></figcaption></figure>

1. Go to "Automation" from the sidebar
2. Click "Keywords"
3. Click "+ New Keyword"

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FlEaCJbUfdvReKpN9mHEx%2F1.PNG?alt=media&amp;token=fb85fcaf-cdb2-4d21-9094-4579184b1183" alt=""><figcaption></figcaption></figure>

1. Choose a condition from "is", "contains" or "starts with"
2. Put one or more than one keyword, separated by **only commas**, no space allowed
3. Choose a sub flow to send

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FleOPo4ZVdIOemf715wG2%2F2.PNG?alt=media&amp;token=2cb9ffed-034d-4d72-aa6c-a340f9da2d04" alt=""><figcaption></figcaption></figure>

### Hotword

When bot user answered a question, the normal keywords will be ignored. However, hot words will be checked before validating the user input for question.

### Send text reply

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOH6OV7gc84oM5OTOxh90%2FCapture.PNG?alt=media&amp;token=298a4059-ca4d-4ab8-8c2a-ce9cdfccc342" alt=""><figcaption></figcaption></figure>

Alternatively to only sending a flow, you can use the reply text message option to send a text message either by it's self or with the selected flow.&#x20;

The image below displays when a user types in the word free trial, and also contains a reply text message response also 'Sure lets get you started'

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FfRI6VLVZxSblzEcRRj0D%2F1.PNG?alt=media&amp;token=22959c4b-1d41-43fd-a13b-2c66e8caa261" alt=""><figcaption></figcaption></figure></div>

As you can see, a pre-defined flow has been sent. Also the text message reply.. pretty cool ah!&#x20;

### Default Reply <a href="#default-reply" id="default-reply"></a>

"Default Reply" is sent when the bot doesn't know what to reply. When the active button is off or no sub flow was chosen for "Default Reply", the main flow will be sent.

{% hint style="info" %}
So when you build and test flows, you can reply anything to quickly re-start the conversation.

You can also adjust the frequency to send "Default Reply". Its default value is set to fire "Every Time".
{% endhint %}


# Sequences

Use sequences to automatically send follow up / delay messages to customers. You can send multiple messages with different delays.

### Create Sequence <a href="#create-sequence" id="create-sequence"></a>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvtlXPJDuHw418VuI8TSO%2Ftempsnip.png?alt=media&amp;token=a438a230-916f-4836-a308-88d3d7bb3c98" alt=""><figcaption></figcaption></figure>

#### 5 steps to create a sequence:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FLdB1ML5widQVlJtY8jkx%2Ftempsnip.png?alt=media&amp;token=2761a509-d779-4692-adcb-b6f2d93e449c" alt=""><figcaption></figcaption></figure>

1. give a sequence name
2. click "Add Message"
3. edit the settings (see **Message Settings** below)
4. choose the sub flow to send
5. repeat steps 2-4 to add more messages then click "Save"

### Message Settings <a href="#message-settings" id="message-settings"></a>

This is how does the setting window look like:

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FnKoR7elDNRJw2maIjazB%2FCapture.PNG?alt=media&amp;token=2a39ce5a-5a5b-46f2-b268-9df8a705a08d" alt=""><figcaption></figcaption></figure></div>

#### &#x20;1. The countdown to send the message <a href="#id-1-the-countdown-to-send-the-message" id="id-1-the-countdown-to-send-the-message"></a>

* Messages are sent by order.
* For the first message, the countdown begins when users subscribed to the sequence.
* For other messages, the countdown begins when the previous message is sent.

#### 2. Send anytime or between a time range <a href="#id-2-send-anytime-or-between-a-time-range" id="id-2-send-anytime-or-between-a-time-range"></a>

* For "send anytime", the message will be sent immediately at the end of the countdown.
* For "send between", if the countdown ends outside the time range, the message will be kept until the next available time.
* Remember to check the timezone issue below.

{% hint style="info" %}
e.g. You don't want to bother users at night so you set a message to send between 9 am and 6 pm. If there is a message that should be sent at 8 pm, the system will hold the message until 9 am tomorrow.
{% endhint %}

This can affect the next message because the countdown of the next message begins when the previous one is sent.

#### 3. Send on which days of the week <a href="#id-3-send-on-which-days-of-the-week" id="id-3-send-on-which-days-of-the-week"></a>

* Similarly, if you don't want to bother users at weekend, deselect Saturday and Sunday. See the example in the "send between" above.
* Remember to check the timezone issue below.

#### 4. Choose corresponding content type (IMPORTANT) <a href="#id-4-choose-corresponding-content-type-important" id="id-4-choose-corresponding-content-type-important"></a>

* See "Content Type" introduction below.
* If you are not sure about which type you should use, keep it default. Although the message might not be sent due to the 24 hours rule, the system will at least help you avoid being banned by Facebook.

#### 5. Pick a notification type <a href="#id-5-pick-a-notification-type" id="id-5-pick-a-notification-type"></a>

### About Timezone <a href="#about-timezone" id="about-timezone"></a>

If a channel has a timezone in the user's profile like Facebook, when the system check "send between time range" and "send on Monday to Sunday" settings, it's based on users' timezone first. If the user doesn't have a timezone or the channel doesn't support timezone in user profiles, then it's based on the timezone of the workspace.

### Content Type <a href="#content-type" id="content-type"></a>

Any message sent over 24 hours after a subscriber’s last interaction must have a content type that matches its purpose (in accordance with [Facebook Policy- Message Tags (opens new window)](https://developers.facebook.com/docs/messenger-platform/send-messages/message-tags/)

Messages with type “Other” or without a content type will NOT be delivered to subscribers who interacted with you via Messenger more than 24 hours ago.

{% hint style="warning" %}
Sending messages that do not match the assigned content type may result in your page being suspended or banned by Facebook.
{% endhint %}

#### Default / Other <a href="#default-other" id="default-other"></a>

Can contain promotions and it will only send to users who interacted with your bot in the last 24 hours. Confirmed Event Update

Send the user reminders or updates for an event they have registered for (e.g., RSVP'ed, purchased tickets). This tag may be used for upcoming events and events in progress.

#### Post Purchased Update <a href="#post-purchased-update" id="post-purchased-update"></a>

Notify the user of an update on a recent purchase such as confirmation of transactions(invoice, receipt) and notifications of shipment status(product in-transit, shipped, delivered, delayed).

#### Account Update <a href="#account-update" id="account-update"></a>

Notify the user of a non-recurring change to their application or account.

### Send Multiple Messages <a href="#send-multiple-messages" id="send-multiple-messages"></a>

When you send more than 1 message in your sequence, note that all the messages are sent in order.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8yf5qSCxNr6eiAtifbau%2Fsequence5.4306faca.png?alt=media&amp;token=dcc96da7-55a0-4f77-a42c-db20ad006cb6" alt=""><figcaption></figcaption></figure>

In the above screenshot, for example, the "Booked" sub flow will be sent "Immediately" once the user subscribes to this "Appointment Follow Up" sequence. Because the first message begins the count down once the user subscribes.

The next message begins the count down once the previous is sent. Thus, the "Appointment Follow Up" sub flow will be sent 1 day after the "Booked" sub flow is sent.

### Send Sub Flow <a href="#send-sub-flow" id="send-sub-flow"></a>

Make some sub flows to send specifically for your sequences. Please note that each Send Message step has its own "Message Tag". The tag is set to "Other" by default.

Let's say, now it is over 24 hours since the user last interacted with your bot. You choose a non-default content type for a message in your sequence. This setting automatically changes the message tag of the first Send Message step in the sub flow you send.

Later, if the user responds, you are then able to send messages normally with the "default" content type. So, usually, you won't need to change any message tag in your sub flow.

### Subscribe / Unsubscribe Sequence <a href="#subscribe-unsubscribe-sequence" id="subscribe-unsubscribe-sequence"></a>

Go "Flow Actions", and you can find the 2 sequence operations.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FFhyLAjEWW9YMn1WUhJkg%2Fsequence1.a1d4bcdf.png?alt=media&amp;token=ce7e5139-abb5-4165-afaf-a67290901d39" alt=""><figcaption></figcaption></figure>

There are a couple of examples to use sequence, such as

* "Event Follow Up" - send confirm message immediately once user registers and follow-up message as reminder or helper
* "Get Feedback" - ask for feedback like 2 hours after the user talked to your bot
* "Send Coupon" - send coupons when user put something in the cart but doesn't make an order for a long time


# Triggers

Triggers can help you automate certain processes in the chatbot. For example, when a user has opted-in for email you might want to sync this data with a CRM or Google Sheet.

To get to the trigger section you need to go to the left-hand menu and select **Automation** then choose **Triggers**. From here you will be able to create a new trigger by pressing the blue button on the top right named + **New trigger**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Farabki2vMuvP69nRTukF%2Ftriggers_01.6630c438.png?alt=media&amp;token=ade7d47d-b3b0-4f92-8061-922a6bf6d30c" alt=""><figcaption></figcaption></figure>

Once pressed you will get to see the available triggers you can choose from;

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXaK6VqNeQunTZH0n7mDS%2Ftriggers_02.d68cc282.png?alt=media&amp;token=3c99663f-3bab-49c8-8626-c65c3e62b526" alt=""><figcaption></figcaption></figure></div>

### How to create a new trigger <a href="#how-to-create-a-new-trigger" id="how-to-create-a-new-trigger"></a>

Let’s take an example of a trigger when someone pays for order inside your chatbot. Press the blue button **+ New trigger** then select the trigger named as such: **Order Paid**

From here a new pop-up window will open where you can set up the details of your trigger.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEFCjlqT603CKu8VXol57%2Ftriggers_03.795bedab.png?alt=media&amp;token=10f5170b-ab38-4d9d-94b7-222e2a3c8206" alt=""><figcaption></figcaption></figure>

You will be able to enable or disable the trigger, set up a condition if you need the bot user to match a certain filter before the trigger is activated, and you can add a note that will explain more about this trigger.

Great if you are working with a team or creating a template and need to clarify things.

Once done press the bottom right button named **Save** and you are now halfway done setting up your trigger.

### Selecting your Sub Flow <a href="#selecting-your-sub-flow" id="selecting-your-sub-flow"></a>

Now that the trigger has been created we will be needing to add an action to it. You can do this by pressing the **Choose Sub Flow** space to the right of that trigger.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FiuHuBr5S1EL5WyJcPFzR%2Ftriggers_04.38236c67.png?alt=media&amp;token=684a8a22-25e1-4688-8a10-13695c1770d1" alt=""><figcaption></figcaption></figure>

Once done it will open up a pop-up window for you where you can select your desired flow to be connected once this trigger has been activated.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3x8BQgTNvC3Po3TbmrEa%2Ftriggers_05.1f695b82.png?alt=media&amp;token=22502275-c970-440b-a6c6-1564855ab9cb" alt=""><figcaption></figcaption></figure>

You can also type to find your flow more easily if you prefer. Once you found your flow just select it and it will return you to the Trigger overview.

From here you have a few options when it comes to managing the triggers.

### Managing your Triggers <a href="#managing-your-triggers" id="managing-your-triggers"></a>

You have two options if you want to manage your triggers:

* You can enable or disable them by pressing the slider on the left of the actual trigger
* You can edit the trigger settings. Inside of here you also have the option to delete the trigger entirely

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpHkeZd4yynMrlsMTR6KE%2Ftriggers_06.44101565.png?alt=media&amp;token=68302514-caa6-4a02-b02e-49e3daa8ef1c" alt=""><figcaption></figcaption></figure>


# Comment Keywords

A very important and great feature inside of chatbots is the ability to let the chatbot comment, like and send a person a pm when that person responds to on a post on your Facebook and or Instagram page.

You can find this if you go to the left-hand menu and press **Automation** then select the **Comment Keyword** tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F2IIt4GrGIEN9NluFrcx6%2Ftempsnip.png?alt=media&amp;token=daf400dc-ea92-4563-a002-edb8556e0475" alt=""><figcaption></figcaption></figure>

From here you will have a blue button in the top right corner name **+ New Comment Keyword**.

Once you have pressed the blue button **+ New Comment Keyword** then a pop-up window will open up. From here you will be able to set up your comment keyword trigger.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQb2swfEFgoSVRP9uDOGH%2FCapture.PNG?alt=media&amp;token=2c305e77-c750-4834-8bda-f3586726fe2a" alt=""><figcaption><p>i</p></figcaption></figure>

During step 1 you will be able to select any of your Facebook or Instagram page posts depending on which channel you are in.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpEmsMCKMayvUvcvT2n6h%2FCapture.PNG?alt=media&amp;token=d7ec0bcc-f1d9-48a8-98f4-6733abc77981" alt=""><figcaption></figcaption></figure>

With step 2 you are able to type in your keywords and determine the condition on when it needs to be triggered. By default, it is on **contains**, but you have the following options to choose from:

**“If comment: Is Contains Starts with Is anything One of the following keywords”**

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3Ne7i09Z2iWvRpSuJkq1%2FCapture.PNG?alt=media&amp;token=35f3bc03-b430-44cd-adb4-68b0d7401311" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Do note that if you select **Is anything** the ability to type in your keywords will be disabled.
{% endhint %}

On **step 3** you will be able to create variations with which the chatbot will be able to reply to users who comment on your Page posts.

Advised is to at least add 5 variations to avoid the algorithm marking the replies as spam.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F49ppX6uqmRLhzupepM0X%2FCapture.PNG?alt=media&amp;token=95e27069-f7ee-4bb8-bb04-dd3f81d1d4c5" alt=""><figcaption></figcaption></figure>

With **step 4** you will be able to add the flow that will be triggered when the chatbot will send the pm to the commenter.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBxX3qLtt8slmFupsWWdx%2FCapture.PNG?alt=media&amp;token=9c45ee34-0306-4507-a73d-d1e290c2939a" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**NOTE:** make sure that your initial message contains only **1 text message with a button**. As this counts as a user opt-in the user first needs to interact with this message before becoming a subscriber to your chatbot.
{% endhint %}

Inside of **step 5** you are able to set up a delay for when the chatbot should reply and send a pm to the user.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fa8Zh9BHZktBr7ypqTYmp%2FCapture.PNG?alt=media&amp;token=223bebaa-3bd6-4669-9e15-0fc27d431a14" alt=""><figcaption></figcaption></figure></div>

This will make it more human-like experience-wise. But it is totally optional.

In the final step, you will be able to match any of the settings to your liking 🔥&#x20;

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXx5y331vmmsVvjyH35d6%2FCapture.PNG?alt=media&amp;token=4ef335a7-536b-4999-9b27-7ab5b77a01ff" alt=""><figcaption></figcaption></figure></div>

Once done press the blue button on the top right or bottom name **Save** and your comment keyword will now be shown in the main overview


# Custom Fields

### Bot fields <a href="#bot-fields" id="bot-fields"></a>

Similar to user fields you can also create bot fields. The main difference is with user fields you store data to segment and share with that specific bot user, and bot fields allow you to store data and show them all equally among all bot users.

The value does not change. Think of information such as opening hours, urls, or contact details for the business.

#### Creating a bot field <a href="#creating-a-bot-field" id="creating-a-bot-field"></a>

You can create a bot field by going to the bot field overview tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6IlfnMol9fSoN4wlFzNM%2Ftempsnip.png?alt=media&amp;token=d802eb7d-2290-4682-b824-c3c4f8e2573e" alt=""><figcaption></figcaption></figure>

You can do so by pressing **Contents** from the left-hand menu and from there press the tab called **Bot Fields**.

If you want to create a new bot field just press the button in the top right corner named + New Bot Field.

From here a pop-up window will appear where you can create your bot field.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FAjFGUjkrxcLRENpek3UC%2F1.PNG?alt=media&amp;token=21866dd9-6076-4859-bb93-da4f0005b99a" alt=""><figcaption></figcaption></figure>

After naming your new bot field you can select the type of field you would like it to have.

Currently, we have the following ones available for you;

* Text
* Number
* Boolean
* Date
* Datetime
* JSON

After selecting the type you can start adding the value to this bot field. If you like a description can also be added same as the folder you want to move it to.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FR5nblWhTgMc41BruiIYr%2FCapture.PNG?alt=media&amp;token=e2e382f3-d885-4e65-80a1-f6511e1a0fc0" alt=""><figcaption></figcaption></figure>

After everything is filled in just press the button in the bottom-right corner named **Save** to create the bot field.

#### Managing your bot fields <a href="#managing-your-bot-fields" id="managing-your-bot-fields"></a>

After you created the bot field you are able to manage it from the main overview.

You can create folders to better keep track of your bot fields. You can also enable or disable the template field option.

Lastly, you are able to edit the bot field itself by pressing the pencil icon to the right of any bot field.

### User fields <a href="#user-fields" id="user-fields"></a>

User fields can be used to store data you collect from your bot users throughout the conversations you have with them.

It will help you segment the users inside of a flow and allows you to create more customized funnels that will help you convert.

#### Creating a user field <a href="#creating-a-user-field" id="creating-a-user-field"></a>

There are two ways to create a user field. We will explain both steps in this documentation.

#### Create User field in tab overview <a href="#create-user-field-in-tab-overview" id="create-user-field-in-tab-overview"></a>

To find the user field overview press **Contents** from the left-hand menu and then select the **User fields** tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fb3pJnNjoeH6MPlwqswUP%2Ftempsnip.png?alt=media&amp;token=fde4c275-478d-4c54-b3c6-824b0af42159" alt=""><figcaption></figcaption></figure>

From here you will come to your user fields overview where you can manage all of your user fields you create.

To create a new user field press the blue button in the top right corner named **+ New User Field**.

From here a new pop up window will appear where you will be able to set up your new user field.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fa6cENIjplNBWQLzydyK4%2FCapture.PNG?alt=media&amp;token=cafd7fcb-7db8-42bc-8fa3-96ddd6fc64a6" alt=""><figcaption></figcaption></figure>

Just name your new user field. The next step is to select what kind of user field you like to create. Currently, we have the following available for you:

* Text
* Number
* Boolean
* Date
* Datetime
* JSON

These fields allow you to set up all kinds of options inside your chatbot including saving data from bot users or API calls as an array.

You can also add a description if you like and or want to clarify what the function is. Below the description, you will be able to select whether or not you want to move it into one of the folders you might have created to keep user fields more structured and easy to find.

Once you are done just press the blue button in the bottom right named **Save** and your user field will be created.

#### Create user field inside flow builder <a href="#create-user-field-inside-flow-builder" id="create-user-field-inside-flow-builder"></a>

Another way to create a user field is by doing so directly inside the flow builder. This has the huge advantage that you can create user fields on the fly and not have to go to the user fields overview tab first.

Just go to any flow and from here you can create user fields anywhere you need to use them.

You will be able to create them inside of:

* Question blocks
* Action blocks -› set custom variable
* External request -› response tab

Let’s take an example of a question block. We are wanting to store the response to the question inside of a new user field.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FBr8IfIu7qrTYHP6l2v4x%2Fuser_fields_03.fa6d0e7f.png?alt=media&amp;token=831ef26a-eea5-421c-b8aa-086044548c37" alt=""><figcaption></figcaption></figure>

Just start typing a new user field name. The next step is to press the same name below your typed one to create the user field on the spot.

You will then be asked which type of user field you would like to create. Depending on where you are or what kind of question you get to see different kinds of options.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F61RNt2Mrovwm6wU5sxL2%2Fuser_fields_04.05cb36ba.png?alt=media&amp;token=e4b0be38-6b9b-4115-bd10-807f9ab916fa" alt=""><figcaption></figcaption></figure>

In this case, since it is a regular question block we get to see;

* Text
* Number
* Boolean

Were you to ask for a date/time type of question you would get to see that type of custom field only.

#### Managing your user fields <a href="#managing-your-user-fields" id="managing-your-user-fields"></a>

To manage all your user fields you can do so at the main user fields overview tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FytpZ7WemgzX5caQtXwh9%2Fuser_fields_05.d345ca5d.png?alt=media&amp;token=091d3e87-ff27-44b9-9383-d2eedb7a7518" alt=""><figcaption></figcaption></figure>

You can create folders to keep your user field overview more structured and let you allow to find your user fields more easily.

And you can manage any user field directly from this tab overview by pressing the pencil icon to the right of any user field.


# Tags

Tag a user by user's type, situation, status, etc for better management.

### Create Tag <a href="#create-tag" id="create-tag"></a>

In your workspace, go "Tags" from the left sidebar.

You can also create tag by just typing in a new tag name and click it wherever you add tag.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FVtmp9tKILpoYvbHO6OEC%2Ftempsnip.png?alt=media&amp;token=160b3c01-c08d-4436-bde9-94aa7b433740" alt=""><figcaption></figcaption></figure>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRaBVHwyz9zhVkuBUK2k1%2FCapture.PNG?alt=media&amp;token=499564b2-19ce-4af4-9990-03d71163ddff" alt=""><figcaption></figcaption></figure></div>

And now the new tag is created, you can view all tags via the main tag display 'as shown below'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNM5N5QXTrLvGowm5yVSw%2FCapture.PNG?alt=media&amp;token=bce3a75a-6562-4ec6-bff4-9769802b0424" alt=""><figcaption></figcaption></figure>

### Add / Remove Tag <a href="#add-remove-tag" id="add-remove-tag"></a>

In the Action step, click "Flow Actions", then you can see "Add Tag" and "Remove Tag" options.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYRgmbRVqUIm5YwAuxbFK%2Ftempsnip.png?alt=media&amp;token=f9bd55f2-a5a4-46c7-91e2-883c377bec26" alt=""><figcaption></figcaption></figure></div>

### Use Tag in Condition Step <a href="#use-tag-in-condition-step" id="use-tag-in-condition-step"></a>

Use [condition](/flow-builder/steps/condition-step) step to help you guide users with different tags to different steps.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKsqR81jh5gatx0gLs5hH%2FCapture.PNG?alt=media&amp;token=46170ab7-9e36-433a-9a5f-0c6bd75a7501" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvHkIBBCEa3qokI1gmbvh%2FCapture.PNG?alt=media&amp;token=26e89be0-3150-4152-9bc6-94472d076f5b" alt=""><figcaption></figcaption></figure>

### Use Tag in Live Chat <a href="#use-tag-in-live-chat" id="use-tag-in-live-chat"></a>

You can also manually add / remove / check tag for each user in "Live Chat" from the left sidebar.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9G7coM0w0wIJb3wjYQXi%2Ftempsnip.png?alt=media&amp;token=a0dcc75c-6d32-456c-8c9b-6708f28b7012" alt=""><figcaption></figcaption></figure>


# One Time Notification (Facebook)

OTN(R) is short for One Time Notification (Request) and allows you to send one follow-up message to a user once they opted in for this. This is only applicable to the Messenger channel.

You will be able to create ONTR in two ways.

### Create and manage from overview <a href="#create-and-manage-from-overview" id="create-and-manage-from-overview"></a>

The first way to create OTN topics is by going to the **contents** tab on the left-hand menu, then to the **OTN Topics** tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FHYwKInZaBDT1fjQ9dGCg%2Ftempsnip.png?alt=media&amp;token=6d91762b-0a4d-441c-b8ac-9e0d131d9a57" alt=""><figcaption></figcaption></figure>

From here you will be able to find all your create OTN Topics and Frequency up till this point and you can manage them.

If you want to create a new topic then you only have to press the button in the top right corner named **+ New Topic**. Once you press it a pop-up window will appear.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fp9h05q0Ubr4u7M7zGa0B%2FCapture.PNG?alt=media&amp;token=8c7f8e2d-3a07-4847-a674-6cdb00e06996" alt=""><figcaption></figcaption></figure>

The Recurring Notification allows your business to re-engage your customers after 24 hours of last interaction, with prior permission, on a daily, weekly, or monthly basis.

If you are familiar with the [Broadcasting](/broadcasting/broadcasts) tool, the Recurring Notification expands on this tool by creating an experience that your customers are in control over.&#x20;

First, to send Recurring Notifications, you must receive prior permission from the customer to send them a Notification by having them opt-in. Also they have the opportunity to opt-out at any time.

This feature will also include One-Time Notifications, which allows you to send one message to your customers after 24 hours.&#x20;

With the Recurring Notification you can:

* Send time-sensitive marketing campaigns&#x20;
* Create drip campaigns
* Follow-up with your customers after the conversation has ended

The Recurring Notification is broken down into 3 communication windows:&#x20;

1. daily over 6 month period after opt-in (one message per calendar day)
2. weekly over 9 month period after opt-in (once every calendar week)
3. monthly over 12 month period after opt-in (once every calendar month)

The day before the Notification window closes, all customers opted-in will automatically receive a message to re-opt-in to the Notification to continue receiving messages.

Here's a further breakdown:

| Daily                                                                                                                        | Weekly                                                                                                                                            | Monthly                                                                                                                                                                |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Once every calendar day which starts from 12:00 AM until 11:59 PM in the time zone set by the Page. Default time zone is UTC | Once every calendar week which starts from Monday at 12:00 AM until Sunday at 11:59 PM in the time zone set by the Page. Default time zone is UTC | Once every calendar month which starts from the 1st at 12:00 AM until the last day of the month at 11:59 PM in the time zone set by the Page. Default time zone is UTC |

For example, if the contact opted-into receiving weekly Recurring Notifications, and the Page set the time zone to America/New\_York, this is a possible schedule of Recurring Notifications sent by the Page:

1. First Recurring Notification sent on Monday @ 5:00 PM EDT
2. Next Recurring Notification sent on Tuesday the following week @ 9:00 AM EDT

From here you will be able to name and add your topic. Once you press the button **Add** you will be returned to the main overview and your newly created topic will be displayed there.

You will also be able to rename the topics by just pressing it and typing in your new name for it, or delete it by pressing the trash bin icon on the right of any topic.

### Create OTN topics in the flow builder <a href="#create-otn-topics-in-the-flow-builder" id="create-otn-topics-in-the-flow-builder"></a>

Another way that is more direct and easy is to create the OTN topic directly inside the flow builder.

Just go to your flow then insert a **Send Message block**, then go to **One Time Notification** -› **OTN Request**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FerrUdWPmo6uehvlyxyYa%2FCapture.PNG?alt=media&amp;token=57e8d6d2-a07f-4227-a2ad-bdaa11d558be" alt=""><figcaption></figcaption></figure>

This will bring you to the opt-in message of the OTN request. From here you will be able to select one of the available topics already created or create a new one directly on the spot.

Once pressed the topic will be created and you will be able to use it to request an opt-in from your subscriber.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOCHZwI5Nre4xhcdOKuB8%2FCapture.PNG?alt=media&amp;token=a492f64f-9eaf-4d5d-871d-63f0106f57c7" alt=""><figcaption></figcaption></figure></div>

### How to request an OTNR and use it to send the OTN message <a href="#how-to-request-an-otnr-and-use-it-to-send-the-otn-message" id="how-to-request-an-otnr-and-use-it-to-send-the-otn-message"></a>

Once you created or selected your topic inside the [flow builder](/flow-builder/flow-builder-overview) you will be able to draft up your own message.

Soon as the user presses the **Notify me** button that user will be opted in to receive one message about that specific topic.

This will allow you to send a message to the user concerning that topic outside the 24-hour window of the last interaction.


# Personas

Personas will help you to make your chatbot come over as more human. It allows you to set up a personal profile with profile pictures so people are more inclined to talk with the chatbot since they feel it is a more personal experience.

### Creating and managing your Personas <a href="#creating-and-managing-your-personas" id="creating-and-managing-your-personas"></a>

To create a new persona you can go to **Contents** from the left-hand menu, then to the **Personas** tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRZCDb3oe8uXoO4WAznvi%2Ftempsnip.png?alt=media&amp;token=9e3b59dc-5594-4b16-b8e5-92ac05df2971" alt=""><figcaption></figcaption></figure>

From here you will have the main overview of all the personas you have created inside the chatbot.

If you want to create a new persona you can do so by pressing the top right button named **+ New Persona**.

From there a pop-up window will appear where you can set it all up.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FR5dqF8lbFYOjPzcFhTLt%2FCapture.PNG?alt=media&amp;token=5e7a28bc-ecdb-4447-aee5-9379d83e36b6" alt=""><figcaption></figcaption></figure>

Once created the persona will be available for you inside the main overview.

From here you can also manage your persona inside that main overview. You only have to press the pencil icon to be able to edit.

### How to use Personas <a href="#how-to-use-personas" id="how-to-use-personas"></a>

You can use personas by setting them inside your flows.

Just go to a flow and create an action block. From here select **Advanced actions**, then **Set persona**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8L4FWqp9RkIE1bz4ZpEU%2Ftempsnip.png?alt=media&amp;token=4e7b43da-5bfa-4fe1-b80e-f63d12d2abe6" alt=""><figcaption></figcaption></figure>

From here you can select any kind of persona you have created previously and the chatbot will then continue the conversation with that user with that profile.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FznrCg8bfgOOlmer3xEa8%2FCapture.PNG?alt=media&amp;token=4e0a9157-4a70-4ba1-b919-80fbe28ea7c6" alt=""><figcaption></figcaption></figure></div>

Using personas is a good way to increase engagement and conversions as well. Female personas often do very well with men so you could start your flow by checking with a condition which gender the user is and then set the persona accordingly.

Below we have updated the chat with our customer success team Persona 🤓

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FwqIVb2Ddza0Rz0h3we9o%2FCapture.PNG?alt=media&amp;token=b860ddfd-6a42-4728-a684-f33ab94180f7" alt=""><figcaption></figcaption></figure></div>


# Menus

There are 2 types of menus you could use:

* Persistent
* Dynamic

Persistent

Menus are an amazing way to get you users to take action fast! Displaying buttons that take them to whatever content you want to show them, in or even outside of the chatbot.&#x20;

Lets take a look a the first type of menu

### Persistent Menu

To navigate to the menu tab: Go to Contents > then at the top select menus

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FttMogKfEoFouEUvgzrKu%2Ftempsnip.png?alt=media&amp;token=f84d7d5c-57e4-45b0-8307-3968c0fe5800" alt=""><figcaption></figcaption></figure>

Let's take a look at the default menu

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtSN8FVP3O0XduO5uPwuD%2FCapture.PNG?alt=media&amp;token=0d9bcd2f-9ed2-4cae-9af6-d62c0f96f1ab" alt=""><figcaption></figcaption></figure>

Within our default menu we are displaying 3 main buttons as shown above. This enables our users to navigate quickly to where they want to be. Let's look inside the buttons below.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FvI4MK56USOz3e1Hlkmuy%2FCapture.PNG?alt=media&amp;token=c44c42a8-ef97-4906-a668-14befc6823d7" alt=""><figcaption></figcaption></figure></div>

As mentioned above, you can either take them to a pre-designed sub flow or whisk them off to a website domain url. Cool ah 🤓 Below is an image of the menu that's located within our web chat widget.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWLwPWfLnO7rDCGiyZE8V%2FCapture.PNG?alt=media&amp;token=711ecae8-5db3-4be5-b7ac-00fe60e24744" alt=""><figcaption></figcaption></figure></div>

### Dynamic Menu

Ok, so this is where menus become clever, smarter and more user action focused 🤓

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FDAYDnl8n7GuYIhlxLG6I%2FCapture.PNG?alt=media&amp;token=f0747c0b-f268-41f8-ad57-75a22bf65d20" alt=""><figcaption></figcaption></figure>

The main difference you will notice in this menu is the free trial and has been replaced with a new button called Upgrade 🚀

Why? Well in this case, a user has taken an action and registered for a free trial, and we don't want to keep showing the same menu as they have already registered. So we'd rather try and get them to upgrade to a paid plan. So how can this be done...

The how:&#x20;

The same as creating a normal menu, simply name it, and add the buttons or domain url of your choice. That you want to show when a users takes a specific action.

Now you have to create a [trigger](/bot-automation/triggers)... Let's take a look at setting that up below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXEk25WX6XUheeTmod7SC%2Ftempsnip.png?alt=media&amp;token=4f48cbef-4afb-452b-a088-f6f792bc4d5b" alt=""><figcaption></figcaption></figure>

There are actually multiple ways of doing this, the image above we are using an action within a subflow. That we can either add to a pre-built flow or use triggers to make the changes backend. Using the [workflow builder](/flow-builder/sub-flows/workflow).

Let's create the trigger in the workflow builder below:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F49m3s8Rxo4BDdV1hwcaj%2Ftempsnip.png?alt=media&amp;token=3baeff19-0f7f-458a-879a-e311fcd46f3d" alt=""><figcaption></figcaption></figure>

As you can see you have multiple ways to change the menu when using triggers. So let's make it easy. When a user is tagged with a tag call Purchased, we want to update their menu.&#x20;

First, create new trigger

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FyBD2m4cNwFY7iArLiZuZ%2FCapture.PNG?alt=media&amp;token=aecfbccc-2af8-47c0-831d-d57ba46e26a3" alt=""><figcaption></figcaption></figure>

Click save, now we want to add a flow. In this case we will be adding the workflow we created above

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbkQ7sj14AnD9khBTCOgf%2Ftempsnip.png?alt=media&amp;token=2bfdebbf-70eb-4117-87f4-8ffb3fd7a572" alt=""><figcaption></figcaption></figure>

Now your trigger will look like this 'below'

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0OjuyQQZMOP0m6rLtJl7%2FCapture.PNG?alt=media&amp;token=3bd81738-d815-43af-a38b-94660bba9943" alt=""><figcaption></figcaption></figure>

Every time a user has that specific tag added, their menu will dynamically change too.

Let's test it out.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQCKM37FtogL0D8oKCya0%2FCapture.PNG?alt=media&amp;token=3f3307c5-7d88-46c4-8d71-c85882b26c4a" alt=""><figcaption></figcaption></figure></div>

Great it works!! There are so many ways to update your users menus, so be sure to test it out and make your bot smarter and more user orientated too.&#x20;


# Customer Feedback (Facebook)

A fantastic way inside the chatbot to collect feedback is to use the native module for this. It will allow you to gather not only feedback but also allows you to know when a user is not satisfied with the product or service you provide, which you can then proactively contact to resolve any issues there might be.

{% hint style="info" %}
**Note:** This is only available inside the Messenger channel.
{% endhint %}

### Creating and managing Customer Feedback Topics <a href="#creating-and-managing-customer-feedback-topics" id="creating-and-managing-customer-feedback-topics"></a>

To create a new customer feedback topic you can go to **Contents**, then select the **Customer Feedback Topics** tab.

From here you will see an overview of all your created topics and it allows you to manage them or create a new one.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F0f8l8QK9w7FB1xqATuL0%2Fcustomer_feedback_01.535697a5.png?alt=media&amp;token=92984826-2b52-44c4-9351-175b2a735896" alt=""><figcaption></figcaption></figure>

If you like to create a new topic you only have to press the top right button named **+ New Feedback Topic**.

Once done a pop-up window will appear where you can set everything up.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPv5zvBV2sUwXh7R6NEwZ%2Fcustomer_feedback_02.13db7e0f.png?alt=media&amp;token=0514b13e-6e2c-4733-a5f7-a46ffdd8c754" alt=""><figcaption></figcaption></figure>

As you can see you can fully customize this to your own liking so let’s walk through the options.

With option 1 you can give the topic a name as it will appear inside the topic overview. Below that you will be able to adjust your Question title. This will show up as the question. By default, there is a question inside but you can adjust it if you like.

You can also set the type. You have the following choices;

* Customer satisfaction score
* Net promoter score
* Customer effort score
* Free input form

The next step is to select your score label. You will have the following options;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fgsa9XsnYDxz4GdE8JWLd%2Fcustomer_feedback_03.1e88edd1.png?alt=media&amp;token=8491fddf-bf14-484d-a1a5-cb6bc45dd874" alt=""><figcaption></figcaption></figure>

Next up are the score options that you will be able to choose from;

* One to five (numbers)
* Five stars
* Five emojis

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FEE4ozmDYmqX7MUzzqc85%2Fcustomer_feedback_04.5e7dbf5e.png?alt=media&amp;token=281f4974-c803-42ef-99ed-81b3576c8b1c" alt=""><figcaption></figcaption></figure>

You will also be able to enable or disable free form input. Once enabled the user will be able to give additional feedback outside the rating.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fhj0eSNM09LFwIKzGbdPC%2Fcustomer_feedback_05.ec1df270.png?alt=media&amp;token=a3df41f2-fbed-4f65-892a-dec1ba556157" alt=""><figcaption></figcaption></figure>

Below that you will be able to point to your privacy policy which is mandatory. And lastly, you will be able to set the customer feedback to expire anywhere between 1-7 days.

Once done you can press save. You will be taken back to the main overview and you will be able to manage the customer feedback topic you just created from there.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcEBjVbH2cPY6ycQY7xSD%2Fcustomer_feedback_06.b4b8d807.png?alt=media&amp;token=56128e4b-f13b-4120-ab53-a5af5541b13a" alt=""><figcaption></figcaption></figure>

On the right you will have two icons. The first one will show you advanced analytics on the topic you selected, while the pencil icon allows you to edit it to your liking.

Below you will find an example of the analytics you can expect;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F9hLVDGB4nWElc5QY2Xmh%2Fcustomer_feedback_07.f6f81616.png?alt=media&amp;token=cc89b7d0-1809-43dc-bbd6-196928550368" alt=""><figcaption></figcaption></figure>

### How to send a customer feedback topic <a href="#how-to-send-a-customer-feedback-topic" id="how-to-send-a-customer-feedback-topic"></a>

This is easily done inside of the flow builder. Just go to any flow you want to set up for this. From here create a **send message block**, then select **Customer Feedback**.

You will then be able to add a title and subtitle and press the button named **rate experience**.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F5HbsrYnXRfu0CXdpoY9f%2Fcustomer_feedback_08.568f32f7.png?alt=media&amp;token=d4923919-9c28-4d9b-b204-10f5ad784a2b" alt=""><figcaption></figcaption></figure></div>

You will then be able to give the button a title, select the topic you want to use and save the responses to a [user field](/contents/custom-fields#user-fields). Once done press save you will be able to send this customer feedback to any user that enters the flow and this block.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRQoABqSSUfLomzHSDoTW%2Fcustomer_feedback_09.9897e837.png?alt=media&amp;token=ef914421-8c68-4123-bde8-4a62d024af05" alt=""><figcaption></figcaption></figure>


# Error Logs

Error logs can help you troubleshoot bugs that can happen inside your chatbot. It can save you a lot of time trying to figure this out yourself otherwise.

To access the error log you can go to **Tools** from the left-hand menu, then select the first tab called **Error logs**.

From here you will have a complete overview of all errors that have happened in the chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FT0RDDfsF7ViNz2k7p02s%2Ftempsnip.png?alt=media&amp;token=a4ebec6b-7914-431e-a9c6-c1fb4107f5a9" alt=""><figcaption></figcaption></figure>

From here you can see the date of the error, the kind of error, which user it affected, which sub flow it happened in along with the node that has the error, and more information.

If you press on the node of the error message it will take you directly to the point where the issue was registered at.

This will speed up troubleshooting immensely and save you hours you otherwise would waste in trying to find the bug.


# Testers

To help you with testing your flows before they go live you can invite testers inside your chatbot. This will help you troubleshoot any potential problems that are happening in your flows.

So to clarify a tester can view a flow that is not yet published.

Assume you have a published onboarding flow that is accessible to the public, but you made changes in the backend which are not yet published. You will be able to let testers preview those flows.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJ19hc0LKjsVXEICEQxOZ%2Ftempsnip.png?alt=media&amp;token=b28c544d-0f86-4d22-9ddc-b74afddb031d" alt=""><figcaption></figcaption></figure>

To invite a tester they will need to be a subscriber to your chatbot.

### Invite and manage testers <a href="#invite-and-manage-testers" id="invite-and-manage-testers"></a>

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FxT28YXZjkScYUNOE0a6i%2FCapture.PNG?alt=media&amp;token=4b380408-07b6-46e6-a7d1-942fb15cb07f" alt=""><figcaption></figcaption></figure></div>

To invite a tester to your chatbot just go to **Tools** from your left-hand menu, then select the **Testers tab**.

To create a new tester just press the button in the top right corner named **+ New Tester**. From here you will be able to type in the name of the person you would like to be a tester inside your chatbot.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FKXEp6VUkYGjAgRXctcNf%2Ftempsnip.png?alt=media&amp;token=c52b64d2-f53e-4aba-bac2-ac3af180f700" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Again do note that this person you want to appoint as a tester needs to be an active subscriber of that chatbot.
{% endhint %}

Once done you will return to the main overview for the testers where you can also manage them from.

You will see the users who are invited by you as a tester and if you want to delete them you can press the trash bin icon to the right of each user to do so.

### How to send testers flows <a href="#how-to-send-testers-flows" id="how-to-send-testers-flows"></a>

To send testers the flows in the draft version you can do so in a few ways.

You can share a link to the particular flow, or let them type a keyword that will trigger the flow.

Another way to let testers view content regular users cannot is by using the condition inside the flow builder for it.

Just go to any flow and insert a condition block. From here search for the condition named **is tester**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FYEg1C88azKcSGcN079Zk%2Ftesters_04.5ccb3a49.png?alt=media&amp;token=c0fd4c8a-f4b2-4755-85eb-122a85d03c9e" alt=""><figcaption></figcaption></figure>

This way you will be able to send a tester to one part of the flow you want to be tested and a regular user can just follow the flow already fully published.


# Admins

Besides the regular members, you can invite to your workspace you can also invite admins to your chatbot only.

With a condition you can set up admin menus for them they can access like getting a report or wanting to get some insights into the chatbot.

### Invite and manage admins <a href="#invite-and-manage-admins" id="invite-and-manage-admins"></a>

To invite an admin go to Tools from the left-hand menu and select the Admins tab on top.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FPHmRGEiiTNBxTdFWdjWv%2Ftempsnip.png?alt=media&amp;token=683eda44-fd70-4967-9161-6eac52b63ab2" alt=""><figcaption></figcaption></figure>

From here you will get to the main overview.

To add a new admin the user you want to invite needs to be a subscriber to your chatbot. If they are then press the button on the top-right corner named **+ New Admin**.

From here a pop-up window will appear where you can search for and add a new admin.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FSXAu83oOiwCRdEzXYRhn%2Ftempsnip.png?alt=media&amp;token=497644c7-2d9f-45bd-b866-c4a2c70e3d3a" alt=""><figcaption></figcaption></figure>

Just type in the name of the person you want to have as an admin and press the plus sign to have them added as an admin. Once you press the plus sign you will return to the main menu where you can manage all admins.

At the right of each admin, you have the option to delete them if you like.

### How to set up an admin flow <a href="#how-to-set-up-an-admin-flow" id="how-to-set-up-an-admin-flow"></a>

Now that you have appointed an admin you can set up admin specific flows for them. This is ideal if you want to give a business owner some insights as to what is going on inside the chatbot but don’t want to give access to the backend of that chatbot.

Just go to any flow you like and insert a condition block. From here search for the condition **Is Admin**.

If the condition is set to yes you can send the admin to the admin mode where you can set up access to whatever you like.

An example could be;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FENVn0oyuF3VOltyYWq3p%2Fadmins_04.1d3e1908.png?alt=media&amp;token=74f1e46c-b106-4c2f-8102-e303b0d3fd54" alt=""><figcaption></figcaption></figure>

It is a great way for business owners to get access to certain features on the front end while not having to worry about them having access in the backend.


# Multi Languages

You have the ability to provide a multiple language chatbot experience. It is very easy to set up as well.

### How to add a new language <a href="#how-to-add-a-new-language" id="how-to-add-a-new-language"></a>

To add a new language just go to **Tools** from the left-hand menu, then select the **Multiple languages** tab.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXS4icJEiNFa3isvzItkn%2Fmultiple_languages_01.661d34c7.png?alt=media&amp;token=e1fc8fec-874c-4d5f-a0e4-67179f96c72f" alt=""><figcaption></figcaption></figure>

From here just press the button in the top-right corner named **+ New language**. Once pressed a popup window will appear where you can select a new language.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FcynSlA5q4NPWNZWZvhJh%2FCapture.PNG?alt=media&amp;token=c9e3fc41-d880-4600-9633-463cac211ef5" alt=""><figcaption></figcaption></figure>


# Inbound Webooks

An inbound webhook is a useful tool for a chatbot that allows it to receive data from different sources using a POST request. This means that the chatbot can communicate with people who have never interacted with it before.

{% embed url="<https://youtu.be/oWn6hP0IDaw>" %}

For instance, when a website visitor provides their contact details, the chatbot can receive the information through an inbound webhook and send an SMS confirmation to the visitor's phone number. If the webhook is integrated into a Voice bot, it can even call the visitor immediately.

A key benefit of using inbound webhooks is that it allows chatbots to communicate with users seamlessly, improving customer engagement and response times.

{% hint style="info" %}
Rate limits is 500 request per 24 hours. If you require more, reach out to our support.
{% endhint %}

### Create Inbound Webhook <a href="#create-inbound-webhook" id="create-inbound-webhook"></a>

To create an inbound webhook navigate to the Tools tab in your chatbot then select inbound webhook.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQHFkLd7u6vMY6JiYjKXk%2Ftempsnip.png?alt=media&amp;token=78acdb6c-fd14-4988-b39a-1508521b5940" alt=""><figcaption></figcaption></figure>

From here click the + New Inbound Webhook button to the right of the dashboard. Next add a memorable name. Now you will see a new window as shown below or by clicking the edit button. This is where you add all the data.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FI1hCqRJOJCF5L3N6eTVb%2Fwebhook%20dashboard.PNG?alt=media&amp;token=45040bde-f68b-4d03-9f39-f2e53f914aa2" alt=""><figcaption></figcaption></figure>

Follow these exact steps to get set up correctly.&#x20;

First you need to **copy the webhook URL** and then **click Listen to payload data** and add the webhook URL to the software where you want to get data from. In our example we will be using a website builder.&#x20;

When you have clicked the **Listen to payload data**, this window will display. This means that the webhook is waiting for some data.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FOzmazRGJY85mHI0UJ864%2FLISTENING.PNG?alt=media&amp;token=3e1c85be-1718-4742-adbc-5c0f950c085e" alt=""><figcaption></figcaption></figure>

Now once we have copied the **webhook url** and clicked **listen to payload data**, let's head over into the website builder and paste the webhook url into place.

The website platform we are using has a very easy webhook set up process. **Paste in the Webhook URL** and **select the event**. In this example we are wanting to trigger a chatbot flow when someone makes a booking from the website. Your events could be anything depending on your platform of choice.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F106cYRF5lxRPBlSu9wRX%2Fwebhook%20added.png?alt=media&amp;token=383045b4-08db-441b-a680-6f83a537ac10" alt=""><figcaption></figcaption></figure>

The next step is to run a live test. The means we need to make a booking so that the information can be sent to the chatbot.&#x20;

Once you have run the test head back to the chatbot and **click on Done** and now you will see lot's of information from the test booking we just made.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRkBT60OjG9eHVLzFtw2I%2Fevent%20data.PNG?alt=media&amp;token=01d067f5-f243-4b1d-8aae-96b930af02fe" alt=""><figcaption></figcaption></figure>

Now that we have data in the sample json payload box, select the green button 'Preview Payload' this will move all the data down so we can use it. Once pressed you will see that the data has been added to the sample data area.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6H5AXukugvPV34zdnGvm%2Fpreview%20payload.png?alt=media&amp;token=4d1d4f0c-0e89-4aad-8ea8-d88d2b10a741" alt=""><figcaption></figcaption></figure>

### Json Path Mapping

Whenever the webhook receives data, it first checks the paths you specify to see whether it can find an existing user in the chatbot.

If the user is not in the system, the chatbot will create a new profile. That's how the chatbot initiates a conversation without talking to the user previously.

However, some channels don't allow the chatbot to start the conversation first due to privacy and spam issues.

For example, your SMS bot can send messages as long as you have the recipient's phone number, while your Facebook Messenger chatbot cannot send messages to a Facebook user who never talked to your bot before.

### **Process for User Identification**

This is the process of how the system identifies a user:

At least one of the `User Ns`, `Crm Contact Id`, `Phone` and `Email` should be sent in the payload.

1. If `User Ns` has value, return bot user if matched, stop process if no match.
2. If `Crm Contact Id` has value, return bot user if matched, otherwise continue next check.
3. If `Phone` is valid, return bot user if matched. otherwise new bot user will be created under  channel
4. If `Phone` is not valid, but `Email` is valid, return bot user if `Email` matched , otherwise new bot user will be created with valid `Email`

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fu9TvP0KEUiJ9lWmaPCVT%2Fsamp.PNG?alt=media&amp;token=bd2a81fa-f18d-469a-b0b5-d2c34cfe7f19" alt=""><figcaption></figcaption></figure>

### Add user data to path mapping

To add your data values to the path mapping you need to get the path value from the sample data below. In this example we will just get the email address.

1. Select the contacts email field
2. Copy the JSON path data
3. Paste the JSON path data into the email field

{% hint style="info" %}
If you are just adding phone numbers, then search for the contacts phone number field and repeat the same process.
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FuUz0dTQ5PmfDIlkrRcZT%2Fget%20sample.png?alt=media&amp;token=98f5dc85-0b32-4c8b-a64c-b47da980aee9" alt=""><figcaption></figcaption></figure>

### Storing the users data

Now we want to store the contacts data so we can use it later on, or in this example we're sending a booking confirmation message. At the bottom in the sample data area, you can store all information into a json variable or take specific parts of the data for example, the booking start date, Name and any other information you think you may need.&#x20;

First select the data you want to store. In this example we want to store when the contacts meeting is booked for and their full name.

1. Select the data point: example, Start
2. Create or select a custom field you want to save the data to
3. Click add, once you click add the information will be added to the bottom.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FGo72ehTbLGl59d2KYGZe%2Fsave%20pauloa.png?alt=media&amp;token=d701d14a-b953-4581-a921-21cb5e076ba2" alt=""><figcaption></figcaption></figure>

Great, that's all the hard work done! Now click save and now we want to add the flow that will be sent to a contact upon booking a meeting with us.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F6HIpii9s6Z1ngyffuZOA%2Fhook%20flow.png?alt=media&amp;token=642aa4f3-52f0-449a-a8c0-013b7a305ab2" alt=""><figcaption></figcaption></figure>

Once you have your flow connected, be sure to make the inbound webhook active, by turning it on.

Now you are ready to run a live test to ensure everything is working ok. If you do get any errors, or something didn't work - Check the logs, this will tell you if anything went wrong.&#x20;

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FtCznODyPzKj6gwF6ayKh%2Fweb%20logs.png?alt=media&amp;token=fe02569e-6b95-478b-af3f-ea6112807d19" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
If you experience any further issues, check the data first - check the flows and ensure you have the right data selected in the json sample data. If you still have issues, let us know and we can assist.
{% endhint %}


# Broadcasts

Use this feature to broadcast messages to your users! Just a few settings needed.

Go "Broadcasts" from the left sidebar, then click "+ New Broadcast".

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FhPmc9CFuaMmlYH2iltTE%2Fbroadcast1.43b03e16.png?alt=media&amp;token=3a1a8d1e-cceb-4104-956e-1ed2753c54b5" alt=""><figcaption></figcaption></figure>

Select the message type/destination

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FRI2hJb2YokG53LGraLtF%2FCapture.PNG?alt=media&amp;token=715700c1-be74-41b8-9107-816cccc73667" alt=""><figcaption></figcaption></figure>

To setup:

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FAYaOOt8iS7tVTS7ck5oP%2Fbroadcast2.b86f397d.png?alt=media&amp;token=b3bdeae4-e46f-43ff-b046-420c2cc373e4" alt=""><figcaption></figcaption></figure>

1. give a broadcast title (for yourself, not users)
2. select a sub flow
3. add conditions to filter who will receive this broadcast message

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FklkrwifMXoZzshvbtvol%2Fdownload%20(38).png?alt=media&amp;token=3ec598f2-c362-4f9f-a672-2fed7439ebe6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To send to all users, try this condition "If User Id has any value".
{% endhint %}

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNA13NO0zjSjCsORxThwE%2Fdownload%20(39).png?alt=media&amp;token=be9c446a-0ff9-41c9-8864-cde501eda5fe" alt=""><figcaption></figcaption></figure>

Filling in the rest settings like message type and time to send then click "Save". ([Which message type should I choose?](/bot-automation/sequences#message-settings))

If you choose "Now" for the schedule, the message will be sent once you click "Save". If not, you can cancel the broadcast anytime before it sent.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpcscZRmznUkfYLmAm0Eg%2Fbroadcast5.ea8f2424.png?alt=media&amp;token=88e3a71c-4626-4da5-bfd4-6e4026622379" alt=""><figcaption></figcaption></figure>

Here is also where you check broadcast history and data.


# Chatbot API

Go to API documentation 👇

{% embed url="<https://app.flochat.ai/api>" %}

### Intro to API

Flochat's API is used to retrieve data from the flow you build. Here are some examples that you could do with the API.

* Pull the flow you have built from Flochat.
* Create, delete or obtain data including flow tag, flow field.
* Dealing with the data about the subscribers, involving getting the subscribers' information, editing their tag or field as well as sending sub flows to the subscribers.
* Configure all the data used in e-commerce such as carts or products.

If you need to deal with the data below, the next sections will introduce the steps to use the API.

### Authorization

Since the protection of the data is important to the API, it needs to use several attribute to authorize your identity. Therefore, the first step you must do is to enter the authorized information. You need to click the **Authorize** button.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FMNQrWqmZbv786ipTe275%2FCapture.PNG?alt=media&amp;token=d09eed32-03f0-49b6-9a95-ee0d5e7d5cc0" alt=""><figcaption></figcaption></figure>

Then paste in your API Key

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fm20AxoCunagtmgdUgIaS%2FCapture.PNG?alt=media&amp;token=cf4671e7-94c5-49c8-8f8f-2ee046e44b86" alt=""><figcaption></figcaption></figure></div>

### Find Your API Key

Navigate to the top right of your dashboard and select the drop down menu as shown below.

<div align="left"><figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FNRTIJfRcqjdEcBHUezKC%2Ftempsnip.png?alt=media&amp;token=a5233f28-539c-408f-8642-04b6becf535d" alt=""><figcaption></figcaption></figure></div>

### Create Your API Key

To generate your API key, simply add the details to the create API token screen.

* [x] Name your token
* [x] Select Workspace
* [x] Select Chatbot

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F3nhhkuBcMJjSus071LwV%2FCapture.PNG?alt=media&amp;token=17b6eeb3-db64-49fc-8953-d7fd7ebf8614" alt=""><figcaption></figcaption></figure>

Once you have filled in your details, select the create button. You will now see your API key in the next pop up.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJt3qfrqlnOC0717SMWK3%2FCapture1.PNG?alt=media&amp;token=3cfac3ea-9896-405a-85dc-8f619d9a58a6" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**WARNING**

This is the only time the key will ever be displayed, so be sure not to lose it! You may revoke the key at any time from your API settings.
{% endhint %}

### Get the Curl and Request URL <a href="#get-the-curl-and-request-url" id="get-the-curl-and-request-url"></a>

Curl is used in API requests. In Flochat's API documentation, you need some operation before getting the curl in the api documentation.

Here, we use **Get Flow Tag** as an example.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F8RoXjKgdWRLC9JiTPS9u%2FCapture.PNG?alt=media&amp;token=b7eb015d-b849-4c41-afd7-015cd5d75e33" alt=""><figcaption></figcaption></figure>

**Step 1.** Click the expand operation of category, the **Flow Tag** in this case. Then find the action and the feature, **Get /flow/tags**. Click the row and a page will dropdown shown as following.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FmUxxC2KHEDlX1V6PSA14%2FCapture.PNG?alt=media&amp;token=659d51c4-11f0-401a-a0e4-5bc1d7584186" alt=""><figcaption></figcaption></figure>

**Step 2**. This padlock means **authorized**. If you have done this before, this step is not required. Or, you just do the same as it was mentioned before in the Authorize section.

**Step 3**. Click Try it out. Then you will see that the **Parameters or Request body part** could be inputted and the **Execute Button** is shown at the bottom of this part.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUJiP1epzEiGG5z7x57CG%2FCapture.PNG?alt=media&amp;token=540bd849-9360-4550-9891-1003bb1030bb" alt=""><figcaption></figcaption></figure>

**Step 4**. Enter the parameters or request body required and click the **Execute Button**. Finally you will get the **Curl** and **Request URL**.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FXoHU0FohBUDrBhAihKvO%2FCapture.PNG?alt=media&amp;token=d240094f-8775-4ad2-b7d1-414052340c77" alt=""><figcaption></figcaption></figure>

### Response

This part display the Json result you will get from the API. Normally if the code is 200, it means that you get the response successfully. If the code is 400, it means that there is error in your response.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FWKw7b876U1GEwacEW4tr%2FCapture.PNG?alt=media&amp;token=7115480e-38f0-4f41-aea3-59c151056c74" alt=""><figcaption></figcaption></figure>

### Example Value / Schema <a href="#example-value-schema" id="example-value-schema"></a>

Apart from example value, you can click on "Schema" to view more details like which value is mandatory. Denoted by the red Asterix <mark style="color:red;">\*</mark>

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQ9uVtMIC3EGgMabhflQl%2Ftempsnip.png?alt=media&amp;token=7170dd2d-2fe9-4969-ab03-f4b818062663" alt=""><figcaption></figcaption></figure>


# Day One

### Day 1: Build a Strong Foundation

* Understand the incredible potential of chatbots and how they can revolutionize your business.
* Get acquainted with our cutting-edge chatbot software and discover how it can streamline your operations.

### Homework Guide

Today we spoke about how to use one of the most popular lead generation and engagement features, called a comments growth tool.&#x20;

The comments growth tool enable you to do a multitude of this such as:

* Auto reply to comments on Facebook and Instagram
* Send follow up messages to capture lead data
* Using AI to enhance your customer support automation

### How to set up the comments growth tool

As mentioned the tool can be used on both Facebook and Instagram respectively. You can read more about how to connect your social media channels to Flochat [**Here** ](/chatbot-guide-for-beginners/channels#facebook-and-instagram)

Once you have connected your Social media channel, the next step is to create the chatbot flow.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FUMH2pHY9FIKgNjAko5Jv%2Fcgt.PNG?alt=media&amp;token=cd82e9bd-0a53-47db-abb1-a3ebcbff0aea" alt=""><figcaption></figcaption></figure>

Download the pre-made flow

{% embed url="<https://app.flochat.ai/templates/u9zfjahcit2dwzu2cmdo00qbx8vsfcl1>" %}

### How to create the flow

When designing your flow for the comments growth tool, it's important to understand - What your [Scope](/getting-started-guide/building-your-chatbot) is. Basically what is the outcome you want to achieve. Read more below:

{% content-ref url="/pages/ef4Xz1RVMQx6eu8y4wOf" %}
[Building your chatbot](/getting-started-guide/building-your-chatbot)
{% endcontent-ref %}

In our example we basically want to capture the prospects email address so we can send them a guide. Note: You don't have to send an email as you can add the guide directly into the flow.

Let's take a look at the email capture node. Create an action step and slect the email tab as shown below.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FJSOqyEpy7sUUv6BfegY4%2Femail%20action.png?alt=media&amp;token=37083ee6-94cf-4d09-8ecd-4d42cbb35aad" alt=""><figcaption></figcaption></figure>

Once you have selected the email tab, you can now type in your question ie: what's the best email to send it to etc etc. Next step is to save the response to an email system field. This means whatever email the add will be saved to their profile. The final step is to turn on the auto Opt-in Email.&#x20;

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F7BBPoVh93ogeSgc81xmd%2Femail%20capture.png?alt=media&amp;token=771c65f3-d5a3-4af3-9e76-1955213c41e6" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Note: Facebook and Instagram already have the users email, so it will display automatically so they just have to tap it. This saves time and errors typing it in manually.
{% endhint %}

Great, the rest of the flow is pretty self explanatory. &#x20;

### Create the comments growth tool

The next step is to go ahead and create the comments growth tool. Navigate to the automations tab > Comments Keywords > New comment keyword.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FbeZ6EGD0mWcYINYXrbS7%2FCommets%20tab.png?alt=media&amp;token=7e78c223-5627-463b-b17c-47500544f5ec" alt=""><figcaption></figcaption></figure>

### Set up comments growth tool

Now we can set up the actual tool itself. First you need to select which post/channel you want to use to help generate leads and comments.&#x20;

The next step is to define what keyword you want your audience to type in so they get an automated response and the follow up message. This could be anything depending on the type of post. For example if you want do run a giveaway, you could create a keyword 'Send' So once someone comments that word the automation takes over.

Create some varied responses

The next step is to add the flow you just created - click save and it's done.

<figure><img src="https://2836971782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F01gV9kO0lldShWoIigCw%2Fcomemnts%20.png?alt=media&amp;token=38f1a0e3-6fd1-4cdf-b97e-2de247b3b50b" alt=""><figcaption></figcaption></figure>


