Skip to content
All projects

Repurchase CRM

Manufacturing · Sales and customer relationships

A CRM that brings customers back at the right time and measures every campaign by its coupon.

Client
Cosmetics manufacturer
Status
In use, in production since July 2026
Technology
Next.js · PostgreSQL · Docker on our own server
CRM kanban pipeline with fictitious customers, each card showing segment, risk, value and days since last purchase
Repurchase CRM39 screens
Screens show fictitious or demo data.

The sales CRM of a manufacturer. It receives the ERP's orders every day, calculates each customer's repurchase cycle and fills the pipeline by itself with whoever is due to buy again. Each salesperson sees their own book, and every campaign is measured by its coupon.

The AI writes the draft. The salesperson talks to the customer.
In use, in production since July 2026
screens

39

screens

database migrations

49

database migrations

integration test suites

8

integration test suites

commits

213

commits

What the system does

01Repurchase cycle calculated for each customer, with an RFM matrix and churn risks
02Kanban pipeline that refills itself every night
03360° customer record, with data masked outside each salesperson's book
04Campaigns measured by coupon, relationship cadences and prepaid orders with approval
05WhatsApp inbox with several numbers, ready for the official account
06Targets, commissions and a course track linked to campaigns

Where AI comes in

01Editable AI skills: how the AI behaves at each point and what it knows by topic
02Summary of the 360° record and a draft WhatsApp message for the salesperson
03Provider and model switched on screen, without touching the code
04If a skill is turned off, the default text comes back: the AI never goes silent

Why custom-built

A CRM that follows the company's process, not the other way around.

Off-the-shelf CRMs cover the basics: contacts, pipeline and email. What brings customers back in this business is something else: each person's buying rhythm, the orders already in the ERP and the coupon that proves the sale. The system was built around that.

  1. 01ERP

    Orders arrive on their own

    Every night the system reads the ERP's orders and merges them into one record per tax ID.

  2. 02Cycle

    Each customer has their own rhythm

    The average gap between each person's purchases becomes the expected date of the next one.

  3. 03Queue

    The pipeline builds itself by risk and value

    Whoever is past their own cycle enters the queue, ordered by what there is to lose.

  4. 04Salesperson

    The AI drafts, the salesperson talks

    The card brings the history and a WhatsApp draft. The person decides and sends.

The coupon used on the invoice confirms the return and restarts the cycle.

A fixed rule against each customer's cycle

Three fictitious customers stop buying. The off-the-shelf rule flags all of them after 90 days of silence. The customer's own cycle flags each one at the right time.

Customer Abuys every 30 days

the fixed rule flags 60 days late

Customer Bbuys every 60 days

the fixed rule flags 30 days late

Customer Cbuys every 120 days

the fixed rule flags 30 days early

  • purchase
  • right time, by the customer's cycle
  • fixed-rule alert, 90 days

An off-the-shelf CRM and this CRM, side by side

  1. Sales data

    Reads the ERP's orders every night

    Off-the-shelf CRM: Manual import or a separate integration

  2. When to reach out

    Each customer's buying cycle

    Off-the-shelf CRM: One rule for everyone

  3. Pipeline

    Fills itself, by risk and value

    Off-the-shelf CRM: The salesperson builds it

  4. Campaign results

    The coupon that made it onto the invoice

    Off-the-shelf CRM: Opens and clicks

  5. House rules

    Channels, prepaid and courses the company's way

    Off-the-shelf CRM: The process adapts to the tool

  6. Data access

    Each salesperson sees their own book; the rest is masked

    Off-the-shelf CRM: Permissions per screen

Compared with typical use of a ready-made CRM, without a custom integration.

The hours

How long it took to build

57h29

billed for the whole CRM, from the first line to daily use in production.

A little over seven eight-hour days, spread across five weeks.

One week for the first version. Then five rounds of changes requested by the sales team, already using the system every day. The lists shrank from 108 to 36 items over the first three.

  1. 16h20

    First version

    Initial build, in one week

  2. 12h23

    Round 1

    108 change items

  3. 7h14

    Round 2

    65 change items

  4. 4h57

    Round 3

    36 change items

  5. 9h17

    Round 4

    Requests from the sales team

  6. 7h19

    Round 5

    Finishing touches before handover

How an hour is counted

  1. 01Each gap between two commits counts for 40 minutes at most. A longer pause is left out.
  2. 02Plus 45 minutes of warm-up, once a day, to get back into the system.
  3. 03A commit that fixes a defect is not billed: our mistakes never become client hours.

Left out of the bill

Meetings with the client's team
21h39
Measurement tool and hour reports
11h43

Hours measured from the repository history between July 17 and August 20, 2026. On this project the rule was leaner than our standard one: no per-session minimum and no 10% buffer.

Base health: active customers, average ticket and retention indicators, with demo data
Operations view: customers due today, at risk, period revenue and highest value at risk
Next caseAceleraMatConRetail network · Tax and BI

Have a system this size you want to get off the ground?