16.4 million customer profiles. RFM scoring. Churn prediction. Segment-driven campaigns with four discount tiers. And £8.3M in identified margin protection — all running on infrastructure the client already owned.
The client was paying £45,000 per year for Dinmo, a customer data platform that sat between their data warehouse and their marketing tools. It did what CDPs do: identity resolution, audience segmentation, and sync to downstream channels. It worked. It was also entirely replaceable.
The client already had Snowflake as their data warehouse, with CDC replication from their production Aurora MySQL databases and dbt Cloud for transformations. Every piece of customer data — orders, browsing behavior, email interactions, support tickets — already lived in Snowflake. The CDP vendor was essentially querying the client's own data, applying some segmentation logic, and pushing audiences to marketing platforms.
We built the replacement in four weeks. It processes 16.4 million customer profiles, runs RFM scoring and churn prediction models, generates four-tier discount segments, and syncs audiences directly to the email and SMS platforms. The annual cost: approximately £2,800 in incremental Snowflake compute. Net saving: £42,200 per year. But the real value was not the cost saving — it was what we could build once we owned the logic.
Before replacing anything, we mapped exactly what Dinmo was doing. This is critical. You cannot replace a system you don't fully understand.
The CDP performed four functions:
1. Identity resolution. Matching anonymous browsing sessions to known customer profiles using email, device fingerprint, and cookie data. Dinmo maintained its own identity graph and resolved approximately 68% of sessions to known customers.
2. Audience segmentation. Marketing could build segments using a visual interface: "customers who purchased in the last 90 days AND have lifetime value over £200 AND haven't opened an email in 30 days." These segments were defined in the CDP's UI and refreshed daily.
3. Channel sync. Segments were pushed to the email platform (for campaign targeting), the SMS platform, and Meta Ads (for custom audiences and lookalikes). Sync ran every 6 hours.
4. Reporting. Basic dashboards showing segment sizes, overlap, and movement over time.
None of this required a separate platform. Every one of these functions can be implemented as SQL transformations in Snowflake, with dbt managing the logic and a lightweight sync layer pushing audiences to downstream tools.
The replacement CDP runs entirely within Snowflake, orchestrated by dbt Cloud, with a Python sync layer for channel distribution.
Data foundation: CDC replication from three Aurora MySQL databases feeds into Snowflake in near-real-time via Fivetran. Every order, every customer record, every product interaction, every email event lands in raw tables within 5 minutes. dbt Cloud runs transformations on a schedule, building the dimensional model that the CDP logic sits on top of.
Identity resolution: We built a deterministic identity graph using email address as the primary key, with device fingerprint and cookie ID as secondary identifiers. The resolution logic runs as a dbt model that processes the raw events table, matches anonymous sessions to known profiles, and maintains a canonical customer ID. Resolution rate: 71% — actually higher than the vendor's 68%, because we could incorporate data sources the vendor didn't have access to (specifically, support ticket email addresses and marketplace seller communications).
RFM scoring: Every customer profile is scored on three dimensions: Recency (days since last purchase), Frequency (number of orders in the last 12 months), and Monetary (total spend in the last 12 months). Each dimension is scored 1-5 using quintile bucketing. The combined RFM score categorizes customers into segments: Champions (555, 554, 544), Loyal (543, 534, 453), At Risk (244, 245, 144), Lost (111, 112, 121), and several intermediate groups.
This is not novel. RFM scoring is decades old. But when you combine it with the other signals in the data warehouse — browsing recency, email engagement, discount usage history, category affinity — the segmentation becomes far more actionable than anything the vendor's UI could produce.
Curious what your margin opportunity looks like?
Free Tool
How much margin are you leaving on the table?
Answer 6 questions. Get a personalised margin estimate in under 2 minutes.
Take the Free Margin AuditThe vendor CDP did not offer churn prediction. This alone justified the build.
We trained a gradient-boosted classifier on 24 months of historical customer data, using the following features: days since last purchase, days since last site visit, days since last email open, order frequency trend (accelerating or decelerating), average order value trend, discount dependency ratio (what percentage of orders used a discount code), and category concentration (how many distinct categories the customer shops across).
The model predicts the probability that a customer will not purchase in the next 90 days. Customers above the 70% churn probability threshold are flagged for intervention. The model runs weekly as a Snowflake task, scoring all 16.4 million profiles in approximately 12 minutes.
The churn prediction feeds directly into the CRM lifecycle flows. A customer flagged as high churn risk enters a specific win-back sequence with escalating incentives. The first touch is a personalized product recommendation email (no discount). If no engagement after 7 days, a light discount. After 14 days, a standard discount. This graduated approach avoids giving away margin to customers who would have returned without a discount — which brings us to the most valuable feature we built.
This is the feature that no vendor CDP offered and that transformed the economics of the client's marketing programme.
By analysing historical purchase data, we identified approximately 90,000 customers who consistently purchased at full price. These customers had never or rarely used discount codes, showed no price sensitivity in their browsing patterns (they didn't wait for sales), and had high RFM scores.
The insight: these customers would buy anyway. Sending them a 20% discount code was literally giving away margin for no incremental revenue.
We built a four-tier discount framework driven by the CDP segments:
Tier 1 — Suppress: Full-price customers. No discount codes, no sale urgency messaging. These customers receive product-focused content, new arrival alerts, and personalized recommendations. Approximately 90,000 profiles.
Tier 2 — Light (5-10% off): Customers who show some price sensitivity but have healthy engagement. The discount is a nudge, not a crutch. Approximately 340,000 profiles.
Tier 3 — Standard (15-20% off): The default tier. Price-sensitive customers who need a reason to buy now. The majority of the active customer base.
Tier 4 — Deep (25%+ off): High churn risk customers where the alternative is losing them entirely. Deep discounts are last-resort retention tools, not marketing strategy.
The margin protection calculation: 90,000 suppressed customers with an average order value of £92 and an average of 3.2 orders per year, with a suppressed discount average of 18%. That is £8.3M in annual revenue that would have been discounted unnecessarily. Even accounting for the margin impact (not all of that is profit), the margin protection runs into seven figures.
This analysis was impossible with the vendor CDP because it required combining transaction history, discount usage patterns, browsing behavior, and email engagement data in ways that the vendor's segmentation UI could not express.
The CDP logic is only valuable if the segments reach the marketing platforms reliably. We built a Python sync layer that runs on a schedule:
Email platform sync: Every 4 hours, the sync layer queries the segment tables in Snowflake and pushes updated audience lists to the email platform via API. Each customer carries their RFM segment, churn risk score, discount tier, and top three category affinities. The email platform uses these attributes for dynamic content blocks and send-time optimization.
SMS platform sync: Daily sync. SMS is expensive, so the audience is more tightly controlled. Only customers with a churn risk above 50% and a lifetime value above £150 receive SMS. This keeps SMS costs low while targeting the highest-value at-risk customers.
Meta Ads sync: Weekly sync of customer segments for custom audiences and lookalike generation. Champions and Loyal segments feed lookalike models for acquisition campaigns. Lost segments are suppressed from paid media to avoid wasting ad spend on customers who have already churned.
The sync layer is approximately 800 lines of Python. It handles rate limiting, retry logic, error reporting, and delta detection (only syncing customers whose segment has changed since the last run). It runs on a single Snowflake warehouse credit, costing approximately £2 per run.
We are not suggesting that everyone should ditch their CDP vendor. There are specific conditions that made this build viable and sensible:
1. You already have a data warehouse with your customer data in it. If your data is scattered across 15 SaaS tools and you don't have a warehouse, a vendor CDP is doing the hard work of data consolidation. That is worth paying for.
2. You have (or can hire) SQL-fluent marketing analysts. The in-house CDP's "UI" is dbt models and SQL queries. If your marketing team cannot write SQL and has no interest in learning, the vendor's visual segment builder has genuine value.
3. You need capabilities the vendor doesn't offer. Churn prediction, discount suppression, custom scoring models — if your segmentation needs go beyond "bought X in the last Y days," the vendor is a constraint, not an enabler.
4. The vendor cost is disproportionate to the value. £45K per year for a tool that queries your own data and pushes audiences to three channels is hard to justify when the alternative is £2,800 in compute costs. But if your CDP is doing genuine identity resolution across anonymous traffic at scale, the value equation may be different.
5. You have the engineering bandwidth to build and maintain it. The initial build took four weeks. Ongoing maintenance is approximately 2-3 hours per week: monitoring sync jobs, updating segment definitions as marketing strategy evolves, and retraining the churn model quarterly.
If three or more of these conditions apply, building makes sense. If fewer than three apply, the vendor is probably the right choice — for now.
The in-house CDP was one of 23 initiatives in the Marketing Acquisition workstream, which delivered £1.87M in annualized value. The CDP itself contributed through three channels: the direct vendor cost saving (£42.2K), the margin protection from discount suppression (seven-figure annual impact), and the improved targeting that lifted email and SMS conversion rates by 12% and 8% respectively.
But perhaps the most important outcome was strategic: the client now owns their customer intelligence. The segmentation logic, the churn models, the discount framework — all of it lives in their data warehouse, versioned in dbt, and fully under their control. No vendor lock-in. No annual price increases. No feature requests that go into a product backlog and emerge 18 months later.
When you build the thing that knows your customers best, you should own it. Our customer data platform practice helps businesses make that transition.
Book a free margin audit. We'll assess your current CDP spend, your data warehouse maturity, and tell you honestly whether building or buying is the right move for your business.
We go into businesses and make them permanently more profitable. Every initiative is EBITDA-tracked.