Create a Chatbot from a Template
A chatbot template is a predesigned chatbot that you can reuse and customize to create new chatbots.
Advantages of templates
- Consistency: Templates ensure consistency in chatbot design and messaging across all your chatbots. This leads to a consistent end user experience.
- Quality control: Use standardized, high-quality chatbot templates. This ensures that all chatbots that are built from these templates also have the same high quality.
- Knowledge sharing: Use templates that are built based on successful chatbot implementations. Other users in your organization can learn about chatbot design and use from these templates.
How to use chatbot templates
Use chatbot templates in the following ways:
- Use it as it is for testing and learning. You can activate the template immediately.
- Use it as a base to build a new chatbot. Instead of creating a chatbot from scratch, you can create a chatbot from a template. You can then customize the chatbot for your use case and requirements, and use it in a live environment.
- Use it as a base to build advanced chatbots to use in a live environment.
For information about how to create a chatbot from a template, refer to the Create the Chatbot section.
Available Templates
You can explore chatbot templates in your Infobip account (opens in a new tab).
The table in this section shows a list of all the templates that are available in Answers. In your Infobip account, only the templates that are available for your Answers plan are listed.
Each template is for a specific channel and language. If you want to create a chatbot from a template, you need to have the associated channel enabled in your account. If you do not have the channel enabled, you can preview and interact with the template, but not use it to create a chatbot. To enable a channel, view the instructions in the documentation for that channel.
Template | Purpose | Sample use case | Channel | Language | Answers plan | Chatbot type | |
---|---|---|---|---|---|---|---|
Customer Service | Automate handling frequent customer inquiries. | Answer FAQs Resolve simple issues Share information about your company and services Collect end user's contact information Collect product inquiries | EnglishSpanishPortuguese | Start | Rule-based | ||
Live Chat | English | ||||||
Advanced Customer Service | Automate handling frequent customer inquiries. | Enable end users to make reservations Connect with an agent to provide additional support Answer FAQs Resolve simple issues Collect end user's contact information Collect product inquiries | English | Grow | Rule-basedIntegrated | ||
Lead generation | Contact potential customers and provide information about your company and services. | Present your products and services Collect end user's contact information Collect product inquiries | Live Chat | EnglishSpanishPortuguese | Start | Rule-based | |
Appointment Booking | Automate scheduling appointments and reservations. | Collect end users' interest in your product and services Enable end users to choose a preferred timeslot Send a confirmation for a reservation | English | Grow | Rule-basedIntegrated | ||
Retail chatbot | Automate common product inquiries and provide information about your company and services. | Enable end users to order products Show product suggestions Enable end users to return products Answer FAQs Show order information and order history | English | Grow | Rule-basedIntegrated |
Create the Chatbot
Follow these steps:
-
Log on to the Infobip web interface (opens in a new tab).
-
Go to Answers > Chatbots.
-
If your dashboard contains a list of chatbots, click New chatbot. Otherwise, skip this step.
-
On the Create new chatbot page, view the list of templates. To filter the templates by channel, click a specific channel.
-
To find out information about a template, follow these steps:
- Hover over a template and click Preview.
- Click the About template tab to view the details of the chatbot. You can view information such as the use cases, channel, and type of chatbot.
-
To interact with the chatbot, in the Preview pane, go to the Simulate conversation tab and click Start the chat.
You can interact with the chatbot to understand the flow and features.
-
To create the chatbot, follow one of these steps:
-
In the Preview pane, click Use template.
-
In the list of templates, hover over the template that you need, and click Use.
A new chatbot, which is a duplicate of the template, is created.
-
-
To use the chatbot for a live environment, follow these steps.
- In the chatbot editor, make the changes that are required for your use case. Refer to the Guidelines and Best Practices and Customize the Chatbot sections.
- In the Settings tab, choose the sender. By default, templates do not have senders assigned.
-
In the Simulator tab, test the chatbot.
-
Click Activate. You can now test the chatbot over a live channel.
Guidelines and Best Practices
The following guidelines are specific to customizing the template to use in a live environment. For information about designing the chatbot flow, using entry points, and designing conversations, refer to the chatbot guidelines section.
- Rename the chatbot.
- Customize the content to suit your use case and business. Example: In the Welcome message, mention your business name. In menu items, add products and services that are relevant to your business.
- Any changes that you make must fit into the existing configuration.
- If you add or modify an element, make sure that it is similar to the existing elements. Example: In a List element, if existing list items have icons, add icons to new list items as well.
- If you add or modify an element, add or modify other associated elements, if applicable. Example: If you add a list item to a List element, create a new branch for that item in the User response element, and create an associated dialog.
- If you delete an element or a field within an element, modify or delete other associated elements, if applicable. The associated elements could be in other dialogs. Example: If you delete a list item in a List element, delete the associated branch in the User response element, and delete the associated dialog.
- If you delete a dialog, either modify or delete all references to the dialog. Example: If there are menu items in other dialogs that direct the flow to the deleted dialog, either delete those menu items or redirect the flow to a different dialog.
- If you change the chatbot language, modify the content in the Dialogs tab to match the new language.
- Test all changes in the simulator. Make changes until the chatbot works as expected. After you activate a chatbot, you can also test it over a live channel.
Customize the Chatbot
Templates contain sample content, configuration, and integration. If you want to create a chatbot from a template and use it in a live environment, you must customize the sample content in the chatbot and use content that is required for your use case.
This section shows some common ways in which you can customize a chatbot.
The customization examples in this section are only for reference. When you create a chatbot from a template, you will need to make changes that are suitable for your use case.
You do not need to make all of the changes that are suggested in this section.
This section does not show a complete list of the changes that you can make to the chatbot. Depending on your use case, you will need to make additional changes.
In this section, we will customize the Advanced Customer Service template to create a chatbot for Infobip users.
After we create a chatbot from a template, we will do the following:
Rename the Chatbot
When you create a chatbot from a template, the name of the new chatbot is similar to the name of the template.
Rename the chatbot such that it reflects your use case and business.
In this example, we will rename Duplicate of Advanced Customer Service toCustomer Service - Infobip.
Modify Text Content
In the template, the elements contain sample text. Change the text to suit your use case, business, and communication style.
Example:
- In the Default dialog > Text element, update the welcome message to represent your business.
- In the Menu dialog > List element, update the text to match the communication style of your business.
- In other dialogs, add information that is relevant to your use case. Example: Update the Text element in the FAQs.
Update Menu Items
Menus in the templates contain sample menu items. Update these menus to meet your use case.
In this example, we will change the menu item 'Products' to 'SaaS Products'.
If you add or modify an element, you need to add or modify other associated elements, if applicable.
Test all changes in the simulator. You can also test an activated chatbot over a live channel.
Modify Configuration for Call API
In this example, we will update the API element to connect to a third-party service.
The changes in this example are only for reference and are not for a live connection. You must customize the API element to meet the requirements of your use case and the API to which you want to connect.
Attributes that manage input and output information are important because they transfer information to and from the third-party system. So, configure all relevant attributes correctly.
APIs need specific inputs and produce specific outputs. So, most of the configuration, data preparation, and data manipulation is done in Code elements.
In the template and in this example, we use placeholders {{placeholder}} in API elements. If you do not want to use placeholders, you can directly enter your API URL, variables, and other data that you need for API configuration.
In the Booking dialog, we do the following.
Configure the Request
- In this example, we will create a new attribute 'base_url' in the Attributes tab, and delete the 'mock_server_url' attribute. We create this new attribute only as an example of the changes that you can make. You do not necessarily need to create new attributes and can use the ones in the template instead.
- In the first Code element, change the base URL and path. Also, because we created a new attribute, we need to update the attribute name as well.
- In the API element > Request tab, you can configure the following items.
- Method
- URL
- Content type
- Request headers
- Request body
In this example, we will make the following changes:
- In the URL field, change 'mock_server_url' to 'base_url' by using the placeholder {}.
- The API elements in templates use echo API that contain sample request headers. So, instead of modifying header values, we will remove the existing headers and add new ones. In the Headers section, remove all existing request headers. Add an Authorization header with the authentication token.
- You might need to modify existing parameters to meet the requirements of the third-party API. In this example, the third-party API uses the booking_date parameter. So, in the Body section > key-value fields, change 'date' parameter to 'booking_date'. You can change this change either by using the editor or the key-value pairs.
All changes for the input data are done through the 'date' attribute. The 'date' attribute is managed in the Code element, which is before the API element.
Configure the Response
In the API element > Response tab, you can do the following.
- Save response code
- Save response header attributes
- Save response body
- Set an API timeout
In this example, we will not remove anything. We will add the option to save the Response code to the 'response_code' attribute and add a timeout.
- In the Attributes tab, create a new attribute, response_code.
- In the Response codefield, choose the attribute, response_code.
- In the Timeout field, choose 5 seconds.
Add a Dialog
If you add a new dialog, you need to create or modify associated elements.
In this example, we will add an FAQ dialog to show the working hours of the business.
- To create the 'Working hours' dialog, do one of the following:
- Create a new dialog: Create a new dialog and configure it from scratch.
- Duplicate an existing dialog: Because the chatbot already contains FAQ dialogs, you can reuse the structure of these dialogs. Duplicate an existing dialog and make minor changes to create a new FAQ dialog.
- To keep the dialogs organized, move the new 'Working hours' dialog to the FAQ dialog group.
- Integrate the new dialog with the rest of the chatbot.
-
In the Default group > FAQs dialog, which contains the FAQ menu, we need to add an option for the new FAQ. In the List element, add a new list item, Working hours.
-
In the 'Working hours' list element, define the payload, Work hours, to pass to the User response element.
-
In the Keywords tab, create a new keyword, Working hours, and add synonyms to it. Make sure that you add the payload, which you created in the earlier step.
-
To direct the flow to the new dialog, in the FAQs dialog > User response element, add the new keyword.
-
Add the To dialogelement. Choose the new dialog, Working hours.
-
Delete a Dialog
Delete the dialogs that you do not need.
Example:
- If you do not want a specific functionality in your chatbot.
- If you do have a use case for the dialog.
- If you do not want to reuse the dialog for a different use case.
If you delete a dialog, you need to delete or modify associated elements.
In this example, we will delete the Press/News dialog.
-
In the FAQs dialog group, delete the Press/News dialog.
When you remove a dialog, there is a warning that this action cannot be reverted.
-
When you remove a dialog, make sure that its reference is removed from other places so that end users are not stuck in a dead end. Do the following.
-
In the Default dialog group > FAQs dialog > List element, delete the Press/News list item.
-
In the User response element, delete the keyword, Press and news.
NoteTest all changes in the simulator. Make changes until the chatbot works as expected. You can also test an activated chatbot over a live channel.
You can explore chatbot templates in your Infobip account (opens in a new tab).
-