# How to create and set up a chatbot

> Template, greeting and tone, knowledge from instructions, quick replies, rules, scenarios, handoff to a person, sandbox, publishing and versions.

Источник: https://jecheck.io/en/docs/bots/create-bot

A bot is set up in the editor: the tabs on the left define what the bot knows and how it behaves, and the sandbox on the right lets you test it right away. Changes accumulate in a draft and reach customers only after you click **Publish**.

![How to create and set up a chatbot](/docs-media/en/bots/editor.jpg)

## What you need

- the **Chatbots: settings** permission;
- customer-facing instructions in the [Instructions](/docs/instructions/overview) section — menu, prices, rules, delivery. You can also start without them, with quick replies.

## Step by step

1. **Create a bot.** In the **Customers → Chatbots** menu, click **New bot**, enter a name and choose a template:
   - **Guest support** — answers from instructions, accepts complaints and creates a task for the location manager;
   - **Requests and bookings** — collects the customer's name, phone and wishes and passes the request to employees;
   - **Blank bot** — basic rules only.
2. **The "General" tab.** The bot's name (this is how it introduces itself to customers), the tone — friendly, formal, or "short and to the point", the greeting and the **About the company and the bot's role** paragraph: who you are and how the bot helps. Here you also set the reply languages (empty — the customer's language), the locations the bot knows about, and checkboxes: whether to say it's an AI, whether emoji are allowed, whether to clarify the location, whether to ask for a rating.
3. **The "Knowledge" tab.** Turn on the switch next to the instruction folders that may be shown to customers — the bot will start using them within a minute or two. Below are **Quick replies**: an exact answer to a frequent question ("Is there parking?"). Employees can also insert them in Conversations with one button.
4. **The "Rules" tab.** What the bot may and may not do: "Don't promise discounts", "Quote prices only from the knowledge base", "Don't discuss competitors". One rule per line.
5. **The "Scenarios" tab.** Step-by-step instructions for typical situations — see below.
6. **The "Actions" tab.** What the bot can do in jeCheck and your systems — see [Bot actions](/docs/bots/actions).
7. **The "Handoff to a person" tab.** When to call an employee, whom, and what to tell the customer — see below.
8. **Test it in the sandbox** on the right and click **Publish**. Then connect [channels](/docs/bots/channels).

## Knowledge: what the bot sees

The bot answers only from instruction folders open to customers. You can open a folder right on the **Knowledge** tab with the switch — or in [Instructions](/docs/instructions/overview) itself, in the folder's AI visibility settings ("customers"). Subfolders inherit the parent's visibility.

If several folders are open and this bot should use only some of them, check **This bot uses only the selected folders, not all open ones** and select the ones you need.

> [!TIP]
> Write customer instructions in simple sentences, one topic per article: "Menu and allergens", "Delivery and payment", "Booking with a stylist". The more precise the title, the more reliably the bot finds the answer.

## Scenarios

A scenario is an instruction for a typical situation written in plain text. It has two fields:

- **When to apply** — the situation: "The customer is unhappy with quality, service or cleanliness".
- **Steps** — one step per line: what to ask the customer, which action to call and what to say at the end.

Example of a "Complaint" scenario:

```
1. Apologize sincerely, without excuses.
2. Clarify the location, the time and what exactly happened. Ask for a photo if appropriate.
3. Summarize the complaint and ask whether everything is correct.
4. Call the "Customer complaint" action.
5. Give the request number and say that the manager will look into it within 24 hours.
6. If the customer demands compensation, hand the conversation to an employee.
```

Don't want to write it yourself? Describe the situation in your own words in the field above the list and click **Generate**: the AI will suggest a name, a condition and steps that you can edit before saving.

## Handoff to a person

On the **Handoff to a person** tab, set when the bot calls an employee:

- **The customer asks for a person**;
- **The customer is irritated or the situation is a conflict**;
- **The bot found no answer N times in a row** (0 — don't hand off for this reason).

**To** — a department queue or employees with the permission to reply at the conversation's location. The bot sends the **Message to the customer on handoff** itself. If you turn on **Respect working hours**, outside working days and hours the customer gets a different message — that an employee will reply later.

Employees get a "Customer is waiting for a reply" notification, and the conversation appears in **Conversations → Awaiting reply**.

## Sandbox

On the right of the editor is the **Test** window: write as a customer. Under each bot reply there is a **Reasoning** block: what it searched for in its knowledge and what it found, which scenario it opened, which action it would call. Tasks, requests and notifications are **not created** in the sandbox — it only shows what would have been done. GET requests to external systems are executed for real (they only read data).

The sandbox answers using the draft — with your latest changes, even unpublished ones. The arrow button starts the conversation over.

## Publishing and versions

- **Publish** — customers immediately start getting answers from the new version. You can add a "what changed" note.
- The **Answers customers** switch in the header pauses the bot. While it's paused, new conversations go straight to employees.
- The **Versions** tab — the publishing history. **Restore to draft** replaces the draft with the selected version; customers get it after the next publish.

## Frequently asked questions

### Why doesn't the bot find an answer even though there is an instruction?

Check that the folder is open to customers (the switch on the **Knowledge** tab) and that the instruction is published. After a folder is opened, the bot needs a minute or two. If the answer still isn't found, split a long instruction into articles with clear titles or add a quick reply.

### The bot answers customers in Kazakh, but the instructions are in Russian — does that work?

Yes. The bot translates the gist of the question to search its knowledge and answers in the customer's language.

### How do I stop the bot from promising compensation?

Add a rule on the **Rules** tab and a step in the complaint scenario: "If the customer demands compensation, hand the conversation to an employee." The "Guest support" template already has this.
