---
title: Intelligence
description: Intelligence - MailPirate Docs
---

# Intelligence

Intelligence turns store history into scores and recommendations the rest of MailPirate can use: who is valuable, what to recommend, when to wait, when to send, and when a product is due again.

Open **Intelligence** in the sidebar for the current store. Use the submenu (Overview, Predictive, RFM, Affinity, Send time, Replenishment, Bandits) or the tabs on each page. RFM and predictive for a buyer refresh soon after they place (or cancel/refund) an order; store-wide affinities, send-time, and replenishment still rebuild on the overnight schedule. Empty tables usually mean “not enough data yet,” not a broken page.

## What you will find

| Section | What it answers |
|---------|-----------------|
| Overview | Counts and shortcuts into each signal |
| Predictive | Who might churn, predicted LTV, next-order timing |
| RFM | Who bought recently, often, and for how much |
| Affinity | What to recommend next |
| Send time | Which hour historically earns opens/clicks |
| Replenishment | When someone may need a product again |
| Bandits | Which wait-after-trigger or creative variant performs best |

## Predictive

Predictive heuristics estimate lifecycle risk and value from order gaps, spend, and RFM blend - not a black-box credit score. Inputs stay visible on the profile.

### What gets estimated

- **Historic CLV** - value already observed
- **Predicted LTV** - forward-looking estimate based on patterns so far
- **Churn risk** - band (`low` / `medium` / `high`) plus a numeric **churn risk %**
- **Next order** - typical gap and expected timing
- Supporting stats such as order count, average order value, overdue ratio, and linked RFM segment

### Where you see it

- Intelligence → Predictive (risk bands, LTV totals, due-soon and high-value/high-risk counts, people table with risk %)
- Profile **Predictive** card
- Marketing API profile payload under `predictive` when present

### How to use it

- Segment and flow leaves: `predictive.churn_risk`, `predictive.churn_risk_pct_gte`, `predictive.predicted_ltv_gte` / `_lte`, `predictive.historic_clv_gte`, `predictive.next_order_within_days`
- Presets in the condition builder: high churn risk, high LTV + high risk, next order due soon
- Prioritize win-back energy on valuable buyers who are slipping
- Do not over-email low-value, high-risk contacts just because automation is easy

Weak history stays quiet. MailPirate prefers fewer confident signals over invented noise.

## RFM

RFM scores each buyer on:

- **R**ecency - how recently they ordered
- **F**requency - how often they order
- **M**onetary - how much they spend

Scores are relative to other buyers in the same store (typically ranked into bands such as 1-5) over roughly a year of paid orders. A buyer’s metrics refresh when their order status changes to paid/cancelled/refunded; overnight recompute still rebuilds everyone from full order history.

### Named segments

Common RFM groups include:

- Champions
- Loyal
- Potential loyalists
- New customers
- Promising
- Need attention
- About to sleep
- At risk
- Cannot lose
- Hibernating
- Lost

### Where you see it

- Intelligence → RFM chips and customer table (R/F/M, days since order, orders, spend)
- Profile RFM card
- Segment and flow rules (`rfm.segment`, score thresholds)
- Autopilot **Smart re-engage** (prefers at-risk and cannot-lose when scores exist)

### How to use it

- Campaigns to Champions with new arrivals or VIP treatment
- Win-back flows for At risk / Cannot lose
- Flow trigger **RFM segment changed** when a recompute (post-order or overnight) moves someone between groups (optional from/to filters)
- Suppress aggressive promos to Lost/Hibernating until you have a re-permission strategy

## Product affinity

Affinity finds products that are often bought or clicked together so recommendations feel earned.

### Reading the table

Each row is typically an anchor product → recommended product, with:

- Score
- Confidence
- Sample size
- Attributed outcomes when available

Higher scores with enough examples are safer. **Weak pairs are skipped** when emails go out - better no recommendation than a random one.

### Where it shows up

- Intelligence affinity table
- Profile affinity suggestions
- Flow **Recommend** steps
- Email merge tag `{{ recommendations_html }}` when recommendations were attached to the enrollment

## Smart wait (timing experiments)

Smart wait answers: “After this trigger, how long should we wait before the next email?”

### How learning works

1. A Smart wait step offers several delay options (arms) you configure on the flow step (or the workspace default set).
2. People are assigned waits while the system explores and exploits.
3. If someone clicks and later purchases inside the attribution window, that wait scores a win.
4. If the window closes with no purchase, that wait scores a miss.
5. Better arms get used more often; weaker arms still get a small share so learning does not freeze on an early winner.

Until there is enough data, the step uses your **fallback** delay.

### Creative A/B auto-optimize

Campaigns (and flow email A/B) can use **fixed split** or **auto-optimize**. Auto-optimize treats subject/content A and B as bandit arms and shifts traffic toward winners as attributed purchases settle, while a small exploration floor keeps learning. The Bandits page and experiment report show how arms are performing.

### Not the same as replenishment

| Smart wait / creative bandit | Replenishment |
|------------------------------|---------------|
| Wait after a trigger, or which subject/content wins | Predict repurchase due date for a SKU |
| Optimized with bandit arms | Median gaps + overrides |
| Flow **Smart wait** / campaign A/B | Flow trigger **Product due for repurchase** |

## Send time optimization

Optional per-store setting: hold marketing/journey sends until the hour (and day of week when enough data exists) that historically gets more opens and clicks (store timezone).

### Toggle behavior

- **Off** - send as soon as the journey reaches Email (subject to other caps)
- **On** - delay until the suggested local slot

You can enable this when creating a store (**Optimize marketing send time**) or later on Intelligence / store settings. Campaigns can separately opt into the same stagger without replacing a deliberate launch-at schedule.

### How hours are scored

Recompute scores each hour and each day-of-week × hour from engagement (opens, with clicks weighted more heavily). Profiles with enough personal history can receive a personal preferred slot; others use the store suggestion.

Use this for lifecycle mail. Deliberate campaign launch times still win unless you turn on the campaign opt-in.

## Replenishment

Replenishment predicts when someone may need to buy again from past repurchase gaps.

### Learning

For each SKU, MailPirate looks at how many days usually pass between the same customer’s repeat purchases, then uses a robust summary (median) when there are enough samples.

### Overrides (priority order)

1. **SKU override** - you know the pack size (wins always)
2. **Learned cadence** - when sample size is large enough
3. **Category override** - e.g. supplements = 30 days
4. **Store default** - fallback (often around 45 days if you have not set your own)

On Intelligence you can review learned cadences and maintain overrides.

### Per-customer expected dates

Recompute also writes each buyer’s upcoming SKU dues on the profile (`properties.replenishment`: SKU, last purchase, effective days, expected next date, source). Use `replenishment.due_within_days` in segments and flows, or open the profile card.

### Using it in a flow

1. Create a flow with trigger **Product due for repurchase**.
2. Publish and activate it.
3. Daily jobs enroll subscribed profiles whose last purchase of a SKU falls inside the due window (with cooldown rules so you do not nag endlessly).

Pair with a Recommend or curated email that restocks the same need - not a random blast.

## Bandits, RFM, and Autopilot together

A healthy setup often looks like:

1. Sync orders so RFM and affinity have fuel.
2. Arm Autopilot welcome + post-purchase.
3. Let smart waits learn on post-purchase follow-ups.
4. Use RFM-based re-engage for at-risk value.
5. Add replenishment flows for consumable SKUs.

## When Intelligence looks empty

- Shop not connected or orders not syncing → [Connectors](/docs/connectors)
- Brand-new store with few orders → wait for history; heuristics need samples
- Scores not ready yet → place a syncable order or wait for the overnight store refresh
- Affinity weak → need overlapping purchases/clicks across products

## Related

- [Profiles & consent](/docs/profiles)
- [Flows](/docs/flows)
- [Autopilot](/docs/autopilot)
- [Segments](/docs/segments)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://mailpirate.com/#organization","name":"MailPirate","legalName":"Jure Rožman s.p.","url":"https://mailpirate.com/","logo":{"@type":"ImageObject","@id":"https://mailpirate.com/#logo","url":"https://mailpirate.com/img/logo/mailpirate-logo.svg","contentUrl":"https://mailpirate.com/img/logo/mailpirate-logo.svg"},"image":{"@id":"https://mailpirate.com/#logo"},"description":"MailPirate is email marketing built for ecommerce stores: campaigns, automated journeys, living audiences, store sync, and deliverability control without managing mail servers yourself.","slogan":"Email that sells more for your store.","foundingDate":"2019-01-29","founder":{"@id":"https://mailpirate.com/#person-jure-rozman"},"address":{"@type":"PostalAddress","streetAddress":"Šinkov Turn 24A","addressLocality":"Vodice","postalCode":"1217","addressCountry":"SI"},"email":"info@mailpirate.com","telephone":"+38640504630","vatID":"SI72369213","identifier":[{"@type":"PropertyValue","propertyID":"AJPES registration number","value":"6881475000"}],"contactPoint":{"@type":"ContactPoint","contactType":"customer support","email":"info@mailpirate.com","telephone":"+38640504630","availableLanguage":["English"]},"knowsAbout":[{"@type":"Thing","name":"Email marketing"},{"@type":"Thing","name":"Ecommerce automation"},{"@type":"Thing","name":"Email deliverability"}],"areaServed":["SI","EU","GB","US"],"sameAs":["https://www.linkedin.com/company/mailpirate"]},{"@type":"Person","@id":"https://mailpirate.com/#person-jure-rozman","name":"Jure Rožman","jobTitle":"Founder","worksFor":{"@id":"https://mailpirate.com/#organization"},"description":"Founder of MailPirate. Builds ecommerce email tooling focused on fair billing, automation, and deliverability.","url":"https://mailpirate.com/about-us","sameAs":["https://www.linkedin.com/in/jurerozman/"]},{"@type":"WebSite","@id":"https://mailpirate.com/#website","url":"https://mailpirate.com/","name":"MailPirate","inLanguage":"en","publisher":{"@id":"https://mailpirate.com/#organization"},"about":{"@id":"https://mailpirate.com/#software"}},{"@type":"SoftwareApplication","@id":"https://mailpirate.com/#software","name":"MailPirate","applicationCategory":"BusinessApplication","applicationSubCategory":"Email marketing","operatingSystem":"Web","url":"https://mailpirate.com/","description":"Ecommerce email platform for Shopify and WooCommerce stores: campaigns, flows, segments, intelligence, and dedicated sending with deliverability controls.","publisher":{"@id":"https://mailpirate.com/#organization"},"featureList":["Campaigns and reporting","Automated flows (welcome, cart recovery, win-back)","Segments and lists","Store connectors (Shopify, WooCommerce)","Intelligence (RFM, affinity, send-time, replenishment)","Deliverability scorecard and dedicated sending","Marketing API and embed forms"]}]}
```
