Solved

Is there an Event Variable for Stock Levels?

  • 18 September 2021
  • 3 replies
  • 29 views

Badge

Hi, 

I was wondering if there is an event variable to display the stock level of certain products so that I can include these in my cart flows to increase scarcity.

The picture attached is the sort of code I am looking for:

 

icon

Best answer by david.to 19 September 2021, 15:54

View original

3 replies

Userlevel 6
Badge +4

Hello @mr1kai,

Great question!

This would really all be dependent on the information being passed by your metric/event. From my experience, if you were using one of the ecommerce integration which has a direct integration with Klaviyo such as Shopify, the default events passed by these ecommerce integrations does not provide stock levels as part of their metadata. This isn’t to say you wouldn’t be able to adjust this however. 

To have stock levels provided as part of your metric’s event metadata, I would suggest reviewing your ecommerce platform’s backend to see if you could include this information to be passed to Klaviyo. If the ecommerce backend does not support including this information, an alternative solution would be creating your own custom event via API which would include your desired metadata. To achieve this, I would recommend working with a developer you are familiar with or finding a Klaviyo Partner who excels at developmental work. 

In addition, I would further suggest taking a look at the following Help Center article we offer on using API to push your own custom events as well as some similar Community posts that touch upon this subject. I’ve included a few examples below:

I hope this helps!

David

Badge

Hi @david.to 

Thank you for your reply.

I am using shopify, and I know that klaviyo is aware of when a product is sold out or not. Therefore I assumed this variable should already be flowing arround in their integration. But if it is not avaialble, I simply have to pass on this opportunity. My experience with API's is not sufficient to build anything like this myself.

Thank you again for your prompt reply.

Have a good day.

Kind regards,

Kai

Userlevel 3
Badge +4

Hi @mr1kai

 

Would love to add some more clarity to this great question! 

 

This would really all be dependent on the information being passed by your metric/event. From my experience, if you were using one of the ecommerce integration which has a direct integration with Klaviyo such as Shopify, the default events passed by these ecommerce integrations does not provide stock levels as part of their metadata. This isn’t to say you wouldn’t be able to adjust this however. 

 

 

As @david.to , mentioned above, Klaviyo only tracks metrics and information that are synced over to us and stock levels isn’t something Shopify sends to Klaviyo. We do have the option to know when an item is Back in Stock, however, this is because a customer presses the button ‘Subscribe to Back in Stock’, and there has been code added to the website to tell Klaviyo when this event occurs. Not because we have access to product quantity levels. 

 

I do think this is a good idea and would encourage you to look into finding a Klaviyo Partner who could build this out for you if it interests you! 

 

Best,

Taylor 

Reply