Guide to Integrating with Magento 2

 

Questo articolo è attualmente disponibile in inglese e spagnolo. Puoi fare riferimento a questa documentazione mentre arriva nella tua lingua.

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.

 
Implementation time: 15-20 min.
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.

Guide to integrate with Magento 2 Jan 25 - 10-min.png

 

4. In the Configuration section, click  Download Magento 2 Module to download the “connectif.zip” file to your computer.

Guide to integrate with Magento 2 Jan 25 - 11-min.png

 

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.

 

If the "/app/code/" folder does not exist, it must be created.

 

For example, if the Magento 2 installation path is "/var/www/html" you must copy the "Connectif" folder into "/var/www/html/app/code/Connectif".

 

A.3. Install the module

6. Access the Magento 2 Admin Panel and go to the "System > Web Setup Wizard" section.

 

The Setup Wizard is removed from Magento version 2.4.0 onward, so you must enable integration through commands, which can be found in point 2b of the installation documentation included in the downloaded "connectif.zip" file. Find more information in the Magento documentation.

Magento_Integration_-_3.png

7. In Module Manager, find the Connectif_Integration module and select Activate.

Magento_Integration_-_4.png

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.

Magento_Integration_-_5.png

  • Backup: In this step, a backup of the eCommerce is performed before the module installation.

Magento_Integration_-_7.png

  • Enable module: In this step, the module is activated.

Magento_Integration_-_8.png

 

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.

Guide to integrate with Magento 2 Jan 25 - 10-min.png

12. In the Configuration section, click  Download Magento 2 Module to download the “connectif.zip” file to your computer.

Guide to integrate with Magento 2 Jan 25 - 11-min.png

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
 

The module will be installed and visible from Stores > Configuration > Advanced > Advanced. The module will appear in this section in the list of installed Magento modules.

 

STEP 2. Activate the module

  

This configuration is the same for versions before and after Magento 2.2.

22. Go to "Stores > Configuration > " and locate the Connectif configuration.

Magento_Integration_-_9.png

23. In Basic Configuration, select the option Yes in the Activate field to complete the Client ID and Secret Key options.

 

Do not close this tab; you will need it to complete your account information.

Guide for integrating with Magento 2 Jan 25 - 6-min.png

24. Go to your Connectif account and, in the "Integrations > Magento" section, copy the Client ID and the Secret Key.

Guide for integrating with Magento 2 Jan 25 - 12-min.png

25. Return to Magento 2 and paste them into the corresponding fields.

Guide for integrating with Magento 2 Jan 25 - 7-min.png

26. Click "Save Config" to save the changes.

 

 

Success!
Your integration of Connectif with Magento is ready.

  

Once the plugin setup is complete, it is recommended to verify the correct integration. You can see how to do it in this article.

 


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. 

Guide for integrating with Magento 2 Jan 25 - 8-min.png

  • Banners (2): This section is deprecated as banner content is configured directly from Connectif.
  

Content like "Modal Windows" and "Banners" has been deprecated since 2021. This article explains how to migrate them to Connectif.

Guide for integrating with Magento 2 Jan 25 - 2-min.png

  • 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).

Guide for integrating with Magento 2 Jan 25 - 3-min.png

  • 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.

Guide for integrating with Magento 2 Jan 25 - 4-min.png

  • 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. 

Guide for integrating with Magento 2 Jan 25 - 9-min.png

  • 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.

Guide for integrating with Magento 2 Jan 25 - 5-min.png

 

2. How to enable offline purchase notification (via API)?

  

Offline purchase notification means purchases do not have web context; instead, the notification is done asynchronously via API. If there is any strategy reacting to the purchase with web content, it will not impact contacts whose purchase is registered through the API. 

1. In your Magento account, go to "Stores > Configuration", click on Connectif and Settings.

Magento_Integration_-_18.png

2. Disable the Connectif module in the "Basic Configuration > Activate" section by selecting the No option.

Magento_Integration_-_19.png

3. Click on Save Config.

 

It is necessary to save the configuration right after this step to enable offline purchases.

4. Go to the "Advanced Configuration > Notify purchases offline" section and select the Yes option.

Magento_Integration_-_20.png

5. In the "Order Status" section, choose the status that purchases must have to be registered offline in Connectif.

  

The selection of the status will depend on the payment method, Magento configuration, and the business model. Only one status can be chosen.

Magento_Integration_-_21.png

6. Re-enable the Connectif module in the "Basic Configuration > Activate" section by selecting the Yes option.

Magento_Integration_-_22.png

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.

Group 2-min.png

 

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:

Questo articolo ti è stato utile?
Utenti che ritengono sia utile: 1 su 1