Klaviyo Feed Configuration

This article provides an introduction and steps to be able to sync products with Klaviyo if the JSON file is more than 50MB.

📅Drafted on August 10, 2023

As Klaviyo states in its Documentation, they don’t support files larger than 100MB, and 50MB files are recommended, so we created a pagination option for large files. This pagination can be achieved by adding certain parameters after the Klaviyo feed URL

Table of Contents

Kinds of JSON Feeds
How to determine how many paginations needed for Klaviyo
How to determine the current size of the JSON Feed for Klaviyo
The Formula to determine the number of paginations needed
Loading the paginated custom Catalog in Klaviyo

 

Kinds of  JSON Feeds


https://sitename.com/klaviyo_feed.json (without Pagination)

The entire product data in a single JSON feed


https://sitename.com/klaviyo_feed.json?page=1&products=20000
(with Pagination)

 The product data is divided into multiple JSON feeds
The number after the "?page=" tells us which page.
The number after the "&products=" tells us how many products per page.

 

How to determine the number of paginated feeds needed for Klaviyo

To find out, we would need the total number of products that are not hidden and how large the current JSON file for the Klaviyo feed


To determine the number of products

1) With your browser, go to https://sitename.com/admin/?view=product.list and click the "Advanced" button

screenshot-wsmdevt.webshopmanager.com-2023.08.10-12_29_38
 2) Set the Hide option to "No"

screenshot-wsmdevt.webshopmanager.com-2023.08.10-12_34_14

3) Click on the "Search" button
screenshot-wsmdevt.webshopmanager.com-2023.08.10-12_32_59

4) Looking at the top right of the next page, this shows you the number of total products that don't include Hidden parts.
screenshot-wsmdevt.webshopmanager.com-2023.08.10-12_35_03

 

How to determine the current size of the JSON Feed for Klaviyo

To find out the current size of the JSON feed for Klaviyo

1) On the backend of your site, go to Data and then Data Feeds
Screenshot 2023-08-10 123755

2) On the bottom of the page, click on the Product Feed Klaviyo link to download the JSON file and find out the size
screenshot-bumpersuperstore.com-2023.08.10-12_40_22

 

The Formula to determine the number of paginations needed

💬 Note: The numbers below are just an example EXCEPT size per page in MB (30MB) as we want to divide the JSON file into smaller feeds that are less than 50 MB.


The total size of the
JSON file that we downloaded (i.e. 153.2MB) DIVIDED by the intended size per page in MB (30Mb) = Number of pages

💬 Tip: we can stretch from 30MB to a maximum of 50MB


Number of products
DIVIDED by Number of pages = Number of URLs to load in Klaviyo

153,2MB Divided by 30MB = 6 pages

69112 Products Divided by 6 Pages = 11519 Products per page

Then our entire Feed would be divided into paginated feeds and would look like this:

https://sitename.com/klaviyo_feed.json?page=1&products=11519
https://sitename.com/klaviyo_feed.json?page=2&products=11519
https://sitename.com/klaviyo_feed.json?page=3&products=11519
https://sitename.com/klaviyo_feed.json?page=4&products=11519
https://sitename.com/klaviyo_feed.json?page=5&products=11519
https://sitename.com/klaviyo_feed.json?page=6&products=11519

💬 Notes:
  • Always add one page to account for the potential growth of the product catalog.
  • The number of products per page should always be the same.

 

Loading the paginated custom feed in Klaviyo


1) Go to https://www.klaviyo.com/catalog/sources and click on Add New Source button
screenshot-www.klaviyo.com-2023.08.10-12_59_21
2) Define a name for this custom feed
screenshot-www.klaviyo.com-2023.08.10-13_04_50

3) Place your paginated feed on the Source URL field

screenshot-www.klaviyo.com-2023.08.10-13_02_22
3) Click on the Define Source button
screenshot-www.klaviyo.com-2023.08.10-13_03_22
4) You will be redirected back to the Custom Sources page and your new custom feed will have the following status and give it time to progress to a new status
screenshot-www.klaviyo.com-2023.08.10-13_07_25

💬 You have to refresh your browser to see the change in status


5) If the paginated custom feed is valid, the status will change to this
screenshot-www.klaviyo.com-2023.08.10-13_09_45
6) Click on the name of your custom feed
screenshot-www.klaviyo.com-2023.08.10-13_12_01

7) On the bottom of the page, click on the Complete Feed Setup button
screenshot-www.klaviyo.com-2023.08.10-13_13_03

8) The status will now change to "Sync in Progress" which means it started doing its expected task
screenshot-www.klaviyo.com-2023.08.10-13_15_42

💬 Repeat the process as many pages as needed.

The size of any one feed file should not exceed 100 MB; for optimal performance, we recommend each feed file not exceed 50 MB. If your file exceeds this amount, please split the feed into multiple files.

All files used as sources will feed into the same catalog in Klaviyo.