1. Overview
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 Stock 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 Stock Alert Run Settings
Note: This Setting is only applied for Stock Alert, not for Price Alert Subscription.
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.1.3 Price Alerts
In Enable: choose to enable the Price Alert function.
In Allow Price Subscription for Customer Group: Choose the customer groups to allow subscribing for price alerts.
In Allow Price Subscription for Product Type: Choose which types of products to allow signing up for price alerts.
Note: For the moment, we haven’t supported this function on Grouped and Bundle products yet. We’ll update as soon as possible. Please contact us if you need this function.
- For Simple, Downloadable & Virtual Products: The subscription field is displayed on the product page. When the price of a subscribed product changes, an email will be sent with that product page link.
- For Configurable Products: This function is not applied to the parent product and the subscription field only shows up when selecting the child product.
- When the price of the subscribed child product changes, an email will be sent with the product page link.
- However, if the child product's visibility once set to "Catalog/Search" then the admin changes it to "Not visible individually", the product link will redirect to the Page Not Found.
In Limit Email Send per Customer (Must Fill): here you set the maximum number of emails sent to customers about price adjustments. When there’s a price change, the email will be sent only one after running cron.
In Email Sender: Enter the email address used for sending to customers.
In Price Alert Email Template: Choose the email template for price alerts.
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.
2.1.4 Notify Button Design
Note: This setting is applied for both Stock & Price Alerts.
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.2 Manage Stock/Price Alert Subscription
BSSCommerce ⇒ Manage Stock Alert Subscription (for Stock Alerts) or Manage Price Alert Subscription (for Price Alert). There're 2 separated grid tables for you to keep track & manage these 2 functions.
Admin can manage stock/price subscription information of customer here, including customer name, email, product, send count (the number of times that stock/price email is sent to the customer), send date and status of the subscription.
In the Status column, you will find 3 kinds of status: Sent, Pending and Sent Count Limit Reached.
When the number in the Send Count reaches the number of Limit Email Send per Customer that you set in the configuration, it will show the status Sent Count Limit Reached. Except for 2 cases:
-
If you increase the limit - The status will change from Pending to Instock to Sent and the Send Count will increase until it reaches the limit again.
- The customer unsubscribes and then subscribes again with the same email address - The limit will be reset from the start.
To perform actions on these subscriptions, tick the checkbox and choose:
-
- Delete: to delete all selected price alert subscriptions
- Run cron: to send notification emails to selected subscribers
*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/Price 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 or Price 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 Stock/Price Alert Stock/Price 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 Stock/Price Alert Subscription Tabs
Two additional tabs called Stock Alert Subscription & Price Alert 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 Stock Alert 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
2.7.3.1 Configurable Product
2.7.3.2 Grouped Product
2.7.3.3 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.
See full detail here: https://docs.google.com/spreadsheets/d/1TgyK2UzNcHEZ6XNKGFmUAqlv9bS6aqmmG9bXcaVwBko/edit#gid=0
3.2 GraphQl API
These APIs are used for getting stock notification information of the module:
See full here: https://docs.google.com/spreadsheets/d/1TgyK2UzNcHEZ6XNKGFmUAqlv9bS6aqmmG9bXcaVwBko/edit#gid=704239335