For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect a Conversation Platform: FB Messenger

Connect an Agent to Messenger for a Facebook Page, including required permissions, authorization steps, and frequently asked questions

Before You Begin

MaiAgent Setup

Facebook Permissions

  • Your Facebook account must have been invited to a business portfolio or have created one

  • You must have "full control" of that business portfolio

Check Page Permissions

  • If the Page is already in the business portfolio: no additional changes are needed

  • If the Page is not in the business portfolio: you must be a Page administrator with full control

Don't have a business portfolio yet? Follow Meta's official instructions to create a business portfolio. Its creator automatically receives full control.

How do I check whether I have full control? In Meta Business Suite, go to Settings → Users → People and click your name to view your permissions. If you only have partial access, ask a member of the portfolio with full control to adjust your permissions. See Meta's official documentation for details.

Do I need to add the Page to the business portfolio first? Not necessarily. You can claim the Page directly during authorization. If you prefer to organize it in advance, follow Meta's official instructions to add the Page to the portfolio.

Set Up the Integration

1. Go to the Channels page in MaiAgent and click "Connect Channel"

a. Click Connect Channel in the upper right

b. Select Messenger

c. Click Log in with Facebook and sign in with the Facebook account that manages the Page. MaiAgent only accesses messages for the Pages you authorize, not your personal messages.

2. Select a business and select (claim) a Page.

In the Facebook authorization window, first select the business portfolio to authorize, then check the Page you want to manage (claim).

Confirm the authorization. Once creation succeeds, the Page is connected for management.

3. Agent Settings

Field
Description

Channel Name

Give this integration a name so you can identify it easily

AI Assistant

Select the Agent that will reply to Messenger messages

Select Page

Select the Page you just claimed from the list in the Messenger Channel section

Enable Reset Commands

(Optional) Enable this to add one or more command texts (such as "Start over"). When a user's Messenger message exactly matches one of them, a new conversation is started for that user. The command itself receives no reply; the AI responds in the new conversation when the user sends their next message

If the Page list does not update after authorization, click Reload in the upper right of the Messenger Channel section to authorize again.

4. Verify the Integration

Next, try sending a test message to this channel from MaiAgent's internal conversation interface. If the Agent replies normally, the integration is successful.

You can also open a conversation with the Agent on the Page and send a test message. If the bot replies normally, the integration is successful.

After a successful connection, MaiAgent automatically subscribes to the Page's message events with Meta. No additional Webhook configuration is required.

After connecting, click Edit in the channel list to configure additional features (OCR, using the system time or sender's name in answers, handoff to a human agent, conversation tags, access controls, and more). See Channel Settings Overview.

Configure Conversation Routing for a Page Connected to Another Customer Support System

If the Page has already been connected to another customer support or marketing app (such as Omnichat or Messenger by SHOPLINE), Meta sends Messenger messages to the default routing app specified in "Conversation routing." When MaiAgent is not the default app, the integration may appear successful in MaiAgent, but customer messages are still handled by the original app: MaiAgent does not receive them, and the Agent does not reply.

After connecting, ask an administrator with full control of the Page to change the default app to MaiAgent in Meta Business Suite:

  1. Click Settings → Integrations → Conversation routing

  2. Select this Facebook Page and click Configure

  3. Set Default routing app to MaiAgent, then click Continue

Keep the following in mind:

  • Configure Messenger and Instagram separately: Conversation routing has separate settings for the Page (Messenger) and the Instagram account. If you also want to connect Instagram direct messages, select the Instagram account on the same page and configure it separately. See Instagram: Configure Conversation Routing.

  • You do not need to remove the original app: The default app determines which app receives conversations that no other app is currently handling. Keeping the original app does not prevent new conversations from reaching MaiAgent.

  • The change applies immediately to new conversations, but may not to ongoing ones: After the change, messages from new customers or customers who have not interacted for a while go to MaiAgent. However, conversations already underway in the original app before the switch remain under that app's control, and subsequent messages continue to go to the original system. They move to MaiAgent only after the original app releases the conversation or the customer has not sent a message for about 24 hours (the original app may extend this period to up to 7 days). Earlier messages and conversation history remain in the original system and are not transferred.

  • Ads and dedicated links may have separate assignments: If the original app assigned a handling app to click-to-Messenger ads or m.me links, conversations entering through those sources may still go to the original app regardless of the default app. Change the assignment to MaiAgent in the original app or ad settings, or disable those entry points first.

  • Verify each scenario after switching: Test a new conversation using an account that has never messaged the Page. Keep checking the original system for a few days around the switch to ensure follow-up messages in ongoing conversations are handled. For active ads or links, send a message through each entry point and confirm it reaches MaiAgent. If ongoing conversations must move immediately, ask the original system's provider to release or hand them over.

  • Roll back: Change the default routing app back to the original app. As with the initial switch, rollback takes effect immediately only for new conversations and conversations that have been inactive for a while. Follow-up messages in conversations already underway in MaiAgent will still arrive in MaiAgent until about 24 hours of inactivity have passed. Have your support team continue replying in MaiAgent during this time. You can keep the MaiAgent channel in place; to switch back to it later, simply repeat this step.

For example, an online store's Page was originally connected to Omnichat. After connecting Messenger in MaiAgent, the administrator sends a test message from their personal account. Nothing appears in MaiAgent's All Conversations, but Omnichat receives it. In Business Suite's Conversation routing, the default routing app is still Omnichat. After changing it to MaiAgent, the administrator sends another message from a different account that has never messaged the Page, and it arrives in MaiAgent. However, follow-up messages from customers already talking with support in Omnichat still go to Omnichat. The support team finishes replying to those customers in Omnichat that day; when they check the next day, messages are all arriving in MaiAgent.

The English interface calls this setting "Conversation routing." The reminder on MaiAgent's channel settings page refers to it as "conversation routing" as well. Menu locations may change as Meta updates its interface; see Meta's official Conversation Routing documentation for how it works. Before changing the setting, note the original default app (including if none was set), so you can restore it if needed.

Supported Message Types

Direction
Supported Content

User → Agent

Text, images, videos, voice messages, stickers; images can be recognized with OCR

Agent → User

Text, images

  • Automatic conversion of Markdown to plain text: Messenger does not render Markdown. Headings, bold and italic text, links, tables, and other Markdown syntax in Agent replies are automatically converted to plain text before sending (links become "text URL"). Text entered by human support agents is unaffected. See Message Rendering Improvements: Messaging Channels

  • Consecutive messages are combined into one turn: When a user sends several images in a row, or sends an image followed by text, the Agent waits for the sequence to arrive before replying once. For image-only messages, it replies after about 4 seconds without a new message following the last one, with a maximum wait of about 20 seconds; receiving text triggers an immediate reply. Only one turn is processed at a time in each conversation

  • 24-hour reply window: Meta only allows replies within 24 hours of the user's last message. Messages sent after this window are marked Not Delivered on the conversation page

  • Button events do not currently reach MaiAgent: When a customer clicks Messenger's "Get Started" button or a menu button, Meta sends a button event (postback), not a regular message. These events do not currently enter MaiAgent, appear in conversations, or trigger Agent replies. Messages customers type are unaffected. For example, if the Page had a "Get Started" welcome flow in the previous system, new customers clicking "Get Started" after migration to MaiAgent receive no response, and no entry appears in the conversation history. Once they type a question, their message arrives normally

Frequently Asked Questions

Q: Why is the Page list empty after authorization?

The Facebook account you used does not have full control of the Page, or you did not select the Page during authorization. Check permissions using Before You Begin, then sign in again as a Page administrator and make sure the correct Page is checked in the authorization window.

Q: Why does saving show "This Page ID is already in use"?

The same Facebook Page is already connected to another channel in your organization. Delete the original channel first, then create it again.

Q: A user sent a message, but MaiAgent did not receive it. Why?

If the Page was connected to another customer support system, first check that the default routing app in Meta Business Suite's Conversation routing is MaiAgent. See Configure Conversation Routing. If MaiAgent is already the default but still receives nothing, the customer may have been in a conversation controlled by the old system before the switch, or may have entered through an ad or link assigned to the old system. Test again using an account that has never messaged the Page.

Then confirm that the authorized Facebook account is still a Page administrator and that the Page is still in the business portfolio selected during authorization. If authorization has expired or Page permissions have been removed, delete the channel and reconnect it.

Q: Why do customers still receive automatic messages such as "Our team will reply during business hours"?

These messages come from Meta Business Suite's built-in automated responses and do not pass through MaiAgent, so they do not appear in MaiAgent's All Conversations. Disabling MaiAgent's AI automatic reply schedule does not stop them either. Pages migrated from other customer support systems often retain these previously configured messages.

In Meta Business Suite, go to Inbox → Automations and review Away message, Instant reply, Frequently asked questions, and Leads one by one. Turn off those you no longer need, and update any you want to keep to reflect your current setup.

For example, after a brand switches to human support only, its support team notices that customers messaging at night still immediately receive "Our team will reply during business hours," but this message does not appear in MaiAgent's conversation history. This is Business Suite's away message. Turn it off under Inbox → Automations to stop it. Automated responses for Instagram direct messages are configured in the same place.

Q: Can Messenger and Instagram share the same Agent?

Yes. They are separate channels that can be linked to the same Agent, and each can have its own feature settings. For Instagram integration, see Connect a Messaging Channel: Instagram.

Q: How do I remove (disconnect) Messenger?

In the Channels list, click Delete in the actions column for the Messenger channel and confirm (the icon is disabled if you do not have delete permission). Once deleted, MaiAgent stops receiving and replying to messages for this Page. If you need to keep the conversation history, export it from All Conversations first. MaiAgent does not revoke your Facebook authorization for you. To fully disconnect, also remove authorization for the MaiAgent app in the Page's settings. To reconnect later, repeat Set Up the Integration.

Last updated

Was this helpful?