Help

0

How to send automatic emails when stock levels are low?

Although we do have features such as the Replenishment tool (v14) and Reordering Rules, some users require to have an automatic (live) notification of when a product (or certain products) go below a certain stock level. 

アバター
破棄
2 回答
0
Best Answer

1. Activate Developer Mode.

2. Go to product.product, form view.

3. Create a new field type float (using Studio).

4. Access the field properties:



5. On the fields “Related Field” and  “Dependencies, add “qty_available”. Make sure to mark the field as “Stored”.



6.  Go to Server Actions and create this server action:


The field “x_studio_quantity_on_hand_stored” is the new float field created. Make sure to adapt this to your field name.

 

for record in records:

qty = record['qty_available']

record['x_studio_quantity_on_hand_stored'] = qty



7.

Go to product.product list viewand add filter the list by “Product Type: Storable Product”

8. Select all the products

9. Go to Actionsand execute the server action just created:


This server action will compute the field “On Hand Quantity” into the new field you just created.

10. Go back to the Server Actions menu and DELETE THE SERVER ACTION.


11. Go to Email Templatesand create a new email template which the user will receive when the stock level is low. For example:



12. Go to Automated Actionsand create a new automated action. Model: “Product, Trigger: “On Update”, Action to Do: “Send Email”, Email Template: the email template you just created.

Before Update Domain: Quantity on Hand (stored) Quantity on Hand (stored) [THIS SHOULD BE THE FIELD YOU CREATED >= ”threshold number”




Before Update Domain: Quantity on Hand (stored) Quantity on Hand (stored) [THIS SHOULD BE THE FIELD YOU CREATED >= ”threshold number”

 

Apply On: Quantity on Hand (stored) [THIS SHOULD BE THE FIELD YOU CREATED] < “threshold number”


Click on the 3 dots icon on the right side of the window:

Select the product IDs that you’d like to apply that threshold with a “Any” condition:



Ideally, you’ll add all the product IDs of the products that meet the same threshold for low stock level.

 

 

If you need to add more than one threshold, create a new automated action with the same parameters, but changing the threshold. Be careful with creating too many automated actions.

 

 

13. Once the product quantity goes below the threshold, the user that you defined on your email template will receive the email.

アバター
破棄
0
Avatar
Omprakash
Best Answer

Hi, Lucas, 

if you are looking for automatic emails when stock levels are low, you can take a look at this application:

Low Stock Alert It is recommended that you customize the application to suit your business requirements.

アバター
破棄