How can I notify Availability Subscribers that a product is back in stock?

What is being used? Is something close to the CMS version available?

We have the Availability Subscriber component available that should be working as the legacy CMS control, but unfortunately it currently has the following disclaimer:

This component only creates a list of the users that subscribe to this product. Currently it doesn’t send an automatic email to these users when the product becomes available. It only collects the emails of the users that show interest on the products.

Our product team is currently working on enhancing the “notify when back in stock” functionality, you should see this posted in our release notes as soon as it’s available.

It’s expected to make this a little easier for you: install the new app and it will create the message center templates, listen for inventory changes, send the emails, etc.

Meanwhile, you can try a workaround that was developed by our LATAM 1st party apps team:

1 Like

Thanks for the answer. Do you have the documentation from vtex.letmeknow?

According to Availability Subscriber docs, “Notification Send” is to control whether the notification has already been sent.

In this case, is vtex.letmeknow using this field to enable triggers and to set the value to true when the product is back on stock?

Unfortunately vtex.letmeknow is very recent, so no docs yet and the Github repo is still private. I had a look in the source code, however, and could confirm the app only sends notifications when notificationSend is false in the AS data entity of Master Data.

This is the snippet where I found this:

documents = await this.http.get(`/api/dataentities/AS/search?_fields=_all&notificationSend=false&skuId=${data.IdSku}`, {
            headers: {
               'VtexIdclientAutCookie': authCookie,
               'Cache-Control': 'no-cache',
               'Content-Type': 'application/json',
               'X-Vtex-Use-Https': true
            }
         })
1 Like

For now, besides receiving the email from the trigger, the way to know if vtex.letmeknow is working is to query the Data Entity?


These extra fields from the image are not being populated. Perhaps letmeknow is not working?

I think so, but I haven’t used it so far…

Maybe so… If it’s not working, the best we can do right now is wait for the new upcoming app to be announced. The workaround I gave you is all I have to offer for now, unfortunately!

Maybe I need to use a custom block exported by letmeknow. Do you have that information?

1 Like