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

# Meta Business AI Integration for Messenger

> Learn how to activate Meta Business AI on Meta Business Suite and seamlessly hand over conversations to ChatbotX flows and human agents.

**Meta Business AI** (formerly referred to as Meta Business Agent) is an artificial intelligence assistant developed natively by Meta within Meta Business Suite for Facebook Pages. This capability enables businesses to deploy an intelligent frontline AI representative that automatically answers incoming inquiries 24/7 based on your business catalog and documentation.

When integrating Meta Business AI with ChatbotX, you unlock a powerful collaborative workflow: allow Meta's native AI to handle initial customer discovery and frequently asked questions, then automatically hand over control to ChatbotX flows for order checkout, structured lead qualification, and live agent escalation.

## Parallel Operations and the Handover Protocol

Within the Meta ecosystem, activating Meta Business AI on a Facebook Page introduces an exclusive response policy.

<Note>
  **Meta's exclusive response rule:**
  At any given moment, Meta only allows one platform or application to hold primary ownership (Current owner) of a conversation thread. When Meta AI actively replies to an inquiry, external chatbot engines and regular messaging composers are placed in a listening-only Standby state to prevent conflicting, duplicate answers.
</Note>

The **Meta Business AI** integration in ChatbotX bridges this transition through a reliable three-stage pipeline:

1. **Frontline Discovery (Meta AI handles):** When customers message your Page, Meta Business AI answers inquiries regarding products, general policies, and pricing using trained catalog sources.
2. **Automated Handover:** As soon as Meta AI finishes its consultation or detects that external assistance is needed, the thread is handed back to ChatbotX.
3. **Automated Flow Execution:** ChatbotX immediately triggers your designated Flow (such as order confirmation, storing customer attributes into Custom Fields, or syncing rows to Google Sheets) or routes the dialogue directly to human staff.

## Activating and Training AI in Meta Business Suite

To turn on Meta's business assistant for your Fanpage, follow these steps in Meta Business Suite:

<Steps>
  <Step title="Navigate to Business AI">
    Open [Meta Business Suite](https://business.facebook.com) and switch to the target Facebook Page you want to configure.

    From the left navigation sidebar, select **All tools**, then locate and click **Business AI** (or **Meta Business Agent**).
  </Step>

  <Step title="Enable the Business Agent">
    On the introductory landing card, click the blue **Turn on Business Agent** button.

    <Frame caption="Activating Meta Business Agent in Meta Business Suite">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/meta_business_agent_intro_turn_on.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=81b43b12941437f2425ec8948e2c3396" alt="Turn on Business Agent" width="1024" height="632" data-path="images/meta_business_agent_intro_turn_on.png" />
    </Frame>
  </Step>

  <Step title="Train your AI knowledge base">
    Once activated, you will be taken to the central **Home** dashboard. Configure your AI knowledge sources:

    * **Connect your Google Drive:** Link Google Drive accounts so your agent can index company policies, service guidelines, and product documents.
    * **Add top products:** Provide structured product details by entering them manually or integrating your **Shopee** storefront catalog.
    * **Book appointments with your AI agent:** Enable automatic customer appointment scheduling synced to your calendar.
    * **Test chat:** Test your assistant's live conversational quality in the right-hand testing sandbox using common inquiries such as location, shipping policies, and business hours.

    <Frame caption="Central Meta Business Agent training dashboard">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/meta_business_agent_dashboard_overview.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=33f4e7f08fbe245a334de43178a2a2c6" alt="Meta Business Agent Dashboard" width="1024" height="640" data-path="images/meta_business_agent_dashboard_overview.png" />
    </Frame>
  </Step>

  <Step title="Configure audience and response schedule">
    Navigate to the **Settings** tab in the left menu to establish operating parameters:

    * **Audience:** Choose which contacts the AI should engage (`Everyone` for all chats, `Anyone messaging for the first time`, or `Anyone messaging from ads`).
    * **Schedule:** Set your operational window to `Always available` for uninterrupted 24/7 assistance.
    * **Follow up:** Define how soon the assistant automatically re-engages inactive contacts (such as `Follow up after 1 hour`).

    <Frame caption="Configuring audience, schedule, and follow-up intervals">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/meta_business_agent_settings_audience_schedule.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=4511af152968a15f798873af005d0e9b" alt="Meta Business Agent Settings" width="1024" height="634" data-path="images/meta_business_agent_settings_audience_schedule.png" />
    </Frame>
  </Step>

  <Step title="Switch on AI status">
    Save your changes and toggle the upper-right switch to **AI is on**. A confirmation modal will appear confirming that your assistant is actively responding to customers.

    <Frame caption="Confirmation showing AI responses are active">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/meta_business_agent_turn_on_success_modal.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=2b8e1fe29512ad583592a9eee506be9b" alt="AI is on confirmation modal" width="1024" height="625" data-path="images/meta_business_agent_turn_on_success_modal.png" />
    </Frame>
  </Step>
</Steps>

## Configuring Handover Settings in ChatbotX

Once Meta AI is active on Facebook, configure the return behavior inside ChatbotX to catch conversations after Meta AI completes its session.

<Steps>
  <Step title="Access Messenger channel settings">
    In ChatbotX, click **Settings (1)** from the main navigation menu, select the **Channels (2)** tab, locate your connected Facebook Page under **Messenger**, and click the **Manage (3)** button.

    <Frame caption="Managing the Messenger channel inside ChatbotX settings">
      <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_settings_channels_messenger_manage.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=2f112cf90f7597477e7796e9ff0f0710" alt="Manage Messenger Channel" width="1024" height="561" data-path="images/chatbotx_settings_channels_messenger_manage.png" />
    </Frame>
  </Step>

  <Step title="Enable Meta Business AI">
    Inside the channel configuration view, switch to the **General Settings** tab, scroll down to the **Meta Business AI** section, and toggle on the primary master switch.

    <Frame caption="Meta Business AI configuration card under General Settings">
      <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_messenger_meta_business_ai_settings.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=aff3bfd6fa2d544405924ab11916ca16" alt="Meta Business AI Settings in ChatbotX" width="1024" height="698" data-path="images/chatbotx_messenger_meta_business_ai_settings.png" />
    </Frame>
  </Step>

  <Step title="Configure automation parameters">
    Tailor your handover settings to your business operations:

    * **Apply to all customers:** Enable this toggle to apply the handover protocol to all eligible Messenger threads. Click **History** to review the log of past hand-offs.
    * **Run time:** Specify your operational hours (`From hour` to `To hour`) based on workspace timezone. Click **+ Add time range** to support split shifts.
    * **Go to flow (optional):** Choose the automated Flow that launches immediately after Meta AI hands back the thread (such as the `Information Confirmation` flow for order fulfillment).
    * **Return message (optional):** Supply a fallback text reply sent if no Flow is chosen or if the selected Flow is inactive.
    * **Transfer Conversation to Human:** Enable this switch if you want to stop the bot upon handover, keeping the thread open for a human team member to take over.
  </Step>

  <Step title="Save configuration">
    Click the blue **Save** button in the lower-right corner to persist your settings.
  </Step>
</Steps>

## Setting up Messenger Conversation Routing on Facebook

To guarantee that conversations handed back by Meta AI route into ChatbotX rather than disappearing or falling back to the default inbox, designate ChatbotX as the primary routing app in your Facebook Page settings.

<Steps>
  <Step title="Open Messenger conversation routing">
    Switch your personal profile to the Facebook Page profile, open **Settings & privacy > Page setup**, and select **Messenger conversation routing**.

    <Frame caption="Locating Messenger conversation routing in Page setup">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/messenger_routing_page_setup_menu.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=4022c0fe100c09b23fef8a641f410118" alt="Messenger conversation routing menu" width="1024" height="664" data-path="images/messenger_routing_page_setup_menu.png" />
    </Frame>
  </Step>

  <Step title="Initiate default routing app setup">
    In the Messenger routing console, click the blue **Set up** button within the **Default routing app** card.

    <Frame caption="Clicking Set up on Default routing app">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/messenger_routing_default_app_setup.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=58d077bef678c1309ebefef39f7ea535" alt="Default routing app setup button" width="1024" height="804" data-path="images/messenger_routing_default_app_setup.png" />
    </Frame>
  </Step>

  <Step title="Begin setup wizard">
    In the **Set up conversation routing** dialog, click **Get started**.

    <Frame caption="Getting started with conversation routing">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/messenger_routing_get_started_modal.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=ee7867d91201b0f628276035706beb0b" alt="Get started dialog" width="1024" height="604" data-path="images/messenger_routing_get_started_modal.png" />
    </Frame>
  </Step>

  <Step title="Acknowledge compatibility notice">
    Review Meta's messaging setup advisory and click **Continue**.

    <Frame caption="Acknowledging the compatibility warning">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/messenger_routing_compatibility_warning_continue.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=8d35b9d3351d5a1ddd54ef6352db1a48" alt="Warning confirmation dialog" width="1024" height="604" data-path="images/messenger_routing_compatibility_warning_continue.png" />
    </Frame>
  </Step>

  <Step title="Select ChatConnectX">
    Under **Select a default routing app**, open the dropdown menu and select **ChatConnectX** (the official verified Meta Application for ChatbotX, App ID: `894156910972023`). Confirm to finish.

    <Frame caption="Choosing ChatConnectX as the default routing app">
      <img src="https://mintcdn.com/chatbotx/f6WztMBFuoiFAFOf/images/messenger_routing_select_chatconnectx_app.png?fit=max&auto=format&n=f6WztMBFuoiFAFOf&q=85&s=d7e0345675be599505bfd04eceff158b" alt="Select ChatConnectX default app" width="1024" height="603" data-path="images/messenger_routing_select_chatconnectx_app.png" />
    </Frame>
  </Step>
</Steps>

## Automatically Extracting Customer Data with AI

When paired with ChatbotX, you can extract structured lead attributes from the raw conversational context that Meta AI generated during its session.

Upon thread handover, ChatbotX captures the entire dialogue history into a system variable (such as `{{bizai_chat_history}}`). You can process this history with an **AI Agent** or an **OpenAI / Claude** node in your handover Flow.

### Extraction Prompt Template

When setting up your AI block, apply the following strict extraction prompt:

```text theme={null}
You are an AI data extractor specialized in e-commerce customer conversations. Review the chat transcript carefully and extract the requested fields.

MANDATORY rules:
- ONLY return the exact raw value. Do not explain, do not add greetings, and do not wrap in quotation marks.
- If the requested information is absent from the transcript, return "Empty".
```

### Sample Extraction Fields

Configure specific extraction directives mapped to your ChatbotX Custom Fields:

* `Extract customer phone number from {{bizai_chat_history}}` -> Map to: `phone_number`
* `Extract customer recipient full name from {{bizai_chat_history}}` -> Map to: `full_name`
* `Extract detailed shipping address from {{bizai_chat_history}}` -> Map to: `address`
* `Extract customer product interest or inquiry topic from {{bizai_chat_history}}` -> Map to: `ai_answer`

Connect the success output of your AI node directly into a **Google Sheets** block to automatically log order rows into your fulfillment spreadsheets.

## Controlling AI in Livechat

While Meta Business AI actively consults with your leads, your support team can monitor live interactions from the ChatbotX **Inbox / Livechat** console and take over instantly when necessary.

### Monitoring Meta AI thread status

When a customer is engaged by Meta AI, the Livechat view provides real-time state indicators:

* The customer contact card in the inbox sidebar displays an orange badge: **Standby (Meta AI)**.
* The right sidebar under **Conversation routing** reflects `Thread state: Standby`, `Current owner: Meta AI`, and sets your role to `Standby - listening only`.
* The lower message composer is locked to prevent collisions, displaying an advisory banner: *"You're on standby (listening only). A third-party partner is handling this conversation. The message box is locked to avoid duplicate replies."*

<Frame caption="Livechat interface while Meta AI holds ownership of the conversation thread">
  <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_inbox_meta_ai_standby_take_over.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=349a4d1e20794d390b5bc16b4be59daf" alt="Livechat Standby Meta AI" width="1024" height="512" data-path="images/chatbotx_inbox_meta_ai_standby_take_over.png" />
</Frame>

### Taking over manually (Human Takeover)

If a customer requires customized pricing, urgent support, or expresses dissatisfaction, human agents can intervene immediately:

<Steps>
  <Step title="Click Take over">
    Click the blue **✋ Take over** button on the bottom notification bar.
  </Step>

  <Step title="Engage directly">
    The contact status instantly shifts to a blue **Active** indicator, and the message composer unlocks.

    The routing status updates to `Thread state: Owned` and `Current owner: you`. Team members can type custom replies, upload attachments, or send automated flows.
  </Step>
</Steps>

<Frame caption="Livechat interface after a human agent successfully takes over the conversation">
  <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_inbox_human_takeover_active.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=3a7b4dbfca7f842340046177817e3dc8" alt="Human Takeover Active" width="1024" height="510" data-path="images/chatbotx_inbox_human_takeover_active.png" />
</Frame>

### Handing control back to Meta AI

Once your team has resolved the specific question and wants Meta AI to resume automated consultation, return thread control with two clicks:

<Steps>
  <Step title="Click BizAI on the header">
    At the top-right corner of the active chat window, click the **✨ BizAI** button (hovering shows: *Hand this conversation back to the AI assistant*).

    <Frame caption="BizAI button in the chat header to initiate thread handover">
      <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_inbox_bizai_hand_back_tooltip.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=3efbcfbe145e6e486c13855a41714b94" alt="BizAI Hand back tooltip" width="1024" height="381" data-path="images/chatbotx_inbox_bizai_hand_back_tooltip.png" />
    </Frame>
  </Step>

  <Step title="Confirm thread return">
    In the **Hand back to the AI assistant?** dialog, click the blue **Hand back** button.

    Conversation ownership immediately returns to Meta Business AI, and ChatbotX returns to Standby mode awaiting the next hand-off.

    <Frame caption="Confirmation modal to hand back thread ownership to Meta AI">
      <img src="https://mintcdn.com/chatbotx/I748s-G1lpYJHiTS/images/chatbotx_inbox_hand_back_to_ai_modal.png?fit=max&auto=format&n=I748s-G1lpYJHiTS&q=85&s=1faa0d287eda497c8306bf86ccf1eab5" alt="Confirm Hand back modal" width="1024" height="599" data-path="images/chatbotx_inbox_hand_back_to_ai_modal.png" />
    </Frame>
  </Step>
</Steps>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.