Crisp is an all in one solution to communicate with customers.
Learn more about what we do.

How to create a custom chatbot?

Chatbots are no longer reserved for developers or big companies with fat wallets that can hire chatbot developers. Today, every business can create a custom chatbot.

How to create a custom chatbot?

Chatbots are no longer reserved for developers or big companies with fat wallets that can afford to hire chatbot developers.

Today, every business can create a custom chatbot.

If you happen to have some experience in chatbot building already, choose your expertise level to skip to the right section:

  • Create a custom chatbot from a template
  • Build a chatbot from scratch
  • Develop a chatbot using an API

So, ready to create a custom chatbot for website or for Facebook Messenger? We will guide you through the different steps.

If you're looking to compare different custom chatbots, we've made an article that compares the leading custom chatbots solution for your business.

How to make a custom chatbot from an existing script?

Let's get started the easy way. Using an existing script to create a custom bot for your website or your Whatsapp number is easy to do.

For example, you can find below some custom bot scripts to help you create your first scenario.

The routing bot template

Routing is one of the keys to success when building a great customer experience. Custom chatbots can help a lot because it lets you gather data about customers' orientation. Therefore, you're able to send the conversation straight to the correct department in your company, with no hassle for the end user.

At Crisp, we're big fans of routing chatbots, that's why we've created this script to let you prepare yourself for your next automated custom bot.

▶ Access the routing chatbot script️

The lead generation bot template

Custom chatbots are a powerful tool in terms of lead generation, especially out-of-office hours. It's a powerful lead gen tool that can bring lots of value to your sales & marketing team.

At Crisp, we've created a pre-sales custom chatbot that is automating the demo booking process. This chatbot script will give you the basis for a powerful 24/7 lead-generation chatbot.

✅▶ Access the lead generation chatbot script️

The away bot template

Office hours are a tough challenge,  especially for B2C brands, as they must be available at every moment. However, teams need to rest.

An away chatbot can help you to improve first response time and decrease dissatisfaction due to slow response time.

▶ Access the away chatbot script

Step 1: Choose the chatbot template you want to customize

Go to Plugins and look for Bot, click ⚙️ "Configure the plugin". Then click on "New Scenario" at the bottom left of your screen.

Tips: There are existing templates already available in your account.

Click on "Use a sample scenario..."

Step 2: Customize your message

Depending on the scenario that you have chosen, messages will be different. However, you can still customize each step of your chatbot template to build the best custom chatbot.

To customize your chatbot, modify the content of each block. To change the text sent through the bot, click on a "Send Message" block, and edit it.

Then click on "Add message for locale" and "Apply changes".

Don't forget to save your scenario; otherwise, you'll have to do everything again.

Note that you can try your bot on the right side to see how it would behave in front of a customer.

Once you're ready, hit "Publish my scenario"🚀.


Create a custom chatbot from scratch

Some chatbot development platforms use complicated bot logic to create simple chatbots. They aim at chatbot programming specialists.

You don’t need to understand programming languages to create your custom bot. Building a chatbot without coding is fun and easy!

Most of these services help create your chatbot for free, but that doesn’t mean they all offer the same features. However, most chatbot platforms provide a good list of features to let you craft great custom chatbots.

For this example, we will explain how to build a custom bot that answers the visitor through your chat widget when you're not available.

Using NLP solution called "Dialogflow" and our Chatbot API, you can create a first chatbot that uses 3rd party APIs.

How to use a chatbot API to create a custom bot that leverages AI and NLP?

From now,  you have to be aware that you'll require coding skills because you'll have to connect your chatbot software with an AI solution so it creates a smart chatbot that can take advantage of NLP to process customers' questions.

Note that it doesn't cost anything as Dialogflow offers a free plan.

You will learn how to connect Dialogflow with Crisp. If you are a complete novice about Dialogflow chatbot platform or new to the Crisp API, no worries, everything will be explained.

Setup your AI custom chatbot

Browse to: https://dialogflow.cloud.google.com/

⚠️ If you already have an agent and an intent, you can go to the next section.

Create an agent.

  1. If you do not have an account, create one.
  2. Click on Create new agent in the left navigation and fill in the fields.
  3. Give a name and set a default language to your agent. Then, click the Create button.

Build your first intent

⚠️ In this section, we will create a simple ping-pong intent. It will be easily extendable.

  1. In the intent pane, click on Create intent and give it a name.
  2. Now, press Add training phrases in the Training phrases section of your intent. Just add "ping" training phrase.
  3. Switch to Responses, and add "pong" response.
  4. Click on Save
Current intent definition.

Test your intent

On the right Try it now, write: ping. You should see: pong has a response.

Expected response

Get your Dialogflow Credentials

  1. Follow Google's guide: https://cloud.google.com/docs/authentication/production#create_service_account
  2. In your service account, add the role: Dialogflow API client.
  3. Download credentials in the json format.

Setup your code using Crisp Chatbot API

  1. Clone the GitHub repository: https://github.com/crisp-im/crisp-dialogflow and get the project dependencies: npm install
  2. Get your Crisp API token: https://marketplace.crisp.chat/
  3. Add respectively the identifier and key inside the cloned repo, fields: crispIdentifier, crispKey.
  4. Add your Dialogflow project ID (or agent ID) in dialogflowProjectId.
  5. Append your environment variables with: export GOOGLE_APPLICATION_CREDENTIALS=PATH_KEY_FILE.json
  6. In the same terminal, switch to project root and execute: node lib/index.js

Test your chatbot

As a customer, send a "ping" message.

Expected response from Dialogflow.

You're now ready to create an AI chatbot that leverages Crisp API to use NLP solution such as Dialogflow.

Ready to improve your customer engagement?