Home/Case Studies/Farmière WhatsApp Affiliate System

Farmière WhatsApp Affiliate Management System

An automated affiliate management platform built with n8n workflows and Supabase—handling creator onboarding, multi-platform sales attribution, commission calculations, and WhatsApp notifications across Shopify, Shopee, and TikTok Shop.

Farmière Affiliate System Case Study
Industry

F&B E-commerce

Client

FoodieLoopie

Duration

10 weeks

Status

Production

FoodieLoopie Team

Gavin Tan

Management, FoodieLoopie Team

"We went from manually tracking affiliates in Google Sheets to automatically managing creators across three platforms. The system handles onboarding, sales attribution, commissions, and notifications without any manual intervention."

System Highlights

Core Workflows9

Plus 12 sub-workflows

Platform Integrations6

Shopify, Shopee, TikTok Shop, Zoko, OpenAI, Looker

Commission Tiers6

10% to 20% progression

Project Duration10 weeks

From concept to production

Technologies Used

  • n8n Automation
  • Supabase PostgreSQL
  • OpenAI GPT-4
  • Zoko WhatsApp API
  • Shopify/Shopee/TikTok
  • Looker Studio

Executive Summary

FoodieLoopie needed to automate their affiliate program to support creators across multiple e-commerce platforms (Shopify, Shopee, and TikTok Shop). They were managing affiliates manually using Google Sheets, which limited their ability to scale operations.

We designed and built an automated platform using n8n workflows and Supabase PostgreSQL that handles the complete affiliate lifecycle—from creator onboarding and sales attribution to commission calculations and real-time WhatsApp notifications.

The Challenge

  • Manual Spreadsheet Management: Managing affiliate data, commission calculations, and tier progressions in Google Sheets
  • Multi-Platform Complexity: Tracking sales across three different e-commerce platforms (Shopify, Shopee, TikTok Shop) manually
  • Commission Calculations: Complex 6-tier commission structure with multiple bonus types requiring manual tracking
  • Limited Communication: No systematic way to notify creators about sales, tier upgrades, or bonus achievements

The Solution

We implemented a comprehensive affiliate management system with microservices-like architecture using n8n workflows, Supabase PostgreSQL, and intelligent webhook-based orchestration across all three e-commerce platforms.

System Architecture

Microservices-like architecture using n8n workflows as discrete business functions, with Supabase PostgreSQL as the data layer and intelligent webhook-based orchestration across Shopify, Shopee, and TikTok Shop.

Key Components:

  • • Multi-platform webhook receivers (Shopify, Shopee, TikTok)
  • • 9 core n8n workflows + 12 sub-workflows
  • • Supabase PostgreSQL with 15 tables + 7 views
  • • Real-time WhatsApp notifications via Zoko API
System Architecture

Advanced Affiliate Management

Unlike traditional affiliate systems, our platform features sophisticated bonus structures and gamification mechanics that drive creator performance beyond basic commission tracking.

Monthly Consistency Bonus

Creators who maintain sales activity throughout the month earn additional rewards. The system tracks daily/weekly sales patterns and automatically awards bonuses to affiliates who demonstrate consistent performance rather than sporadic bursts.

Consistency Criteria:

  • • Minimum 3 sales per week for 4 consecutive weeks = RM 100 bonus
  • • Daily sales for 7 consecutive days = RM 50 weekly bonus
  • • "7-in-7 Challenge": 7 sales in 7 days = RM 70 instant bonus
  • • Automated tracking with real-time WhatsApp progress updates
Monthly Consistency Bonus WhatsApp Notification

AI-Powered Creator Engagement

The system leverages GPT-4 with custom context engines to deliver hyper-personalized messaging, motivation, and guidance tailored to each creator's performance profile and activity patterns.

Milestone Nudge Engine

AI analyzes each creator's current performance and proximity to tier upgrades or bonus thresholds, then generates personalized encouragement messages. Example: "You're just RM 150 away from Tier 4! That's ~3 more sales to unlock 15% commission + auto-payouts 🚀"

Milestone Features:

  • • Real-time gap analysis: "2 more sales for your 7-in-7 bonus!"
  • • Countdown timers for time-sensitive challenges
  • • Personalized product recommendations to close the gap
  • • Success probability scoring based on historical patterns
  • • Celebratory messages with visual progress bars upon achievement
Milestone Nudge WhatsApp Message

Creator Performance Dashboard

A comprehensive Looker Studio dashboard provides creators with real-time visibility into earnings, tier progress, referral networks, and performance trends across all platforms.

Creator Performance Dashboard - Real-time tracking of income, tier progress, referrals, and sales analytics

Real-Time Income Tracking

Live commission calculations, pending payouts, override earnings, and bonus breakdowns. Creators see exactly how much they've earned across all platforms with drill-down by product, date range, and commission type.

Tier Progression Visualization

Visual progress bars showing how close creators are to their next tier upgrade. Displays required sales thresholds, current performance, and projected timeline to unlock higher commission rates.

Referral Network Tree

Interactive visualization of direct referrals (L2) with their performance metrics, tier status, and contribution to override earnings. Helps L1 creators identify top performers and those needing support.

Performance Analytics

Trend charts showing daily/weekly/monthly sales patterns, conversion rates, average order values, and top-selling products. Enables data-driven decisions on what to promote and when.

System Capabilities

The platform handles complete affiliate lifecycle automation across multiple e-commerce platforms:

Automated Workflows

9

Core workflows with 12 sub-workflows handling signup, attribution, commissions, and notifications

Multi-Platform Support

3

E-commerce platforms integrated: Shopify, Shopee, and TikTok Shop

Commission Tiers

6

Performance-based tiers from 10% to 20% with automated progression

Real-Time Notifications

8

WhatsApp message types including welcome, tier upgrades, bonuses, and payouts

Technical Features

  • Security Measures: Input sanitization, parameterized queries, webhook signature validation across all workflows
  • Multi-Language Support: Handles Chinese, Arabic, Cyrillic, Vietnamese, Greek, Hindi, Thai, and Japanese characters
  • Phone Format Handling: Normalizes 10+ Malaysian number format variations (+60, 60, 0 prefixes with dashes and spaces)
  • Database Architecture: 15 core tables and 7 views in Supabase PostgreSQL with real-time updates

Key Takeaways

This project demonstrates how workflow automation can transform affiliate marketing operations. Using n8n's visual workflow builder combined with Supabase PostgreSQL and AI integrations, we built a complete affiliate management system handling 9 core workflows across 3 e-commerce platforms.

The platform automates everything from creator signup and promo code generation to sales attribution, commission calculations, tier progression, and real-time WhatsApp notifications—eliminating manual spreadsheet management and enabling scalable affiliate operations.

Ready to scale your affiliate program?

Let's discuss how our automation solutions can transform your affiliate marketing operations with enterprise-grade reliability and measurable ROI.