Skip to content
Devinity Solutions

We built an AI that knows when your customer runs out

A re-engagement engine for ecommerce: it works out when each customer runs out of what they bought, writes them a personal email, and decides who needs a discount.
Haider Ali

Chief Technology Officer

5 min read

A customer buys a 10kg box of supplement powder. Somewhere in that purchase is a clock: at their rate of use, the box runs out in a knowable window. Land in their inbox a few days before that window with a message that reads like it was written for them, and you get the reorder. Miss it, and they are standing in a supermarket aisle or typing your product's generic name into a search box — and the sale you already earned goes to whoever is closest.

We built this for an ecommerce retailer: an engine that estimates the run-out clock per customer, drafts the re-engagement email, decides whether that person needs an incentive, and sends it at the right moment. This piece is how it works and where it generalizes, because the mechanism is not about supplements. It is about any product bought repeatedly at a personal rate — and most stores are addressing it with a blast schedule.

The problem with day-sixty

The standard tooling handles re-engagement with fixed-interval flows: a winback email at day 45, another at day 60, a discount at day 90. Every customer gets the same clock.

But customers do not consume on the same clock. The person who bought the 10kg box and the person who bought the 2kg pouch run out months apart. The gym-five-days-a-week customer and the January-resolution customer burn through the same box at completely different rates. A fixed flow is early for half of them — training people to ignore your emails — and late for the other half, which is the expensive half, because late means they already replaced you.

The data to do better is already in the order history. Pack size, first purchase, the gap between their reorders, how that gap has drifted. A per-customer consumption estimate falls out of exactly the records every store already holds; almost nobody computes it.

What the engine actually does

Four decisions, made per customer rather than per campaign.

When. A consumption model estimates each customer's run-out window from their own history — what size they buy, how often they have reordered, how their cadence compares with buyers of the same product. New customers start from the product's typical depletion rate and get more individual as their history accumulates. The output is not a segment; it is a date range per person.

What it says. A model drafts the email against that customer's actual context: the product they bought, roughly where they are in it, their name used the way the store's voice uses names. It reads like a well-run shop paying attention, not like a campaign — because mechanically it is not a campaign, it is one message to one person about one box. Drafts run inside guardrails: the store's tone rules, claims restricted to facts from the order record, and nothing invented about the customer.

Whether to discount. This is where the margin lives. Blanket winback flows give ten percent to everyone, including the customer who was reordering anyway — that is not retention, that is a donation. The engine holds incentives back by default: a customer inside their predicted window gets a well-timed reminder at full price, and the discount is reserved for the ones who have slipped past their window, where the evidence says the sale is genuinely at risk. Who gets an offer becomes a per-person decision with a reason attached.

Send, then measure. Messages go out at the computed moment, and the results are measured the only way that means anything: repeat-purchase rate against a holdout group that did not get the engine. We do not ship AI we cannot evaluate, and this one is unusually easy to evaluate, because the outcome is an order or it is not.

Why this beats the subscription push

The industry's standard answer to replenishment is subscribe-and-save, and it works — for the minority of customers willing to commit. Most people decline the subscription: they do not want another recurring charge, they are not sure of their own usage yet, or they simply resist the lock-in.

Timed re-engagement serves exactly the customers subscriptions cannot reach. No commitment is asked for; the store just behaves as if it remembers them. In practice they sit together — subscribers where customers opt in, the engine for everyone else — and the everyone-else group is nearly always the larger one.

Where it generalizes

Anything consumed at a personal rate: supplements and protein powder, pet food, coffee, skincare, contact lenses, razor blades, water filters, printer ink, vitamins for the kids. The mechanism only needs two things — a product that depletes, and order history showing individual cadence. If your customers buy the same thing more than twice a year, the clock exists whether or not anyone is reading it.

The economics are the point. Selling to an existing customer costs no advertising: no auction, no rising acquisition prices, no attribution argument. The engine works entirely on customers already won, which is why it tends to be the highest-return automation a store of any size can add.

Where it is the wrong tool

Three honest cases. One-off and durable purchases have no depletion clock — nobody reorders a sofa on a cadence, and a fixed anniversary email does that job fine. Stores without repeat history yet — young stores, or catalogs where nobody has bought twice — have nothing for the model to learn from; run a simple flow until the data exists. And if your subscription conversion is genuinely high, the unsubscribed remainder may be too small to justify a build — do the arithmetic before commissioning anything, including from us.

What a build looks like

The shape is consistent: connect to the store platform and email provider you already run, backfill the model from existing order history, and go live with the drafting guardrails and the holdout measurement from day one. It sits in our focused-tool band — a bounded build against systems you already have, not a platform migration. Nothing about your storefront changes; the engine works the records behind it.

If you run a store where people buy the same thing repeatedly, Devin will map this against your setup in a few minutes, or book a call — bring last quarter's repeat-purchase rate, and we will talk about what the clock in your order history is worth.

  • ecommerce
  • ai
  • automation
  • retention
  • email
  • workflow-agent

Tell us what you are trying to build.

A thirty-minute call is usually enough to tell you whether we are the right firm for it. If we are not, we will say so and point you somewhere better.

Or reach us directly: [email protected] · +1 321 335 0265