Magento

About APSIS One's Magento Integration

"Magento is the leading platform for open commerce integration, handling over $100 billion in gross merchandise volume every year.”

Read more on Magento's website, or check out our Best Practices page.

APSIS One's Magento Integration allows for a full sync between Magento and your APSIS One Audience. Synchronise Magento's customer data into Profiles and populate them with their behavioural Events and informative sales data.

When integrating Magento with your APSIS One account, you can ensure that every touchpoint in your customer's journey is captured, Segmented, personalised, allowing you to efficiently use the data to covert and engage your customers.

To read more about the data fed into APSIS One Profiles from your Magento integration, take a look at this article.

 


 

Summary 

Here's a summary of the process of integrating Magento with your APSIS One account. Click to jump right to a section in the article for a more detailed run-down. 

You will need an APSIS One Administrator role to perform the Magento Connector installation. We also recommend that the installation is performed by a developer. 

1. Install the correct version of Magento.

2. Enable Magento in APSIS One.

3. Install the Magento module, either via ComposerFTP, or GIT

4. Configure your Magento Stores to Sections in APSIS One.

5. Map the data from your Magento account with Attributes in your APSIS One account.

6. Sync your Consent Lists and Topics with your Magento subscriptions.

 


 

Prerequisites

The APSIS One Magento module is compatible with both Community and Enterprise platforms of Magento.

Make sure you've installed one of the following Magento versions:

  • For Community, we're compatible with version 2.2.0 and above.
  • For Enterprise, we're compatible with version 2.2.0 and above.

The cron heartbeat (Magento cron) should be running every minute to action the required tasks in the APSIS module. Jump to Developer Settings...

Ensure that the following core Magento modules are enabled in APSIS One before proceeding; if any of these modules are disabled, the Magento installation will not work:

  • "magento/module-newsletter"
  • "magento/module-review"
  • "magento/module-sales"
  • "magento/module-wishlist"
  • "magento/module-store"
  • "magento/module-config"
  • "magento/module-backend"
  • "magento/module-cron"
  • "magento/module-customer"
  • "magento/module-catalog"
  • "magento/module-quote"
  • "magento/module-checkout"
  • "magento/module-ui"

 


 

Solution Overview

Module File Location

The Magento module installs files in one of the following locations, depending on the installation method:

For an FTP / GIT installation: MAGENTO_ROOT/app/code

For a Composer installation: MAGENTO_ROOT/vendor

 

Database Tables

The module creates the following tables in Magento's Database:

apsis_abandoned
apsis_event
apsis_profile
apsis_profile_batch

 

The module will copy data related to historical Magento subscribers and customers to:

apsis_profile table

 

Magento Admin Panel

The module creates the following resources in Magento's admin panel:

Reports > Apsis One > Apsis Profile
Reports > Apsis One > Apsis Event
Reports > Apsis One > Apsis Abandoned Basket
Stores > Settings > Configuration > Apsis Configuration

 

Cron tasks

Magento performs operations on schedule (Cron) by periodically running a script.

The connector module has several cron tasks attached with the installation to ensure that the connector functions correctly. Below is a list of current tasks and their timings:

Tasks with 5 minute intervals:

apsis_one_sync_profiles

apsis_one_find_abandoned_carts

apsis_one_sync_events

apsis_one_find_historical_events

 

Tasks with 30 day intervals by default can be adjusted in the connector's configuration:

apsis_one_cleanup

  


 

Enable Magento in APSIS One

 

1. Head over to Account Settings in APSIS One.

magento1.jpg

 

2. Select a Section and open the Integrations tab.

If you have multiple stores, we recommend that you create a separate Section for each one of them, and follow the instructions described in Initial Connector Setup below.

 

integrations1.jpg

 

3. Locate Magento and click Connect.

magento2.jpg

 

4. A Client ID and a Secret Key will be created.

Copy your Client ID and Secret Key and save them. You will need this information to proceed with setting up your Magento integration. Once you close this window, the Secret Key will no longer be available.

 

 


 

Module Installation

 Before you begin

To perform the Magento Connector installation, you must have an Administrator role in Magento.

The module installation requires user access to file server and expertise in running commands in the Linux Bash terminal: we strongly recommend that this is done by a developer.

Please ensure that the file server user has permissions to execute commands and is able to transfer files, and read the Prerequisites before continuing. 

After installing the Magento Connector, follow the steps described under Initial Connector Setup.

 

Do you have multiple stores or websites?

The module supports multiple stores. If you are running multiple stores within the same Magento account, we recommend that you link one store to one Section in APSIS One. If you are configuring multiple sites to multiple Sections, you'll need to follow the entire process for each separate store you have.

The installation of the Magento module can be done via ComposerFTP, or GIT.

Regardless of your Magento version, the installation process is the same.

 


 

FTP Installation

 Plan your installation carefully.

In a production environment, installation should be planned before continuing, as your site may be in maintenance mode until Magento is running again. Before installing Magento on APSIS One, we strongly recommend you to install and test the module on your staging server, and we strongly recommend that you backup your Magento databases and your website.

 

If installing the Magento module via FTP, then you must first install the dependency found in this library in order for us to sync the phone number in Magento with APSIS One's mobile Attribute.

1. Download the files to the connector from GitHub, located at:

https://github.com/ApsisInternational/module-one

2. Download as a ZIP and unzip the file.

3. Create the directory structure in Magento at Magento_Root/app/code/APSIS/One

4. Drop all the content inside the unzipped folder to the following directory: Magento_Root/app/code/APSIS/One

5. Run the following command in the Magento root: php bin/magento module:enable Apsis_One

6. Then run php bin-magento setup:upgrade

7. If you have a single website and store, run the following command in the Magento root: php bin/magento setup:di:compile

Otherwise, if you have multiple websites and stores, run: php bin/magento setup:di:compile multi-tenant

8. Clear the cache. All set!

 


 

GIT Installation

 Plan your installation carefully.

In a production environment, installation should be planned before continuing, as your site may be in maintenance mode until Magento is running again. Before installing Magento on APSIS One, we strongly recommend you to install and test the module on your staging server, and we strongly recommend that you backup your Magento databases and your website.

 

If installing the Magento module via GIT, then you must first install the dependency found in this library in order for us to sync the phone number in Magento with APSIS One's mobile Attribute.

1. Create the directory structure for GIT in Magento at Magento_Root/app/code/Apsis

2. Clone repository into the directory with the following command in the Magento root: git clone https://github.com/ApsisInternational/module-one One

3. Run the following command in the Magento root: php bin/magento module:enable Apsis_One

4. Then run php bin-magento setup:upgrade

5. If you have a single website and store, run php bin/magento setup:di:compile

Otherwise, if you have multiple websites and stores, run php bin/magento setup:di:compile-multi-tenant

6. Clear the cache. All set!

 


 

Composer Installation

 Plan your installation carefully.

In a production environment, installation should be planned before continuing, as your site may be in maintenance mode until Magento is running again. Before installing Magento on APSIS One, we strongly recommend you to install and test the module on your staging server, and we strongly recommend that you backup your Magento databases and your website.

 

Note that the Composer Installation is only valid if the GitHub repository is public and published on Packagist.

1. Set up the correct path for Composer, or keep Composer within the Magento root.

2. Run the following command in the Magento root: composer require apsis/module-one

3. Then run php bin/magento module:enable Apsis_One

4. Run php bin/magento setup:upgrade 

5. If you have a single website and store, run the following command in the Magento root: php bin/magento setup:di:compile

Otherwise, if you have multiple websites and stores, run php bin/magento setup:di:compile-multi-tenant

6. Clear the cache. All set!

 


 

Initial Connector Setup

In order to proceed, the user's role must be set to Administrator. If the user's role is not Administrator, ensure that the user has access to the following resources:

Reports > Apsis One > Apsis Profile
Reports > Apsis One > Apsis Event
Reports > Apsis One > Apsis Abandoned Basket
Stores > Settings > Configuration > Apsis Configuration

 

1. Head over to Stores on the left side, inside Magento.

magento4.jpg

 

2. Click Configuration.

magento5.jpg

 

3. Choose the store you want to set up with APSIS One next to Store View,

If you have a single store in Magento, make sure Default Config is selected. Otherwise, select the store you want to set up.

If you are running multiple stores, we recommend that you link one store to one Section in APSIS One. This must be taken into consideration in this step and in the Data Mappings step described in the drop-down below.

Create a Section in your APSIS One account for each store you have in Magento.

Each Section has a unique Client ID and Secret Key.

When configuring your second or third stores, you will need to repeat this process with each one of them.

magento6.jpg

 

4.  Click Accounts under the APSIS One configuration menu.

magento7.jpg

 

5. In Enabled, select Yes from the drop-down menu. Two more fields will appear for you to complete.

magento8.jpg

 

6. In Client ID and Client Secret, enter the credentials created in APSIS One for the Section that corresponds with your store.

magento9.jpg

 

7. When done, click Save Config.

The module will validate the API credentials by generating a token that will confirm if the credentials are valid or not. If the credentials are not valid, contact your APSIS Account Manager.

Repeat this process to configure additional stores, using the Client ID and Secret Key generated for each corresponding Section.

magento10.jpg

 


 

Data Mappings

In addition to the basic contact information, the Magento module allows you to map more than 50 sections of key retail information with your Section in your APSIS One account.

To set up your Data Mappings, head over to Magento's Admin panel and choose Data Mappings under the APSIS One drop-down menu.

magento12.jpg

 

1. Map your Section by expanding the drop down menu and selecting an item.

After mapping a Section, you will be able to map Attributes. The Email Attribute must be mapped in order to sync Profiles.

magento11.jpg

 

2. Click Save Config.

magento10.jpg

 

3. Expand the Attribute Mapping drop-downs to begin mapping.

There are three types of Attribute mappings:

Common Attributes are common to both Magento subscribers and customers.

Subscriber Attributes are exclusive to Magento subscribers.

Customer Attributes are exclusive to Magento customers.

magento13.jpg

 

4. Expand each drop-down menu and select an Attribute to map Magento's data with APSIS One Profiles.

magento225634.jpg

 


 

Consent List & Topics Sync

Sync your APSIS One Consent list and Topics with your Magento subscriptions at Profile Sync under the APSIS One drop-down, in your Admin panel.

magento16.jpg

 

1. Start by enabling the Subscriber Sync. Expand the Enabled drop-down and choose Enable.

magento15.jpg

 

2. Take a look at Consent List Topics and select the Topics you wish to sync with your Subscribers in Magento.

You must select at least one Topic for the Subscription sync to work. To select multiple Consent Lists and Topics, hold the Ctrl/Cmd key in your keyboard and click the items.

magento17.jpg

 

3. Click Save Config. That's it!

magento10.jpg

 


 

Sync Historical Events 

Sync Historical events from your Magento account into your APSIS One account, and create a more complete picture of your customer's journey and behavioural Events. Syncing won't break any of your existing APSIS One activities, and will allow for the creation of useful Segments to be used to target Profiles in future campaigns.

Before you begin, please note that the option to sync historical Events will be disabled after the first sync, so ensure that you sync the data for the desired amount of time the first time.

If a mistake is made, the Reset Module button can be used to reset the installation. 

1. In the left side navigation, go to Stores, then Configuration. Expand the Apsis One drop-down menu, and select Events.

histSync1.jpg

 

It is possible to sync the historical data from the following Events:

  • Customer/Subscriber Places an Order
  • Customer Adds A Product to Cart
  • Customer Leaves a Product Review
  • Customer Adds Product To Wishlist

2. In the Past Events drop-down menu, select how long back you want to retrieve the data to sync.

histSync3.jpg

 

3. Click Save Config in the top of the screen. 

histSync2.jpg

 

4. Repeat this process with all the Events you want to sync. 

That's it! The sync will be performed automatically once a day, at midnight in the client server's timezone, and past Events will be visible in APSIS One the following day (after midnight).

 


 

Developer Settings

Access the Developer Settings by going into Stores, expanding APSIS One and selecting Configuration.

Here's an overview of the settings available:

DB Cleanup: Database cleanup. By default will be performed every 30 days. The Cleanup cronjob will remove entries from DB tables older than the set value, except the apsis_profile table.

Profile Sync - Cron Schedule: By default the Cron Schedule will be performed every 5 minutes.

Events Sync - Cron Schedule:  By default the Cron Schedule will be performed every 5 minutes.

Find Abandoned Carts - Cron Schedule: By default the Cron Schedule will be performed every 5 minutes.

All intervals in Cron Schedule tasks can be adjusted in the connector's configuration.

Reset Module: This will remove all saved configuration for the Magento connector module, truncate all tables, and re-populate the Profile Sync table. 

Using the Reset Module button is recommended if the validation fails after the user has clicked the Save Config button: the APSIS One plugin in Magento will only be disabled, and nothing else will be removed. Data will not have to be entered again as it will remain in the field.

devSettings1.jpg

  


 

Reports

To view reports of the module's entities, click Reports on the left side menu.

magento18.jpg

 

The report will be available under the APSIS One heading. Here you will be able to see Profile Status, Registered Events, Abandoned Carts, and Log Viewer.

magento19.jpg

 

Was this article helpful?