Flow Builder & E-Mail Templates
The Stock Reminder plugin fully integrates with the Shopware Flow Builder. This allows you to individually control the email delivery for notifications and confirmations and combine them with existing workflows.
Available Events
The plugin provides three custom business events that can be used as triggers in the Flow Builder:
prems_stock_reminder.double_opt_in
This event is triggered when a visitor submits the notification form and the double opt-in feature is enabled. It contains the data needed for the confirmation email, including the confirmation link.
Typical flow: Send an email with the confirmation link to the subscriber.
productName
Name of the subscribed product
confirmUrl
Confirmation link for the double opt-in
shopName
Name of the shop (from the sales channel's basic information)
email
The subscriber's email address
prems_stock_reminder.back_in_stock
This event is triggered when a product is back in stock and the notification email should be sent to the subscriber. It contains the product data and subscription information.
Typical flow: Send an email to the subscriber with the product information and a link to the product.
productName
Name of the product that is back in stock
productId
ID of the product, e.g. for a link to the product
quantity
Quantity desired by the subscriber
shopName
Name of the shop (from the sales channel's basic information)
email
The subscriber's email address
Tip: You can use the
productIdvariable to build a link to the product in the email template, e.g. viarawUrl('frontend.detail.page', {'productId': productId}, salesChannel.domains|first.url).
prems_stock_reminder.subscription_created
This event is triggered as soon as a customer newly subscribes to a stock notification for a product. This allows you, for example, to automatically inform the shop owner which product was subscribed to. The event is only triggered the first time an email address subscribes to a product – not when an existing subscription is submitted again.
Email delivery is controlled exclusively via the Flow Builder: the bundled flow Stock Reminder - Subscription Notification is initially deactivated after installation. To use this feature, activate the flow under Settings > Flow Builder. The default recipient is configured – this is the shop owner address from the sales channel's basic information (Basic information > Email address). You can change the recipient in the flow action at any time.
Typical flow: Send an email to the shop owner with the details of the new subscription.
productName
Name of the subscribed product
productNumber
Product number of the subscribed product
productId
ID of the product, e.g. for a link to the product
quantity
Quantity desired by the subscriber
shopName
Name of the shop (from the sales channel's basic information)
email
The subscriber's email address
In addition, the salesChannel object containing the data of the respective sales channel is available in the email templates for all events.
Setting Up Email Templates
The email templates are automatically created during plugin installation and linked to the corresponding events in the Flow Builder. You can customize the templates at any time via Settings > Email Templates.
The plugin ships with the following templates and flows:
Stock Reminder - Double Opt-In
Stock Reminder - Double Opt-In Confirmation
prems_stock_reminder.double_opt_in
Yes
Stock Reminder - Back in Stock
Stock Reminder - Back in Stock Notification
prems_stock_reminder.back_in_stock
Yes
Stock Reminder - New Subscription (Admin)
Stock Reminder - Subscription Notification
prems_stock_reminder.subscription_created
No
Last updated
Was this helpful?
