Best practices for integrating Klaviyo with Magento

At Klaviyo, we’ve been working with Magento for many years. Our platform syncs data including customers, orders, shipments, catalogs, and website activity, so we cover a large surface area of Magento’s data model. Due to its open source nature, Magento can come in many different shapes and sizes. Over the years we have built up a hardened integration that aspires to solve for many of the various configuration options, and helps prevent issues that range from common to unique. 

Here are some of our top tips to keep in mind when integrating Magento.

  1. Be prepared for additional server load

For Magento stores hosted on non-elastic infrastructure, with a fixed amount of CPU/RAM resources, it is important to consider the additional load may be added to your servers when you integrate Klaviyo for the first time.

When Klaviyo first integrates with Magento, we will sync over 5 years of historic customer and order information. For some setups this can place additional load on the backend, depending on its resource allocations. A hyper-optimized website that is used to serving 99% cached content to customers, and only making more expensive database round trips for orders and other direct customer actions, may not be ready to gracefully handle a series of requests for historic data (which may be in databases that are un-optimized, corrupted, and/or havent been used in a long time). 

It’s important to note, any additional load is only temporary. Once Klaviyo has fetched the historical data, the sync will periodically fetch only new order data in 30 minute intervals.

  1. Ensure the Klaviyo user agent is not blocked or rate limited

To ensure your data is synced with Klaviyo in a reliable and timely manner, ensure you allow the Klaviyo/1.0 user agent. Firewalls, CDN’s and bot protection systems can often mistakenly identify Klaviyo request patterns as bots, blocking our requests to fetch your order and customer information. 

  1. Products are highly configurable

When syncing products from Magento, you have to be aware of all the customization options. Magento supports 6 different types of products. It is also common for a site to store product images on a separate CDN, optimized specifically for image hosting, so being able to sync product data from one site/url and images from a different site/url is important. Product catalogs may also be unwieldy. Sometimes companies carry legacy products forward without pruning their catalog, and the result is hundreds of thousands (or even millions) of products that sit idly on disk, waiting for an unsuspecting query to cause their completely un-optimized and problematic legacy schema to join into the category table and cause mayhem.

We’ve built functionality into our integration to handle all these situations, but it’s very helpful to understand beforehand, so we can configure the integration for your specific Magento setup.

  1. Headless websites are becoming more common

For Magento stores, it used to be overwhelmingly common to see monolithic architecture where the frontend and backend were housed together. This made an extension the de facto way to add your code to a Magento site’s frontend. However, we’re seeing headless frontends take on adoption throughout the ecosystem, so you should have a plan to integrate via an extension, but also via a separate frontend to add code to the merchant’s website. It’s important to know which architecture you are utilizing so that you can sync data from both the frontend and backend.

  1. Magento merchants value customization

There is a reason the merchant is on and stays with Magento. They value their ability to customize their store, and change every aspect of it. If they want to switch their payment provider, or add a new reviews app, they have the ability to make that change. When working in the Magento ecosystem, it’s important to appreciate that spirit and build flexible solutions that can bend to the merchant’s unique configuration. The one-size-fits-all approach that other SaaS-based platforms utilize will not work as well here. The ability to change payloads, track unique events, and store custom properties to trigger segmentation and automations off of are some of the many ways merchants get their own unique experience when using Klaviyo and Magento together. It is important to understand what unique experiences are important to your merchant’s store, and get the right data into Klaviyo to make it happen.

When building a connection to Magento, following these tips will help lead to happy merchants and successful integrations. Respect the infrastructure you are connecting to, and be prepared to test connections off-hours, and offer tuneable rate-limiting. Be prepared for highly customized data models, for products as well as customers and orders, and be ready to handle a lot of variance in the data. Finally, be prepared with an extension, as well as guidelines for connecting to a headless Magento site. Above all else, remember that great integrations are built over time, and you need to constantly update and maintain your integration to keep merchants happy.

Written by:

David Henriquez 

Lead Developer Advocate

Klaviyo

[email protected]

You Might Also Like