Case Study
Happy V Custom Shopify app
Happy V is a US direct-to-consumer women's health brand selling clinically-backed probiotics and supplements through Shopify, with a significant subscription business and a multi-channel marketing operation spanning Meta, Google, TikTok and affiliate networks.
The Project
Happy V's marketing attribution and customer-lifecycle automation ran on an ageing shared web application backed by SQL Server, alongside a set of disconnected console utilities that were executed manually. The setup was hard to operate, offered no visibility into failures, and could not scale with the brand's growth.
We designed and delivered a dedicated Shopify embedded application that consolidates every integration and back-office workflow into a single, observable system — and migrated the entire operation onto it with no interruption to live traffic.
The challenge
- Marketing attribution data (500,000+ records) lived on a legacy SQL Server shared with unrelated systems.
- Conversion events sent to the customer data platform frequently lost click identifiers, degrading the accuracy of ad-platform reporting and retargeting.
- Business processes such as promotional tagging and practitioner discount generation were run by hand through console applications.
- There was no logging, no retry mechanism and no way to tell whether an incoming webhook had actually been processed.
What we built
A Shopify embedded app (.NET 8 API + React Router 7 admin interface) organised into self-contained modules, each with its own operational UI:
- Marketing attribution — a public capture endpoint records click identifiers (Meta, Google, TikTok) at checkout and enriches every conversion sent to Twilio Segment, with a searchable viewer over the full dataset.
- Conversion pipeline — Shopify and Recharge webhooks generate enriched Order Completed events, with strict one-conversion-per-order guarantees.
- Sampling programme — Shopify Flow notifies the app when a customer receives a product sample; the app records it and pushes profile properties and custom events to Klaviyo to drive follow-up flows.
- Promotional buyer tagging — scans orders placed during automatic promotions and applies a dedicated customer tag per campaign.
- Practitioner discounts — reads a Google Sheet, generates unique discount codes per practitioner and creates them in Shopify in bulk, with a paginated preview before execution.
- Affiliate integration — Refersion and ShareASale conversion reconciliation, including automatic cancellation on refunds and fraud-signal screening of affiliate sign-ups.
- Operations tooling — a shared application log, an endpoint-usage tracker showing which integrations are genuinely in use, and a webhook inspector with manual replay.
Engineering highlights
- Zero-downtime data migration — 550,000+ attribution records moved from SQL Server to PostgreSQL, followed by a delta migration at cut-over so no record captured during the transition was lost.
- Durable webhook processing — incoming webhooks are persisted immediately and processed by a background worker with bounded concurrency, exponential-backoff retries and idempotency keys. Nothing is lost across restarts or deployments, and traffic bursts cannot overwhelm the service.
- Attribution merging — click identifiers are consolidated across a customer's checkouts so a conversion is never reported with an empty field when the value was captured on an earlier visit, materially improving ad-platform match rates.
- Performance engineering — profiling of the live system identified a data-access layer that materialised entire tables in memory. Rewriting the critical paths to server-side SQL reduced the application's memory footprint from 1.7 GB to 175 MB and eliminated request timeouts under production load.
- Progressive cut-over — every integration endpoint mirrors its legacy path, so migrating each webhook provider was a single host change, executed and verified one integration at a time.
Outcome
Happy V now runs its entire marketing-attribution and lifecycle automation stack on a single maintainable platform. Manual console procedures became self-service admin screens, integration failures are visible and replayable rather than silent, and the legacy SQL Server dependency was retired. Attribution coverage improved measurably through click-identifier merging and the elimination of lost webhook events.
Technologies
.NET 8
C#
PostgreSQL
React
Shopify Admin GraphQL API- Twilio Segment
- Klaviyo