Vendure Stock Monitoring plugin

Make sure your shop is stocked up with this Vendure Stock Monitoring Plugin

Made by a Vendure Silver Partner!
This plugin is free for personal and commercial use. Just follow the instructions below.
  • View low stock items in your dashboard
  • Get email notifications for low stock items
  • Configure who should get email notifications and when with the email recipients strategy
  • Define your own stock thresholds

B9970a59 191a 4648 8eb7 6c6bb59ae903


yarn install vendure-plugin-stock-monitoring
  1. Add the plugin to your vendure-config.ts to expose a productVariantsWithLowStock query in the admin API.
import { StockMonitoringPlugin } from 'vendure-plugin-stock-monitoring';
import { AdminUiPlugin } from '@vendure/admin-ui-plugin';

plugins: [
    threshold: 10,
  // Add the widget to the admin ui
    port: 3002,
    route: 'admin',
    app: compileUiExtensions({
      outputPath: path.join(__dirname, '__admin-ui'),
      extensions: [StockMonitoringPlugin.ui],

For more configuration options regarding the admin ui, check the docs.

When you start the server and login, you can find stock-levels under the add widgets button.

Low stock email handler

The email handler will send an email when the stocklevel of a variant drops below the given threshold. To activate the handler, you can add the following handlers to your vendure-config.ts:

import { createLowStockEmailHandler } from "vendure-plugin-stock-monitoring";

  handlers: [
    // Dynamically get email recipients based on the event
    // and send an email when stock drops below 10
      threshold: 10,
      subject: "Stock of variants belo 10",
      emailRecipients: async (injector, event) => {
        // Dynamically resolve email recipients with the injector and event
        const recipients = await injector.get(MyService).getAdminsForChannel(event.ctx);
        return recipients;
    // Send emails to two static addresses when stock drops below 99
      threshold: 99,
      subject: "Stock of variants below 99",
      emailRecipients: ["", ""]

Create a template file for the low stock email in static/email/templates/low-stock/body.hbs with the following content:

        <mj-text font-size='30px'>Low stocknotification</mj-text>
        <mj-divider border-color='#343434'></mj-divider>

          These products are low on stock:
          <br />
          <br />
          {{#each lines}}
            <a href='http://localhost:3050/admin/products/'>
            <br />