Out of Stock Notification for Magento 2 extension allows customers and guests to sign up for out of stock products. The extension will automatically send to notification email to the list of subscribed customers when the product is back in stock.
2. How Does It Work?
2.1 General Config
Go to Stores ⇒ Configuration ⇒ BSSCommerce ⇒ Out of Stock Notification.
2.1.1 Product Alerts
In Enable, choose Yes to enable the extension or No to disable it.
In Allow Product Subscription for, select group to apply out of stock notification.
In Send Notification Based on Available Number of Product, choose Yes to allow sending notification email according to the number of items in stock. For example, if there are 15 people sign up for the out of stock notification for a product, but there are only 10 items available. The extension will send product alert for the first 10 people, the remaining 5 people will be put on the waiting list.
In Notification Message, enter a message to guide customers to fill in the email field.
In Stop Notification Message, enter a message to guide customer on how to stop notification from the product. In case you leave it unfilled, the default message will get displayed.
In Limit Email Send per Customer (Must Fill), restrict the number of stock alert email sent to each customer in case the product is back to stock many times. (Only apply to a product)
For example, you set the limit number of emails sent per customer is 3. When a customer subscribes to receive notification of back-to-stock product A, the maximum number of emails you can send to this customer is 3. Even the product A is re-stocked many times (more than 3), you only send customers 3 emails.
If the customer subscribes to get updated of back-to-stock product B, the limit number of email is also 3.
In Send Mail When Quantity (Must Fill), send email to the customer only when product quantity reach meets this requirement.
In Stock Alert Email Template, choose the template of stock alert email.
In Alert Email Sender, choose the sender of the stock alert email.
2.1.2 Notify Button Design
In Notify Button Text, edit the text within the nofify button.
In Stop Notify Button Text, edit the text within the stop nofify button.
In Button Text Color, edit text color.
In Button Coor, edit button color.
2.1.3 Product Alert Run Settings
In Choose Type Cron, there are two ways to set the frequency of running cron job to send emails.
- Dropdown: On selecting dropdown cron type, there are various options available in Frequency. You can run cron daily/weekly/monthly.
Accordingly, out-of-stock notification emails will be automatically sent daily/weekly/monthly as set.
- Field: This option helps you send notification emails more flexibly without selecting Run cron now button.
In Frequency field, enter cron values in the following order:
* * * * * = Minute Hour DayofMonth MonthofYear DayofWeek
Here, we set to run cron every minute. In other words, product alerts will be updated every minute.
In Start Time, set the starting time to send emails.
In Error Email Recipient (Must Fill), set email to receive error mail in case of cron job’s error.
In Error Email Sender, set email to send error mail in case of cron job’s error.
In Error Email Template, set an error email template.
*Note: Remember to enable displaying out of stock product.
Go to Stores Configuration
2.2 Customer Subscription
BSSCommerce ⇒ Manage Customer Subscription.
Admin can manage stock subscription information of customer here, including customer name, email, product, send count (the number of times that stock email is sent to the customer), send date and status of the subscription.
*New Update: The extension has a new feature to export the list of customer subscriptions. You can find the Export button next above the Manage Customer Subscription Grid.
2.3 Stock Alert Email Template
Go to Marketing ⇒ Communications ⇒ Email Templates.
Click the Add New Template button to create the email template.
In Template, select Stock Alert.
Then click Load Template button.
You can modify the template by inserting variables in the Template Content.
Fill in all the required fields, and click Save Template button.
Then go back to the General Config Products Alert Stock Alert Email Template. You choose a new template you just created, and save the configuration.
2.4 Display Notify Button
2.4.1 Category Page
The Notify button is located under the Out of stock status when hovering on each product. You will be redirected to the product when clicking this button.
2.4.2 Product Page
Guest or not-logged-in customers fill in the email field and click Notify Me button to receive stock alert notification. A message will be shown as “Alert subscription has been saved” and a Stop Notify button appears to stop notification for that product if customer need.
For the logged-in customer, the email field will be automatically filled in.
2.5 Product Subscription tab
An additional tab called Product Subscription is included on the Customer Account Page of logged-in customers. The customer can check information of products that they have subscribed here, stop notification of any product and stop notification of all products.
2.6 Stock Alert Email
When the product is back in stock, the extension will automatically send notification email as set up in 2.1.
2.7 Work with Product Types
2.7.1 Simple Product
In Product detail page, set the product's Stock Status to Out Of Stock and Out of Stock Notification to Enable then save.
Said product now shows no Add to Cart button.
2.7.2 Compound Product's logic
*Note* Out of stock notification logic for Configurable Product, Grouped Product, and Bundle Product.
Display out of stock (default): Yes -> category page shows the product that is out of stock with notify me button
The redirect in the notification email when the product is back in stock will depend on where the customer subscribes to get notification:
- Subscribe at the parent product -> redirect to the parent product page.
- Subscribe at the child product -> redirect to the child product page.
Note: With the configurable product, the module doesn't support the scenario when the parent product is out of stock.
(This is because in this scenario, the default Magento still show the product page in stock and can't add to cart the child product)
2.7.3 Compound Product's Front End View
126.96.36.199 Configurable Product
188.8.131.52 Grouped Product
184.108.40.206 Bundle Product (Parent Product, Child Product)
3. API supports
3.1 Repository API
Repository API is used to get stock notification information of the module.
3.2 GraphQl API
These APIs are used for getting stock notification information of the module: