Skip to main content
Solved

Where do subscribers go when using back in stock API?

  • January 28, 2022
  • 7 replies
  • 603 views

Forum|alt.badge.img+2

I am using the API based on this URL:

 

https://developers.klaviyo.com/en/docs/how-to-set-up-custom-back-in-stock

 

I am am able to see (based on the API) that my users are being added to the database, however, when I go to look at the subscribers in my lists I can’t find the dummy email address that I am sending to the database. Where do I find these users? Because, based on the API they are being added to the system somewhere I just don’t know where.

Also, there is a note in the page:

“To subscribe a customer to a list as part of the Back In Stock workflow, you will need to make a separate, additional call to the List API.”

Does that mean that the users are in the system but I need to create an additional list and add them to the list there?

 

Best answer by David To

Hey @Helmut Granda,

@retention’s point of needing to use a variant ID that is available within your product catalog is spot on! As you had highlighted, this point of requiring a valid variant ID is called out in the Invalid Variant ID subsection of the Set Up Back in Stock via API Developer’s Portal documentation. When this occurs, you’ll still be received a 200 response. 

When making the call, a 200 response simply means that the request was received and understood. This does not necessarily mean that all the aspects within the call was assigned and understood correctly. Another way to understand this is that a 200 response simply means the request was valid and no outstanding errors was detected.

To resolve this, instead of requiring you to setup a back in stock flow, you’ll actually want to ensure your catalog is set up correctly and that the product whose variant ID you are using in your call is present in the catalog. Alternatively, you can adjust your test call to be using a variant ID of a product that is within your catalog. 

For more hands on assistance and troubleshooting, I suggest reaching out to some of our wonderful Klaviyo Partners (@retention being one of them!) who can further assistance with this. You can find a Klaviyo Partner that fits your need by reviewing our Klaviyo Partner Directory

David

View original
Did this topic or the replies in the thread help you find an answer to your question?

7 replies

David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • January 31, 2022

Hello @Helmut Granda,

Welcome to the Klaviyo Community!

That understanding is correct! Users who subscribe to back in stock are not added added a list by default. When leveraging Klaviyo’s back in stock function, users who subscribe to back in stock are actually triggering an event/metric for back in stock rather than being added to a list. 

Rather than being list subscribers, customers who subscribe to back in stock would be stored in your Klaviyo account as an active profile having joined your account through general engagement. To allow these users to opt-in and join a list while subscribing to back in stock, you would need to make a subsequent call to the List API to add them to your desired list. 

I hope this helps!

David


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 4 replies
  • January 31, 2022

Hi @David To,

Thanks for the reply, and I understand now and it makes sense that users that subscribe to “Back in stock” are not necessary part of a list since they are just temporary users that will be notified but have not really opted out for long term communication. Unless we make that explicit in a custom form.

With that in mind, I am getting a 200 response from the server with a simple “b@b.com” and when I go to profiles I am not able to find this email address either under Active Profiles or Suppressed Profiles. Where does this email address went to?

I did a search for b@b.com near the header in the “Search for someone” field but I got a “We couldn’t find anyone matching your search.”
I just want to make sure we are sending users to subscribe to “Back in stock” and that we are not getting false positives since the API is returning a 200.

 

 


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • February 1, 2022

Hey @Helmut Granda,

Glad that made sense! 

When testing, I would suggest using an email with a legitimate email domain as opposed to b@b.com as Klaviyo does have a validator in place where it will deliberately ignore metrics/subscriptions for emails under domains like test.com​ and example.com​. 

When done correctly, you should see a profile created and triggering the Subscribe to Back in Stock event which you can view under Analytics > Subscribe to Back in Stock > Activity Feed

David


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 4 replies
  • February 1, 2022

Hi @David To,

Thanks again for the follow up, I used a “real” email address and I get the same response from the server: 

{"email": "customemailaddress-returned", "success": true}

 

However, after I look at the Analytics or Profiles the email address is not being added. I just found something in the documentation:

 

Invalid Variant ID

The API does not validate variant IDs. If an invalid variant ID is included in a request, the API will return a standard success response. No event will be created for the profile and the customer will not be queued to receive a back in stock message.

 

So I think that what is happening here is that I have not set up the back in stock flow. It is hard as I am getting pieces of information here and there. 


retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 942 replies
  • February 1, 2022

@Helmut Granda - Just a thought here, I think that error you’re seeing is because that Variant ID isn’t in your Product Catalog.  In other words, it doesn’t know which Product to assign the Back In Stock request to.  Check your Product Catalog and make sure it exists with the Variant ID you are passing in.

Here’s some general documentation about Catalogs, and if you are integrating a product feed via the API, see the last two links:

Hope this helps you figure out the solution.  Let us know if you figured it out!


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • February 1, 2022

Hey @Helmut Granda,

@retention’s point of needing to use a variant ID that is available within your product catalog is spot on! As you had highlighted, this point of requiring a valid variant ID is called out in the Invalid Variant ID subsection of the Set Up Back in Stock via API Developer’s Portal documentation. When this occurs, you’ll still be received a 200 response. 

When making the call, a 200 response simply means that the request was received and understood. This does not necessarily mean that all the aspects within the call was assigned and understood correctly. Another way to understand this is that a 200 response simply means the request was valid and no outstanding errors was detected.

To resolve this, instead of requiring you to setup a back in stock flow, you’ll actually want to ensure your catalog is set up correctly and that the product whose variant ID you are using in your call is present in the catalog. Alternatively, you can adjust your test call to be using a variant ID of a product that is within your catalog. 

For more hands on assistance and troubleshooting, I suggest reaching out to some of our wonderful Klaviyo Partners (@retention being one of them!) who can further assistance with this. You can find a Klaviyo Partner that fits your need by reviewing our Klaviyo Partner Directory

David


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 4 replies
  • February 2, 2022

Thanks for the suggestion @retention, unfortunately I am not able to see any products in the catalog, I opened a new thread (question) to see if that can be resolved here: