The Back in Stock implementation for Shopify (described here: https://help.klaviyo.com/hc/en-us/articles/360001895651-How-to-Install-Back-in-Stock-for-Shopify) doesn’t provide us with the level of customization that we would like to have. As such we are looking at implementing a custom Back in Stock form either via a legacy form method (similar to https://help.klaviyo.com/hc/en-us/articles/115005249588-How-to-Add-and-Customize-a-Legacy-Embedded-Signup-Form) or via a custom form and API request in the frontend (in JS).
This developer documentation for the API https://help.klaviyo.com/hc/en-us/articles/360006565332-Back-in-Stock-for-Mobile-App-Developers while not explicitly stated I believe is only for server side API calls as CORS blocks POST requests via JS.
Can anyone point me in the right direction here - add a user to back in stock list for a product via a custom form on the frontend, without need for server-side api calls. (or if there is no right direction - let me know!)
Best answer by julie.accardoView original
You do have the ability to make a front end API call to our Back in Stock endpoint. Below are a few screenshots from a PDF that we send to customers that are looking to set up a custom catalog. The only thing I am not 100% sure about would be whether you would need to set up a custom catalog or if you are good to pull the above data from the Shopify catalog.
Figured I’d give you a starting point!
Hope this helps!
A quick note on this from a recent customer resolution:
The “platform” should be set according to the catalog source. If you are using a custom catalog, the platform should be set to “api.” However, if you are using this process with Shopify’s catalog included with the Shopify integration, then the platform should be set to “shopify”
If that’s not possible, perhaps there’s a way to mock the subscription via the identify API. I.e. that is like
then POST this json to
At this time the back in stock functionality does not support subscribing users via a Phone Number. Thus attempting to identify a user with a phone number will not work as Klaviyo will will rely on using an email address to identify its users and subscribers to back in stock.
However, I am aware that our Product Team is working hard towards including this functionality of allowing users to subscribe to back in stock with a phone number. I’ll share your feedback to the team for more details. When this feature does become available, i’ll be sure to follow up in this thread so other Community members who may be following along can receive an update as well.
Thanks for being a member of the Klaviyo Community!
And It’s a pleasure to be a part of the Klaviyo Community.
At this time we currently do not have any estimation on when this feature will be available. But, with the growing interest in Klaviyo’s SMS services I would suspect it would be sometime in the near future as Klaviyo expands its SMS capabilities.
Awesome David, thank you! I may have found a workaround though in case you were curious.
We can fetch the customer’s email from their phone number via the Klaviyo `/identify` endpoint, and then pass the email into the backInStock endpoint. That would at least work for any SMS subscribers that already are in Klaviyo.
“You do have the ability to make a front end API call to our Back in Stock endpoint.” => this should be mentioned in the docs… So what are you recommending how to call your API point? Do we need to create a Shopify App just for that?