Shopware AI Reorder Prediction: Proactive B2B Repeat Sales
Shopware 6 plugin that predicts B2B reorder timing from order history and emails customers before they run out, with a pluggable AI layer and built-in licensing.
The Challenge
B2B customers who buy the same products on a cycle don't always reorder on time, not because they've churned, but because nobody reminded them. Shopware has no concept of "this customer is due to reorder" anywhere in core.
Critical Pain Points
- Reorder timing varies per customer and per product; a blanket "reorder in 30 days" email is wrong for most accounts
- Manually tracking who was due for what meant either spamming everyone or emailing no one
- Any prediction system risked recommending the wrong thing if it ran on too little order history
- The plugin needed to work as a sellable product, not a one-off customization, which meant licensing and usage limits from the start
- Whatever powered the predictions had to be swappable: not every shop wants to send order data to the same AI vendor
Without a system watching purchase cadence per customer, repeat revenue depended entirely on the customer remembering to come back.
The Solution
I built a prediction engine that reads a customer's real order history and reaches out before they'd normally run out, with the AI layer swappable and licensing built in.
Pattern extraction from real order history
A dedicated analyzer works out each customer's actual reorder interval and quantity per product from their own past orders, not a generic assumption.
Pluggable AI, provider-agnostic
A factory pattern swaps between Anthropic, OpenAI, or a local model behind one interface, with predictions cached so repeat runs don't re-hit the API.
One click from email to cart
Reorder emails link straight to a prediction-filled cart. A dedicated account page also shows predicted reorders any time, not just when the email lands.
Licensing and usage metering from day one
A feature-gate service and usage tracker sit underneath the prediction logic, built so the plugin ships as a licensed, tiered product rather than a single-shop customization.
Results & Business Impact
Reorder emails triggered by real behavior
Predictions come from each customer's own order history, not a fixed reminder schedule that's wrong for most of them.
No vendor lock-in on the AI layer
Anthropic, OpenAI, or a local model all sit behind the same interface, swappable without touching the prediction logic.
Cart pre-filled, not just suggested
The one-click reorder path removes the re-shopping step entirely for repeat purchases.
Built to sell, not just to run
Licensing and usage tracking were part of the architecture from the first commit, not retrofitted later.
Technologies Used
- Shopware 6.7
- PHP 8.2
- Symfony Scheduled Tasks
- DAL
- Anthropic API
- OpenAI API
- Licensing/Usage Metering
Leaving repeat revenue to memory?
If your B2B customers reorder on a cycle and nobody's reminding them, that's revenue sitting on the table. Let's talk through what a prediction-driven reorder flow could look like for your shop.
Book a consultationRelated Case Studies
Dropshipping automation
Shopware 6 dropshipping automation for a German shop. Multi-supplier routing, real-time stock sync, and a supplier portal. No human in the order loop.
Read Case Study → AutomationAI cross-selling pipeline
AI-generated cross-selling for a German plant nursery's Shopware 6 shop. An LLM proposes accessory and companion-plant rules per category, verified live.
Read Case Study → AutomationShipping bin-packing engine
Shopware 6 cart processor that solves shipping cost as a bin-packing problem: mixed carts pack into the cheapest real combination of parcels and pallets, live at checkout.
Read Case Study →