Skip to main content

Hello,

 

We have a setup consisting of Magento 2 and the Vue Storefront (VSF 1st version). Custom feeds are configured for each store view, and our products are visible in the Klaviyo admin.

We implemented the Back in Stock (BIS) API on the VSF API side to handle server API calls. However, when we trigger the BIS subscription call, we receive the error message: “Invalid Integration: '$magento_two'. Supported values: {'$custom'}.” 

We attempted to change the integration to “custom,” but encountered another error: “The variant in your relationship payload does not exist.”

Could you please advise on how we can sync our feeds to the “API: Default” catalog? Additionally, how can we utilize the $magento_two integration instead of $custom in the BIS API call?

 

Thank you!

Hello ​@viktort_vaimo , 

The reason You are seeing the $magemto_two error because klaviyo only supports $custom for back in stock API calls — $magento—two isn't valid in this context. First of what should do is stick with $custom, but make sure the variant ID you are sending matches exactly what's in your custom catalog feed in klaviyo. The "variant does not exist" error means klaviyo can't find that product ID.

 

Secondly if you want to use $magento_two, klaviyo currently doesn't allow that for BIS API Calls. BIS only works with custom catalogs ( those sent via API or feeds), not with Magento 2 pre built integrations. Now you have ensure your custom feed is mapped and sent to the API: default catalog settings in klaviyo. Select your custom source, and confirm it's linked to the default catalog.

 

Let me know if this is helpful or you need help double checking the fees structure or product ID formation.


Hello @MANSIR2094,

Thank you for your clarification regarding this matter.

Our custom feeds are set up through the admin panel under "Custom Sources." However, the "API: default" catalog remains empty for some unknown reason. Nevertheless, all feeds show a status of "Sync Complete."

Should we utilize Catalog API V3 to sync the "API: default" catalog, or are configured feeds (in "Custom Sources") enough for that?

 

We have the following feed XML structure:

<?xml version="1.0"?>

<Products>

--- ... ---

  <Product>

    <id><!&CDATAC{{ product_sku }}]]></id>

    <title><!tCDATA!{{ product_name }}]]></title>

    <link><!&CDATAt{{ product_url }}]]></link>

    <description><!oCDATA&{{ product_description }}]]></description>

    <price>{{ product_price }}</price>

    <image_link>{{ product_image_url }}</image_link>

    <categories><!tCDATAe{{ product_categories }}]]></categories>

    <inventory_quantity>{{ product_stock }}</inventory_quantity>

    <inventory_policy>2</inventory_policy>

  </Product>

--- ... ---

</Products>


Hey ​@viktort_vaimo, Nice 👍 

So if your custom feeds show "sync complete" but the API default catalog is still empty, it likely means those feeds are syncing to separate custom catalogs, not the API default one klaviyo uses for things like back in stock. But for you to confirm, first go to catalog — settings in klaviyo and check if any of your custom feeds are mapped to the API default.

 

If not then yes you will need to use catalog API V3 to sync products directly into the API: Default catalog.

Though your feed xml looks okay but feeds via custom sources don't automatically populate the default catalog unless explicitly linked or pushed via API.


@MANSIR2094 

I wanted to clarify that, according to the documentation at https://developers.klaviyo.com/en/docs/how_to_set_up_custom_back_in_stock

server-side calls for integrations beyond the API are possible

@viktort_vaimo 

If I understand your setup correctly, you are not utilizing the Magento 2 catalog synchronization feature but are instead using a custom XML catalog feed. Currently, this approach does not support product variants, which means it cannot be used for back-in-stock notifications. You will need to convert your XML catalog to a Catalog API V3 catalog.

Please note that deleting a catalog source will not remove the items within your catalog; it will only disconnect the source from Klaviyo. The catalog will then function as an API-based catalog that you can manage using Catalog API V3 calls.

After removing the catalog source, you can use the following command to retrieve the previous XML catalog items in API format.: https://developers.klaviyo.com/en/reference/get_catalog_items

To update catalog items, you may use a call such as

https://developers.klaviyo.com/en/reference/bulk_update_catalog_items

hope this helps. Let me know if you have any follow up questions.