How Youzan’s CPS System Powers Multi‑Platform E‑Commerce: Architecture, Attribution, and Billing Explained
This article provides a comprehensive technical overview of Youzan's Cost‑Per‑Sale (CPS) system, detailing its basic concepts, business models, implementation architecture, attribution mechanisms, billing rules, profit‑sharing process, testing challenges, and future expansion across multiple e‑commerce platforms.
Basic Concept
CPS (Cost‑Per‑Sale) is a performance‑marketing model that charges advertisers only when a sale is generated. It works like a sales commission and is suited for e‑commerce, guide, or navigation sites that need highly targeted traffic to drive conversions. Promotion can be delivered via social posts, live streams, notes on platforms such as Xiaohongshu or Weibo, and other distribution channels.
Overall Business Model
Self‑operated Mode
Users log in to a third‑party channel, bind their accounts, and the channel applies for a Youzan Cloud app (e.g., Kuaishou Sales Assistant). After the shop authorizes the app, the operator configures prohibited products and categories. Items that pass the channel’s risk checks are listed on the channel. Buyers click promotion links, are redirected to the product detail page, and complete the purchase flow.
CPS Mode
Two back‑ends are provided: the Commission Promotion Platform (merchant side) and the Youzan Customer Platform (promoter side). Merchants join the commission promotion, create promotion plans or group‑leader activities, and set commission rates. Promoters log into the Youzan Customer back‑end to create promotion channels/positions and view order data. Third‑party channel apps embed a CPS product‑selection component that only displays items passing channel‑specific audits.
Differences
The two modes differ in commission structure, onboarding requirements, product pools, attribution logic, and rate configuration.
Self‑operated mode charges only the third‑party channel commission (rates vary per channel). CPS mode involves multi‑party commissions: promoter (Youzan Customer), Youzan service fee, and channel service fee.
Self‑operated mode requires the channel to apply for a Youzan Cloud app and bind the shop; CPS mode requires the merchant to join the commission promotion.
Self‑operated product pool contains all shop items that pass basic risk checks. CPS pool includes all items from shops that have joined the commission promotion, with stricter rules.
Both generate promotion links and click records. CPS attributes conversions to the click (last‑click model); self‑operated uses the order environment field fanstype for attribution.
Self‑operated commissions are calculated by category or channel‑wide rates. CPS commissions support richer rules: shop‑level, category‑level, targeted product, targeted base, and group‑leader rates.
Technical Implementation
System Overview
The CPS system consists of five core modules:
Promotion Management – generates channel‑specific promotion links, provides commission‑rate lookup for billing, and configures activity plans.
Click‑Tracking – records user clicks, writes events to Kafka, persists them in HBase, and offers query APIs.
Order Attribution – consumes order messages, matches the latest click, and determines the attribution type (self‑operated or CPS).
Billing & Profit Sharing – uses attribution results to fetch applicable commission rates, calculates product‑level commissions, and triggers settlement.
Order Center – aggregates status changes, provides order search, and pushes notifications to third‑party channels.
Attribution
Attribution evaluates the contribution of each marketing touchpoint within a predefined time window before a conversion. It helps advertisers identify effective channels.
Common Attribution Models
Single‑touch: last‑click (all credit to the final click) and first‑click (all credit to the initial click).
Multi‑touch: linear (equal weight), time‑decay (more weight to recent clicks), data‑driven (algorithmic weighting based on historical data).
Youzan CPS Attribution Model
Youzan CPS adopts the last‑click single‑touch model because live‑stream promotion journeys are short and a single decisive touchpoint is sufficient.
Both self‑operated and CPS modes attribute at the shop level and require the following fields: channel ID, Youzan‑customer ID, attribution type, and result.
Self‑operated: order messages contain a fanstype field; the shop must have authorized the channel app.
CPS: the shop must have a CPS attribute (joined commission promotion or exited less than 15 days ago) and a valid click record.
CPS attribution takes priority over self‑operated attribution.
Click‑Tracking Flow
User clicks a promotion link → system verifies the signature, creates a click record, writes a Kafka message, and redirects to the product page with tracking parameters.
Click persistence service consumes the Kafka message, writes the click to HBase, and exposes a query API. It also consumes fallback tracking messages when Kafka is unavailable.
Attribution service consumes order messages, queries the latest click, applies CPS rules first; if CPS fails, self‑operated rules are used.
Additional CPS attribution modes include self‑purchase saving, atrps‑based attribution, and site‑wide cross‑shop attribution.
Billing and Profit Sharing
Billing Rules
Key elements:
Product commission rate – set via promotion activities.
Priority of promotion activities – the system selects the highest‑priority rate in the order: targeted product > targeted base > group‑leader > generic product > shop category > shop generic.
Commission‑pool dimensions – commissions are split into pools (e.g., product commission pool, group‑leader commission pool) each containing a set of participants.
In CPS, two commission dimensions exist:
Product commission pool – may include Youzan Customer, channel platform, Youzan platform, and fans.
Group‑leader commission pool – includes Youzan platform and the group‑leader (Youzan Customer).
Billing Process
Obtain attribution results to identify participants and attribution type.
Query the applicable commission rate for each product at payment time.
Calculate initial commission per product, aggregate per commission pool, and allocate according to priority; lower‑priority participants may receive zero.
On refund, subtract the refunded amount from the initially allocated commission.
Profit Sharing
After order completion, profit sharing occurs T+15 days; refunds delay the payout.
For the Kuaishou channel, Youzan‑Customer commissions are advanced to T+7 days, while other participants follow the standard T+15 days schedule.
The profit‑sharing flow consists of four stages: (1) order attribution tagging, (2) commission freeze in an intermediate account, (3) refund handling (unfreeze if necessary), and (4) final settlement that transfers commissions to the respective accounts.
Quality Assurance Challenges
Test Focus
The click → attribution → billing → profit‑sharing chain is financially critical; any failure can cause loss. Testing emphasizes attribution and billing as high‑risk points.
Efficiency and Stability Measures
Data‑factory tools automate data preparation, reducing manual effort and speeding up test cycles.
QA automation using TestNG now covers thousands of cases, ensuring core scenarios remain stable. CI pipelines run unit and integration tests before release.
Online monitoring employs robot‑driven scheduling, message backlog alerts, and attribution‑delay alarms to detect issues early, especially during high‑traffic live streams.
Risk mitigation includes real‑time and delayed attribution, offline reconciliation, and BCP accounting that compares transaction, asset, and order data for early loss detection.
Future Work
Since 2019, Youzan has integrated 19 platforms (e.g., Kuaishou, Huya, Momo, Weibo, WeChat Channels) supporting both self‑operated and CPS modes with various promotion types (generic, single‑product, targeted, recruiter). Future plans include exploring additional cooperation models, enhancing reusable testing capabilities, and supporting more complex scenarios and high‑traffic integrations.
Youzan Coder
Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
