> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theomnibot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Keywords: Trigger Automated Responses from Customer Messages

> Set up keyword rules in ChatbotX to detect phrases in customer messages and instantly trigger text replies or full conversation Flows automatically.

**Keywords** let ChatbotX detect specific phrases in a customer's message and automatically trigger either a static reply or a matching Flow. This is an effective way to create fast-response rules for predictable situations — guiding customers to a menu, checking order information, or answering frequently asked questions. For more natural conversations that require deeper context analysis, ChatbotX recommends combining Keywords with **AI Agent** support.

## Management Interface

Open **Keywords** from the left navigation. Use the tabs at the top to choose which direction of messaging should trigger the rule:

| Tab         | Trigger direction                                                                                     |
| ----------- | ----------------------------------------------------------------------------------------------------- |
| **Contact** | Triggers a response when a message **from a customer** contains a configured keyword.                 |
| **Page**    | Triggers a response when a message **sent by your Page** to a customer contains a configured keyword. |

Each tab contains two main areas:

* **Folders** — Organize keyword rules by campaign or use case, such as `Promotions` or `Customer Support`. Create a new folder with **+ Create Folder**.
* **Keywords list** — A table showing every rule with columns for **User Message**, **Bot Response**, **Status**, and **Created At**.

## How to Create a Keyword Rule

<Steps>
  <Step title="Open the creation modal">
    Click **+ Create Automated Response** in the top-right corner of the Keywords page.
  </Step>

  <Step title="Set up the User Message">
    Enter the keyword or phrase that the system should recognize — for example, `price`, `consultation`, or `menu`. Click **(+) Add more** to add multiple keyword variations that should all trigger the same response, such as `price quote` and `pricing`.
  </Step>

  <Step title="Set up the Bot Response">
    Choose one of the two response types:

    * **(+) Add text reply** — Sends a text message immediately. Best for short, direct answers.
    * **(+) Add flow reply** — Selects an existing Flow from a dropdown. When the keyword is matched, that Flow starts automatically.
  </Step>

  <Step title="Save the rule">
    Click **Confirm** to save the keyword rule. Use the **Status** toggle in the list to enable or disable it at any time.
  </Step>
</Steps>

## Page Keyword Responses

**Page keywords** let your team trigger an automated response by including a configured keyword in a message sent from the Page side of the conversation. For example, an agent can type a short keyword that instantly starts a predefined Flow for the customer — without navigating away from the Inbox.

<Steps>
  <Step title="Switch to the Page tab">
    Open **Keywords** and select the **Page** tab.
  </Step>

  <Step title="Organize (optional)">
    Click **+ Create Folder** to organize Page keyword rules by campaign or use case.
  </Step>

  <Step title="Create the rule">
    Click **+ Create Automated Response**, enter the keyword ChatbotX should detect in messages sent by the Page, and choose the Bot Response (text reply or existing Flow).
  </Step>

  <Step title="Confirm and manage">
    Click **Confirm** to save. Use the **Status** toggle to enable or disable the rule.
  </Step>
</Steps>

<Warning>
  A message containing a Page keyword can repeatedly trigger another message to the customer and create an **infinite loop**. If this happens, disable the Page keyword immediately and verify that the automated response does not contain the same keyword.
</Warning>

## Automation Priority Order

When rule-based automation and AI are both active, ChatbotX follows a strict priority order to handle each customer message accurately:

| Priority        | Layer                  | Behavior                                                                                                                                                                |
| --------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **1 — Highest** | **Keywords**           | The system always checks the Keywords list first. If a valid keyword is found, the matching action runs immediately and processing stops.                               |
| **2**           | **OpenAI / LLMs**      | If no keyword matches, the message is sent to the highest-priority AI model (OpenAI by default) for analysis and response.                                              |
| **3**           | **Fallback AI models** | If the main AI model fails to connect or times out, the system automatically forwards the request to preconfigured backup models (Claude, Gemini, xAI, DeepSeek).       |
| **4 — Lowest**  | **Default Reply**      | The final fallback when all automation and AI options are unavailable. The system sends a fixed message — such as a delay notice or a handoff message to a human agent. |

<Tip>
  Keywords are the fastest and most reliable automation layer in ChatbotX. Use them for high-frequency, predictable messages (opt-outs, FAQs, menu navigation) and let AI handle everything else.
</Tip>
