Syncronization functionality for Brevo (formerly Sendinblue) - Magento2 integration. This module integrates your Magento2 site with Brevo allowing you to refine your marketing strategy, create automations on many scenarios and create campaigns based on your Magento e-commerce site data.
Fully tested and working on Magento CE(EE) 2.4.4, 2.4.5, 2.4.6
You can install this module adding it on app/code folder or with composer.
composer require dadolun95/magento2-brevo-sendinblue
Then you'll need to enable the module and update your database and files:
php bin/magento module:enable Dadolun_SibCore Dadolun_SibContactSync Dadolun_SibOrderSync
php bin/magento setup:upgrade
php bin/magento setup:di:compile
You must enable the module from "Stores > Configurations > Dadolun > Brevo > General" section adding you Brevo API key: With the debugger option enabled the module will log each API v3 call result and response code and also observer calls on a dedicated file localed on /var/log/sendinblue-integration.log file. Remember that letting the debugger enabled on production enviroment can slow down the website.
Enable Brevo visitor tracking in order to register each customer pageview on Brevo via API (always synchronous and client-side): Remember to enable tracking on Brevo, then copy you client key from the js snippet on Magento configurations:
Mandatory: You must enable contact sync after the initial setup for newsletter subsription synchronization on Brevo: Choose between "Sync" and "Async" Synchronization type.
...
'cron_consumers_runner' => [
'cron_run' => true,
'max_messages' => 1000,
'consumers' => [
'sibContactProcessor',
'sibOrderProcessor',
]
],
...
The module provides a "Sync contact" CTA on adminhtml that move all existing contacts to Brevo (only new subscribers are synced on runtime). The "Sync contact" CTA use Magento2 message queue system. So, clicking "Sync Order" you'll only add a complete order synchronization request on queue. If you had choose the Synchronous mode and you've not configured message queue system on your Magento installation, you will need to run this command from your cli each time you want to perform a complete "Contact Sync" request from adminhtml:
php bin/magento queue:consumers:start sibContactProcessor
Since Contact synchronization functionality is enabled two Brevo lists are created:
You can enable the order sync from "Stores > Configurations > Dadolun > Brevo > Order Sync" section. Like contact sync pay attention to the "Sync Type" configuration, you must choose between "Async" and "Sync" mode. It's recommended to keep contact sync and order sync on same synchronization mode (Async or Sync). If you don't have configured message queue system on your Magento installation (like written above), you will need to run this command from your cli each time you want to perform an "Order Sync" request from adminhtml:
php bin/magento queue:consumers:start sibOrderProcessor
Enabling "Track Abandoned carts on Brevo" allow you to register events to Brevo tracking trought client-side API. Below events are managed:
For Magento 2.4.4 and Magento 2.4.5 you can install Mageplaza or Magepal SMTP modules. Use Magento core SMTP configuration feature for 2.4.6 and newer versions instead. Brevo SMTP settings are located on "Transactional > Settings" section:
Contributions are very welcome. In order to contribute, please fork this repository and submit a pull request.