Keywords are words and phrases that enable the chatbot to determine the next step in the flow. When the chatbot recognizes a predefined keyword in the end user's message, the chatbot directs the flow accordingly.
  
Keywords are especially important for keyword-driven chatbots.
  
## Synonyms
  
When end users respond to your chatbot, they may not necessarily use the keywords. Instead, they may use variations or synonyms of the keywords. Example: Instead of using the predefined keyword 'reservation', the end user may say 'booking'.
  
So, instead of adding these variations and meanings as separate keywords, you can add them as synonyms to an existing keyword. Example: For the keyword 'reservation', you can add the following synonyms: reserve, book, booking, and reservation.
  
The chatbot takes the same action whether the end user's response contains the keyword or a synonym. So, you need to define the next step only for the keyword and not for each synonym.
  
Synonyms can include words, phrases, and emojis.
  
Synonyms are not case sensitive.
  
## How keywords work
  
Identify words that you want end users to send to your chatbot and configure these words as keywords. Example: If you want end users to choose from a list of options, configure each of these options as a keyword. When the chatbot recognizes these keywords in the end user's message, the chatbot directs the flow accordingly.
  
Keyword matching works only if the end user's message contains either the keyword or its [synonyms](https://www.infobip.com/docs/keywords#synonyms) without any spelling errors or additional words.
  
The following example shows how to use keywords to direct the chatbot flow.
  
The keywords and their synonyms are defined.
  
In the **User response** element, the chatbot checks whether the end user's message matches these keywords, and directs the flow accordingly.
  
The end user's message is 'Answers.' In the **User response** element, this message matches the keyword 'Answers'. The chatbot directs the flow to the Answers dialog.
  
The end user's message is 'Chatbots.' The chatbot recognizes 'Chatbots' as a synonym for 'Answers'. So, the end user's message matches the keyword 'Answers'. The chatbot directs the flow to the Answers dialog.
  
The end user's message is 'I want to know about Answers'. Keyword matching fails. The chatbot does not match the message with the keyword 'Answers' because the message contains additional words.
  
The end user's message is 'Answres'. Keyword matching fails. The chatbot does not match the message with the keyword 'Answers' because the end user's message contains a spelling error.
  
## Keywords tab
  
In the Keywords tab in your chatbot, you can view and manage keywords and their synonyms.
  
You can do the following.
  
- View a list of keywords and synonyms.
- Search for a keyword. Use the search box.
- Sort the keywords by name. Select the **Keyword** column header.
- [Create](#create-a-keyword-how-to) a keyword.
- [Edit](#edit-keyword-how-to) a keyword.
- [Delete](#delete-keyword-how-to) one or more keywords.
  
## Guidelines and best practices
  
- You can create an unlimited number of keywords.
- It is not mandatory to add synonyms. But synonyms help the chatbot take the right action for end users' inputs. The more the number of synonyms, the higher the probability for the chatbot to take the right action. So, add as many synonyms to a keyword as possible.
- You cannot add the same synonym to multiple keywords.
- You cannot add a keyword as the synonym of another keyword.
    Example: You have the keywords *travel* and *booking*. You cannot add *booking* as a synonym for the keyword, *travel*.
- Keywords are not case sensitive.
- Do not use the same word as a keyword and as an escape phrase. If you do, the chatbot might not take the expected action. Example: You use *Exit* as a keyword in a **User response** element and as an escape phrase. When the end user replies *Exit* to the **User response** element, instead of taking action for the keyword, the chatbot might take action for the escape phrase.
  
## How to
  
### Create a keyword [#create-a-keyword-how-to]
  
You can create a keyword either from the Keywords tab or through a chatbot element.
  
#### From the Keywords tab [#from-the-keywords-tab-how-to]
  
1. On the Infobip [web interface](https://portal.infobip.com//), go to **Answers** > **Chatbots** and navigate to your chatbot.
2. Go to the **Keywords** tab.
3. Select **New keyword**.
4. In the **Create new keyword** screen > **Keyword name** field, enter a keyword. Example: *booking*
5. (Optional) In the **Synonyms** field, add variations and synonyms of the keyword. Example: *reservation*, *reserve*, and *book*.
6. Select **Save**.
  
#### From a chatbot element [#from-a-chatbot-element-how-to]
  
Some chatbot elements enable you to create keywords. Example: [User response](https://www.infobip.com/docs/answers/chatbot-elements/core-elements#user-response). In the **Keyword** field in the element, select **Create new keyword** and configure the fields.
  
### Edit a keyword [#edit-keyword-how-to]
  
To edit a keyword, select the pencil icon next to the keyword, and update the fields as required.
  
### Delete a keyword [#delete-keyword-how-to]
  
To delete keywords, go to the **Keywords** tab and follow one of these options.
  
#### Delete a single keyword
  
To delete a single keyword, select the Delete icon next to the keyword. In the confirmation screen, select **Delete**.
  
#### Delete multiple keywords
  
Select one or more keywords on the page and select **Delete**. To delete all keywords, select the checkbox next to the **Keywords** column header, and select **Delete**.
  
In the confirmation screen, select **Delete**.
  
### Add synonyms to an existing keyword [#add-synonyms-to-a-keyword-how-to]
  
1. On the Infobip [web interface](https://portal.infobip.com//), go to **Answers** > **Chatbots** and go to your chatbot.
2. Go to the **Keywords** tab and identify the keyword for which you want to add synonyms.
3. Select the pencil icon next to the keyword.
3. In the **Synonyms** field, add the synonyms. Example: For the *Booking* keyword, add the synonyms *book*, *reservation*, *appointment*, and *schedule*.
  
## Example
  
Refer to the sample [rule-based chatbot](https://www.infobip.com/docs/answers/create-chatbot/create-keyword-chatbot) to understand how to use keywords.