Overview
The Klaviyo OpenCart Integration Extension provides a Cron-Based Sync feature that allows you to synchronize your existing products and categories in bulk with Klaviyo Catalog.
This feature is particularly useful for:
- Stores that already have products and categories created before installing the Klaviyo extension.
- Users who want to re-sync missing or failed items.
- Large stores where feed-based syncing may be too heavy on the server.
How It Works
The cron system runs in the background and:
- Checks which products and categories are not yet synced to Klaviyo (based on the
klaviyo_synctable). - Processes them in small batches to prevent server overload.
- Sends real-time API calls to Klaviyo to create or update the missing catalog items.
- Automatically stops when all items are synced and logs a “Sync Completed” message.
All sync actions and responses are logged in the HuntBee Klaviyo logs for review.
How to Set Up Cron
Step 1 — Get Your Cron Token
In your OpenCart admin, go to:
Extensions → Extensions → Modules → Klaviyo Integration → Cron Tab
You will see a field labeled:
“Cron Authentication Token”
This token is used for security to ensure only authorized cron requests can trigger the sync.
Example:
Cron Token: klaviyo_secure_12345
Step 2 — Cron URLs
You can use the following URLs to trigger the sync manually or via your hosting control panel’s cron job scheduler.
Each URL must include your cron token for authentication.
🔹 Sync All (Products + Categories)
Synchronizes both products and categories that are missing in Klaviyo.
URL Example:
https://www.yourstore.com/index.php?route=extension/module/klaviyo_catalog/syncMissing&type=all&limit=10&token=klaviyo_secure_12345
Recommended Use:
Run this once initially after installing the module to bulk-sync everything.
🔹 Sync Only Categories
Synchronizes only categories that are missing in Klaviyo.
URL Example:
https://www.yourstore.com/index.php?route=extension/module/klaviyo_catalog/syncMissing&type=category&limit=5&token=klaviyo_secure_12345
Recommended Use:
Run this first (before syncing products) to ensure categories exist in Klaviyo.
🔹 Sync Only Products
Synchronizes only products that are missing in Klaviyo.
URL Example:
https://www.yourstore.com/index.php?route=extension/module/klaviyo_catalog/syncMissing&type=product&limit=5&token=klaviyo_secure_12345
Recommended Use:
Run this after the category sync is completed.
About the Parameters
| Parameter | Description |
|---|---|
| type | Determines what to sync — product, category, or all. |
| limit | The number of records processed per cron run (recommended 5–20). |
| token | Security token from the module settings. Required for authorization. |
Automatic Stop and Smart Sync
- The cron job automatically stops once all products and categories are synced.
- It detects “no pending items” and logs:
✅ Klaviyo Sync Completed — No Unsynced Categories or Products Remaining. - This ensures efficient resource use and prevents unnecessary server load.
Logs and Monitoring
All cron activity is logged inside:
/system/storage/logs/huntbee_klaviyo_logs/klaviyo_logs.txt
Each run logs:
- Start and completion time
- Type of sync (
product,category, orall) - Number of synced items
- Pending items count
- API responses from Klaviyo
Example log:
05-Oct-2025 22:15:12 PM - 🕒 Klaviyo Missing Sync Started | Type: all | Limit: 10
05-Oct-2025 22:15:13 PM - 🆕 Syncing Missing Category ID: 35
05-Oct-2025 22:15:14 PM - 🆕 Syncing Missing Product ID: 122
05-Oct-2025 22:15:15 PM - ✅ Klaviyo Sync Completed — No Unsynced Categories or Products Remaining.
05-Oct-2025 22:15:15 PM - 📦 Klaviyo Sync Summary: Categories - 45/45 synced | Products - 520/520 synced
Recommended Cron Scheduling
You can configure the cron job in your hosting control panel (such as cPanel, Plesk, or CyberPanel).
Example Cron Schedule:
*/15 * * * * curl -s "https://www.yourstore.com/index.php?route=extension/module/klaviyo_catalog/syncMissing&type=all&limit=5&token=klaviyo_secure_12345" >/dev/null 2>&1
Explanation:
- Runs every 15 minutes.
- Syncs up to 5 missing records per run.
- Silent execution (no email output).
- Automatically stops when all are synced.
Best Practices
- Always run category sync first before product sync.
- For very large stores, keep the
limitvalue between 5–20 to prevent timeouts. - Review logs periodically to ensure sync stability.
- Use event-based sync for ongoing updates and cron-based sync for bulk initialization.
- Do not enable Feed and Event Sync simultaneously — use one method at a time.
When to Use Event-Based vs Cron-Based Sync
| Scenario | Recommended Method |
|---|---|
| You’re adding or editing products regularly | Event-Based Sync |
| You already have many existing products/categories | Cron-Based Bulk Sync |
| You’re importing data via CSV or external ERP | Cron-Based Sync (scheduled) |
| Your store has thousands of products | Event-Based (real-time) or Low-limit Cron Sync |
| You want Klaviyo to periodically fetch data | Feed Method (Alternative) |
Conclusion
The Cron-Based Klaviyo Sync gives you complete flexibility to control how your catalog data is pushed to Klaviyo — whether you prefer real-time event sync or scheduled bulk sync.
Together, these two methods ensure your OpenCart and Klaviyo catalogs stay perfectly synchronized, improving automation, segmentation, and personalization in your Klaviyo marketing campaigns.