| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• Discuss (mail) • Calendar (calendar) • Contacts (contacts) |
| Community Apps Dependencies | Show |
| Lines of code | 5742 |
| Technical Name |
us_facebook |
| License | OPL-1 |
| Website | https://unitsoft.com.ua/ |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• Discuss (mail) • Calendar (calendar) • Contacts (contacts) |
| Community Apps Dependencies | Show |
| Lines of code | 5742 |
| Technical Name |
us_facebook |
| License | OPL-1 |
| Website | https://unitsoft.com.ua/ |
Facebook Messenger Integration powered by UnitSoft
Communicate with Facebook Messenger users directly within Odoo
Features
1. Convenient communication in Odoo
Chat with your Facebook Messenger customers directly in Discuss. Get more options for working with leads, partners, and session statuses.
2. Easy Bot Creation
Connect any Facebook Page to Odoo using your own Meta App. Multiple pages can run side by side from the same Odoo instance.
3. Interaction Flows
Build your own communication flow with users using scripts with step-by-step logic. Quick replies, email and phone collection through native Messenger buttons.
4. Chatter
Send and receive Facebook Messenger messages directly from the chatter of any Odoo document (Leads, Orders, etc.).
5. Operator Management
Monitor operator activity, follow specific channels, and manage agent workloads efficiently.
6. Customer Session Tracking
Track all client sessions, bot interactions, and operator responses in a centralized history.
Step-by-Step Instruction
1. Creating a Meta App
Each business connects its own Facebook Page through its own Meta App. The Messenger Platform is a Meta product, so the App and the Page must be set up directly in the Meta developer dashboard before Odoo can connect to them.
Before we begin
To implement the Messenger Platform, you need:
- A registered Meta developer account (https://developers.facebook.com/docs/development/register)
- A Meta app with the Messenger use case (https://developers.facebook.com/docs/development/create-an-app)
- A Facebook Page linked to your app (https://www.facebook.com/business/help/461775097570076)
- Business Verification (if your app is used by people without a Role on the app) (https://developers.facebook.com/docs/development/release/business-verification)
- App Review (if your app needs Advanced Access). Not required if you only send and receive messages for your own Facebook Page (https://developers.facebook.com/docs/resp-plat-initiatives/individual-processes/app-review)
App creation steps
After creating your developer account, you can move on to creating an App. Navigate to https://developers.facebook.com/apps/creation/ to begin the app creation process — the wizard walks you through six stages:
Navigate to https://developers.facebook.com/apps/creation/ to begin the app creation process.
Enter your app's name and a contact email address. Click Next.
Select one or more use cases for your app. You can add additional, compatible use cases now or at any time during development. Incompatible use cases are greyed out. If you choose to add additional use cases later, only compatible use cases are displayed. Some products, such as Facebook Login for Business or Webhooks, might be automatically included in your use case. If you need a use case not listed, select Other and follow the instructions in the Other App Types guide. Click Next.
Select an option: a verified business portfolio, an unverified business portfolio, or "I don't want to connect a business portfolio yet". To create a business portfolio, add your information in the pop-up. You can submit your business portfolio for verification now (Meta's Business Manager will open in a new browser window) or later. When complete, return to the dashboard and select your new business portfolio. Click Next.
Your app might need to complete certain requirements, such as App Review, to get and maintain data access for your app's use cases. Click Next.
Review your app's details, use cases, connected business, and requirements. If you need to make any changes, you can click App details, Use cases, Business, or Requirements at the top of the page or the Previous button in the lower-right. You can also review the Meta Platform Terms and Developer Policies by following the links at the bottom of the page. Click Go to dashboard to finalize the app creation process. You are redirected to the dashboard and can now customize each use case you've selected for your app.
- Messenger Platform Overview (https://developers.facebook.com/docs/messenger-platform/overview/)
- Get Started — official step-by-step App creation walkthrough (https://developers.facebook.com/docs/messenger-platform/get-started/)
Permissions and features
In the Permissions and Features section, you need to set certain permissions.
Here is a list of the permissions you need to enable:
- pages_show_list
- pages_manage_metadata
- pages_messaging
- pages_read_engagement
- business_management
Connect facebook page
In the Messenger API Settings section, you need to connect Facebook Page.
2. Module Deployment
To ensure messengers work correctly in your system, you need to have the following modules: us_messenger and us_facebook.
Deployment Instructions
Please note that installing these modules through the standard Odoo interface (Apps → Import Module) will not work for the initial setup.
The correct way to install these modules is as follows:
- Upload the module folders directly to your server's custom addons directory.
- Restart the Odoo service via terminal to allow the system to detect the new files.
3. Module Activation
After installing the module, navigate to Apps menu and search for "Facebook Messenger Integration". Click Activate to activate the module in your Odoo instance.
4. Creating a New Bot
Once all the necessary modules are activated, we can create a bot in our system. Go to the Messengers menu and click the New button in the upper-left corner. Now we see the form for a new bot. To launch and continue working with the bot, you need to fill in the basic bot fields:
The type of bot you are creating. In our case, you need to select Facebook Messenger. If you are using integration modules with other messengers, there may be other options here.
Insert the Page Access Token obtained from the Meta App dashboard.
Numeric identifier of your Meta App. Find it in App settings → Basic → App ID, or read it from the dashboard URL developers.facebook.com/apps/<APP_ID>/dashboard/. Together with the App Secret it forms the App Access Token used by Odoo when removing the page subscription (clicking Remove on the bot form).
The App Secret from the Meta App dashboard. Used to verify the X-Hub-Signature-256 header of every incoming webhook so that a third party cannot forge events. Strongly recommended in production.
Numeric identifier of the Facebook Page the bot represents. Outgoing messages are sent on behalf of this Page; incoming events are accepted only when delivered for this Page.
A random secret generated automatically or you can write your own. Copy it as-is into the Verify Token field of the Messenger webhook configuration in the Meta App dashboard — Meta uses it during the initial subscription handshake.
Read-only URL generated for this bot. Paste it into the Callback URL field of the Messenger webhook configuration in the Meta App dashboard. The URL must be reachable over HTTPS.
In this field, you can select a script with specific steps for user interaction with the bot. In the script, you can configure the receipt of email, phone number, connection to the operator, as well as sending quick reply buttons. If you leave this field blank, an available operator will be added to the channel with the user, without any intermediate steps.
An optional field for storing a link to the Page or to the Messenger entry point, useful if many bots are used in the system.
In the Operators section, you can specify system users among whom an automatic search for an available operator will be performed. Then, such a user is added to the channel with the client for further communication. The Priority field allows you to control the selection of available operators. A user with a higher priority will only be selected if all other operators with a lower priority already have more than 5 open channels, or if there are no available operators. The User nickname field should be highlighted separately. The bot settings allow you to sign the author's name in messages that will be sent to the client. In User nickname, you can write the signature that you want your clients to see. If the field is empty, the user's name will be used.
5. Other Useful Parameters
Great, we've filled in all the important fields, now let's take a look at the other bot settings in Parameters page:
When executing script steps, the messenger user's language is taken into account in order to correctly determine the language of the text steps. Sometimes users may have a language that is not activated in our system, in which case the default language from this field will be selected.
If enabled, the author's name will be added at the end of the message, so the messenger client will better understand who they are communicating with.
Template for creating a channel name in Discuss. Consists of the messenger username and bot name.
Determines whether bot operators can assign channels where they are defined by the operator to other operators. If disabled, only the administrator can change the operator.
If enabled, when a messenger user sends a message (without explicit reply) and the last message in the channel was from a document chatter, the message will be duplicated to that document's chatter.
Enable this only after Meta has granted the human_agent permission to your App through App Review. The integration uses HUMAN_AGENT to deliver replies sent more than 24 hours after the user's last inbound message. When this flag is OFF and a message is being sent outside the 24-hour Messenger window, the send is blocked and a warning is posted into the channel — the user simply will not receive that message until they write to the Page again.
6. Webhook Configuration in Meta App
Before you click Run Now, the Meta App must know where to deliver events. In the Meta App dashboard:
- Go to Messenger API Setup.
- Paste the Callback URL generated by Odoo.
- Paste the Verify Token shown on the Odoo bot form.
- Click the Verify and Save button.
- Customize the Engage with customers on Messenger Use Case (https://developers.facebook.com/documentation/business-messaging/messenger-platform/create-an-app)
With the webhook saved on the Meta App side, return to Odoo and click the Run Now button on the bot form. This subscribes the Page to the Meta App, after which Messenger starts delivering events to your Callback URL. If everything was set up correctly, a notification confirming the successful bot launch should appear in the upper corner of the screen.
7. App Review & Production Mode
While the Meta App is in Development mode, the bot can only exchange messages with users who have an explicit role in the App (Admin, Developer, Tester). Profile data of any other Facebook user comes back empty — in that case the integration creates the partner under the placeholder name Facebook User #<PSID>.
To start serving real customers you must switch the App to Live mode and pass App Review for the following Meta permissions:
Mandatory. Without Advanced Access on this permission, the bot can write only to App role users. After approval, the Page can converse with any Messenger user that opens a conversation.
Optional. Required only if you want the bot to automatically detect each user's language for script localization.
Optional but strongly recommended for support workflows. Enables the only currently allowed message tag (HUMAN_AGENT) and extends the response window from 24 hours to 7 days.
8. User Interaction With The Bot
At this stage, Facebook Messenger users can already contact our bot. Here's what interaction with the bot looks like from the client's side in Messenger and the operator's side in Odoo.
As we can see, the client has reached the step of connecting with an operator, so the system searched for an available operator, which turned out to be Mitchell Admin, and added him to the channel. Once the operator has communicated with the client, he can click the End Session button, after which the operator will be removed from the channel, and the client will continue to the next step of the script.
9. 24-hour Session Banner
Above each Facebook channel a coloured banner shows the current state of the Messenger session for that user.
- Grey — no inbound message yet, the session has not been opened.
- Green — session is active; the absolute end time is shown in the operator's timezone.
- Red — the 24-hour window has expired; only HUMAN_AGENT replies are deliverable (and only if the corresponding permission is granted).
The banner refreshes automatically when the user writes again — no manual reload is needed.
10. Channel Statuses
Channel statuses are usually accompanied by a color change or the addition of an icon in the Discuss channel list. The operator can change the status depending on the current state of the channel. Options include waiting for a customer response or seeking help, which is used when the operator has added another system user. In this case, the user will see the channel highlighted in blue. Without Operator highlights the channel in orange and is used when no free operator could be found. This may be the case if the request was made outside of working hours and no users were online. In this case, the system adds all operators to the channel, and the first one to come online can click the Become Operator button to become an operator and exclude other operators from the channel.
11. Facebook Scripts
The Facebook Messenger integration module allows you to build scripts with step-by-step interaction between the bot and the customer. Each step of the script is responsible for one message sent to Messenger. After installing the module, you will have a demo script so that you can better familiarize yourself with the work and capabilities of scripts.
12. Step Types
Each step has its own type and defines the logic of interaction between the bot and the user. Here are the types of steps that will be available in the Facebook script:
Sending a regular text message. Please note that this step does not require a response from the user, so if you have two text steps in a row, they will both be sent at once.
Receiving customer email. With Apply For Partner enabled, Messenger renders a native quick reply button (user_email) that lets the user share their email with one tap. If the email is invalid, the step will ask to enter the email again.
Step is waiting for user input.
Step awaits receipt of the phone number. With the Apply For Partner flag, Messenger displays the native user_phone_number quick reply, so the user can submit their phone in a single tap and the value is also saved on the partner card. It is recommended to keep this option enabled when you expect the customer to send their number — this way you can be sure the number really belongs to that user.
At this step, a search for an available operator is performed, and they are added to the channel. Note that when the client is at this step, the other steps are not performed, since all text or commands go to the channel with the operator.
A special Facebook step that sends text with attached quick reply buttons. When the user taps an option, we can branch to other steps. This step can be used as a poll or to build branches in the script (up to 13 buttons per message).
13. Script Step Example
Let's look at an example of fields in a step with the Question Selection type:
Required field for each step. Contains text that will be sent to the customer.
The step can send a message about the user's successful response, or vice versa, if the user has entered the wrong answer. The message about the successful completion of the step is optional and can be left blank.
The execution of a step can be linked to a command. Note that the first step of the script must be linked to the /start command.
When a user changes the order of steps or creates new steps in a script, the steps are recalculated to automatically determine the next step for each step. If this field is enabled, the next step will not be determined for the current step.
A special field for a step with the Question Selection type. Answer Text will contain the text in the quick reply button.
If the user has selected an option, we can specify the next step to be taken. It is also possible to create a survey without specifying the next steps in all answer options, in which case the next step specified in the step itself will be performed.
Support
We provide free bug fixes and updates for all our modules for 1 year after purchase.
The warranty is for a clean installation of Odoo.
If you need help, please submit a request through our Support Portal at https://unitsoft.com.ua/support. Our support team, which consists of the developers who created the product, is always ready to help you.
We will not provide support (for free) if our modules do not work on your server or conflict with other modules.
We are ready to consider your requests regarding the functionality of our modules, and if they prove useful, we can take them into account when releasing new versions.
We also provide all types of Odoo support services, such as installing Odoo on your server, maintaining your Odoo server, custom development.
We invite you to familiarize yourself with our support packages here: https://unitsoft.com.ua/services-plan
Our Odoo Apps
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module