If your eCommerce is developed in Magento, you can easily integrate it with Connectif and start collecting data from your customers to create your campaigns.
In this article, you will learn how to install and configure the Connectif module for Magento 2.
Difficulty: Advanced (requires technical knowledge).
When to use it?: When opening your Connectif account.
STEP 1. Download and install the Magento 2 module
Depending on the version of Magento your eCommerce is using, you must follow different steps:
- If you have a version prior to Magento 2.2, check section A of this step.
- If you have a version later than Magento 2.2, check section B of this step.
A. Versions prior to Magento 2.2
A.1. Download the module
1. Log in to your Connectif account.
2. Go to Store Settings in the left sidebar menu.
3. In the E-commerce Platforms section, find Magento and click Edit.
4. In the Configuration section, click Download Magento 2 Module to download the “connectif.zip” file to your computer.
A.2. Copy the Connectif folder to the Magento installation
5. Copy the "Connectif" folder and all its content inside the "/app/code/" folder, located at the root of the Magento 2 installation.
A.3. Install the module
6. Access the Magento 2 Admin Panel and go to the "System > Web Setup Wizard" section.
7. In Module Manager, find the Connectif_Integration module and select Activate.
8. Follow the steps outlined in the Connectif module installation and click Next:
- Readiness Check: In this step, checks are performed related to PHP version, crons, dependencies, and extensions.
- Backup: In this step, a backup of the eCommerce is performed before the module installation.
- Enable module: In this step, the module is activated.
B. Versions later than Magento 2.2
B.1. Download the module
1. Log in to your Connectif account.
2. Go to Store Settings in the left sidebar menu.
3. In the E-commerce Platforms section, find Magento and click Edit.
12. In the Configuration section, click Download Magento 2 Module to download the “connectif.zip” file to your computer.
B.2. Copy the Connectif folder to the Magento installation
13. Log in to the Magento 2.x store via an SSH connection.
14. After a successful SSH login, use the command line (shell) to navigate to the root directory of Magento where Magento 2 is installed.
15. Upload the module (as Zip or tar.gz) to the root directory of the Magento 2 installation.
16. Unzip the file into a temporary directory.
17. The location to copy the unzipped module must be “app/code/Connectif/”. Create that folder with the following command:
mkdir –p app/code/Connectif/
18. Copy the contents of the unzipped folder into the folder created in the previous step:
cp -R Connectif/* app/code/Connectif/
19. Run the Magento 2 installation command from the root:
php bin/magento setup:upgrade
20. Compile the installed module with:
php bin/magento setup:upgrade
21. Clear the cache with:
php bin/magento cache:flush
STEP 2. Activate the module
22. Go to "Stores > Configuration > " and locate the Connectif configuration.
23. In Basic Configuration, select the option Yes in the Activate field to complete the Client ID and Secret Key options.
24. Go to your Connectif account and, in the "Integrations > Magento" section, copy the Client ID and the Secret Key.
25. Return to Magento 2 and paste them into the corresponding fields.
26. Click "Save Config" to save the changes.
Frequently Asked Questions
Do you have questions about the Connectif module in Magento? Here you will find useful information:
1. What is the purpose of each section in the Connectif module in Magento?
The Connectif module in Magento consists of different sections, each fulfilling different functions:
- Basic Configuration (1): This section is used to configure the basic aspects of your Connectif account in Magento, documented in this article, to start with your strategy.
- Banners (2): This section is deprecated as banner content is configured directly from Connectif.
- Customer (3): This section allows linking the customized contact fields in Connectif with those in Magento. To do so, select one of the available contact fields in the CMS (left selector, Customer Field) and associate it with the ID of the field created in Connectif (right selector, Connectif Field ID).
- Product (4): This section allows linking the customized product fields in Connectif with the native fields in Magento. To do so, click the Select Attribute selector of the field you want to associate (Custom Field 1, 2, or 3) and select the product attribute for that field.
- Public Urls (5): This section is used to consult the activation URLs for the ServiceWorker and subscription notifications.
These URLs are generated and communicated to Connectif when the module is installed in Magento.
-
Advanced Configuration (5): This section is used to define certain behaviors of the integration with Connectif:
- Print only mandatory fields on cart tags?: This option allows determining whether the Connectif script will collect only the mandatory cart fields (Product ID, name, price, and URL). This option improves cart tag performance in Magento.
- Use product variants on cart and purchases?: This option allows determining whether Connectif will collect default products or specific variants when receiving cart product information.
- Product image ID: This option allows determining the size of the image Connectif will collect.
- Notify purchases offline: This option allows determining whether the eCommerce will notify Connectif of offline purchases via API without web context.
- Order Status: This option allows defining the status that purchases must have to be registered via API (offline notifications) in Connectif.
- Create newsletter subscribers if customer does not exist?: This option allows selecting whether to create the contact in Magento as a newsletter subscriber if it does not exist when the subscription or unsubscription is notified from Connectif.
- Show product view with proper currency when Connectif verifies the product: This option affects cases where product synchronization is done via web scraping. It allows indicating if, when Connectif visits the website to synchronize/verify a product, it does so in the same currency configured in Connectif.
2. How to enable offline purchase notification (via API)?
1. In your Magento account, go to "Stores > Configuration", click on Connectif and Settings.
2. Disable the Connectif module in the "Basic Configuration > Activate" section by selecting the No option.
3. Click on Save Config.
4. Go to the "Advanced Configuration > Notify purchases offline" section and select the Yes option.
5. In the "Order Status" section, choose the status that purchases must have to be registered offline in Connectif.
6. Re-enable the Connectif module in the "Basic Configuration > Activate" section by selecting the Yes option.
7. Click on Save Config.
3. How to configure Connectif in a multi-language Magento store?
Magento allows creating three levels of entities within an account:
- Website: Usually, there is only one, and it corresponds to the domain.
- Store: Different stores, for example, by language.
- Store view: Additional details for stores, for example, in the same language but with a different currency.
The Connectif module can be configured at any of these levels depending on the eCommerce needs, but some aspects must be considered:
- The types of Magento configuration, as a "Default" mode configuration will apply to all Magento levels.
-
To send data from different Magento levels to the same Connectif store, the same Client ID and Secret Key must be used in the configuration.
- Unless in very complex cases, it is recommended to activate the default configuration at the time of integration to configure all levels equally.
If there are multiple languages and/or currencies to configure, it is common to make the adjustments at the Store View level separately.
4. How to recover abandoned carts with the Cart Recovery URL
(This section explains how the Cart Recovery URL works to retrieve items associated with a specific cart).
Through the integration with Magento, a Cart Recovery URL is sent to Connectif. This is a link to recover items related to that cart and can be used in workflows and content.
To obtain the cart recovery URL through a workflow, it must be done using the "Get Last Cart" and "On Abandoning Cart" nodes, then mapped into the content variables to display or send.
- Learn how this URL works in different CMS and how to use it in this article.
Keep learning!
To make the most of your Connectif account, we recommend continuing with the following articles:
-
Onboarding, to gain expertise with our interface.
-
Initial Workflows, to implement your first strategies in the account.
-
Integration with external systems, to integrate with Facebook, forms, and webhooks from your website.
-
Integration via API, to manage events such as purchase records or contact sign-ups.