Integrate with Magento 1.x (CE and EE)

Overview

Klaviyo integrates with both Magento 1 CE and Magento 1 EE. There are two main steps to integrating Magento 1 with Klaviyo:

  1. Enabling the Magento Integration in Klaviyo.
  2. Installing the Klaviyo Extension in Magento.

This guide covers both steps and the related tasks for Magento 1 stores.

Note

We currently support Magento versions 1.5 and higher.

If you plan to integrate a Magento server that has multiple stores on it, please check out our guide on supporting multiple stores.

Setup a Magento API Key

The Magento 1 integration with Klaviyo requires a Magento API key. To create this key set up a special role with full resource access and assign a new user to this role. The Username and Password of this user will serve as the API key.

  1. In your Magento admin panel click the System tab and select Web Services > SOAP/XML-RPC-Roles.
    mage1_rolesTab.png
  2. Click Add New Role.
  3. Click the Role Resources tab and set Resource Access to All.
    mage1_roleInfoTab.png
  4. Click the Role Info tab, name the role "Klaviyo", and click Save Role.

    Note

    If you are not willing or able to provide full resource access or have other permissions concerns, see the section below on Creating a Magento API Key with Limited Permissions.

  5. Click the System tab and select Web Services > SOAP/XML-RPC-Users.
    mage1_usersTab.png
  6. Click the User Role tab and set the Role to Klaviyo.
    mage1_userRole.png
  7. Click the User Info tab. Set the User Name to "klaviyo" and enter a strong API Key. Save the User Name and API Key as you will use them when enabling the Magento 1 integration in Klaviyo. Fill in the rest of the information and click Save User.
    mage1_userInfo.png

Note

When enabling the Magento 1 integration in Klaviyo the User Name will serve as the API Username the API Key will serve as the Password / API Key.

API Performance

To improve the performance of your integration we highly recommend enabling caching for the two Magento Web Services Configuration settings.

  1. In your Magento admin panel click on System > Cache Management.
  2. Enable caching on the two Web Services Configuration settings.
    mage1_APIperformance.png

    Note

    If you make any changes to your Magento setup that could affect the configuration of these APIs (e.g. change your domain name), be sure to flush the caches, which can be done on this page.

Enable the Magento 1 Integration in Klaviyo

Use the Magento API key you created to enable the Magento 1 integration in Klaviyo.

  1. In your Klaviyo account click the Integrations tab and click on the Magento integration.
    mage1_mage1Integration.png
  2. Enter the following information:
    • Site URL: The site URL is the address of your Magento instance.
    • API Username:  The username you created for your new user with API permissions.
    • Password / API key:  The api key you created for your new user.

Install the Klaviyo Extension in Magento

647747Klaviyo's latest extension for Magento 1 (v.1.6.3, updated July 2017) is available for download here. If you prefer to add the extension via the Magento Connect marketplace, you can do that here.

  1. Download the extension to your computer.
  2. Click System > Magento Connect > Magento Connect Manager.
    mage1_magentoConnectMgr.png
  3. Under Direct package file upload click Choose File and select the extension you downloaded above. Click Upload. The extension will upload and install.
    mage1_extensionUpload.png

Once you've installed the extension, navigate to the extension's page and configure the settings.

  1. Click on System > Configuration and then click on Klaviyo under the Customers section. If after clicking Klaviyo you hit a 404 message, log out of Magento and log right back in.
    mage1_klaviyoTab.png
  2. Set Enabled to Yes and fill in the other fields (the Consumer Key, Consumer Secret, Authorization Token, and Authorization Secret can all be left blank unless you are setting up coupons with Magento.) mage1_klExtensionSettings.png
  3. Click Save Config.

Set Up a Magento Cron Job

The Klaviyo extension uses cron jobs to stay up-to-date and run periodic maintenance tasks.

Note

If you've installed and configured the Klaviyo Magento extension, but you're not seeing checkout data show up in Klaviyo, it might be because the required cron job isn't running. Consult the Magento documentation for more detailed information.

Setting Up Cron In a UNIX Based Operating System

If you have shell access to your server, you can use the crontab service command. The Magento cron needs to run every five minutes, so the time configuration is:

*/5 * * * *

The full line in crontab will look like one of these (we suggest the first version):

*/5 * * * * /bin/sh MAGENTO_PATH/cron.sh
*/5 * * * * /bin/bash MAGENTO_PATH/cron.sh
*/5 * * * * /usr/bin/php MAGENTO_PATH/cron.php
*/5 * * * * /usr/local/bin/php -f MAGENTO_PATH/cron.php

where MAGENTO_PATH is the location of your Magento installation on the server.

Setting Up Cron Using cPanel (or your virtual hosting provider)

If you don't have shell access you can consult your virtual hosting provider's documentation. We cover using cPannel as an example below.

Log into cPanel for your hosting account. Find the Advanced section and click the "Cron Jobs" icon.

647750

A a list of current cron jobs shows along with a form to add a new job. Enter the following settings in the "Add New Cron Job" form. Make sure to replace MAGENTO_PATH with the path to your Magento installation. If you're not sure what the path is or how to find it, you can use an FTP program to browse the files on your server and find the directory that contains the cron.sh file.

647751

After you add the new cron job you should see checkout data in Klaviyo within 15 minutes.

Sync a Magento Signup Form to a Klaviyo List

You can optionally sync a Magento signup form so that users are added to a Klaviyo list.

  1. Create a list in Klaviyo that you want to sync with your Magento sign up form.
  2. Click on System > Configuration and then click on Klaviyo under the Customers section.
    blob.jpeg
  3. From the General Subscription List dopdown select the Klaviyo list you want to sync to.

Note

This process syncs all future subscribers. Existing subscribers need to be manually migrated from your Magento list into Klaviyo.

Creating an API Key with Limited Permissions

This documentation covers the Magento SOAP API that Klaviyo's integration is built on. We recommend giving access to all endpoints within the path /api/*. While these will most likely not directly equate to the permissions you will see when setting up the SOAP user and role (as permissions have changed throughout various 1.x versions), here are the API calls we make for Magento 1.x:

  • catalogInventoryStockItemList
  • catalogProductAttributeInfo
  • catalogProductAttributeMediaList
  • catalogProductInfo
  • catalogProductList
  • catalogProductTagList
  • customerCustomerInfo
  • customerCustomerList
  • customerGroupList
  • salesOrderInfo
  • salesOrderList
  • shoppingCartInfo
  • storeList

If you need to whitelist certain ports (if you have a firewall, for example), the Magento integration is currently on HTTP/80, but if it is available on 443 this can be changed.

Data Synced with the Magento 1 Integration 

Klaviyo's Magento integration allows you to pull certain customer information from your Magento platform to send targeted, data-driven emails in Klaviyo. Once you've configured your integration, you'll be able to personalize and target emails based on customer purchase and website activity! Here's some of the data we sync from Magento:

  • Customer information including first name, last name, and location.
  • Fulfillment, refunded and canceled order data.
  • When people visit your website and what items and categories they view.
    • These metrics will show in your account as Active on Site and Viewed Product .
    • You won't have to add the Klaviyo tracking snippet to your site with the Magento integration as these metrics are already handled by our extension.
Was this article helpful?
1 out of 1 found this helpful