Takealot Integration — Automation SOP
⚡ THE GOLDEN RULE
TOTAL SALES INVOICES − TOTAL CASHFOCUS REMITTANCES = MONTHLY PURCHASE INVOICE
Daily consolidated invoices under Takealot B2C Customer
Weekly Friday deposits from CASHFOCUS 29830898 to FNB
Monthly PI from TAKEALOT MAIN for all fees deducted
If these don't balance → investigate the discrepancy
Why This Works
- Daily: We invoice Takealot B2C Customer for the FULL gross sales amount (VAT-inclusive)
- Weekly: Takealot pays us LESS — they deduct fees before remitting
- Monthly: Takealot issues a PI for ALL fees deducted = invoices minus what they paid us
GL Impact:
DAILY (Sales Invoice — submitted):
DR 300201 - Debtors (Takealot B2C Customer) [gross sales]
CR 400000 - Cost of Goods [net]
CR 200300 - VAT 15% [VAT]
WEEKLY (Payment Entry — submitted):
DR 300101 - FNB Current Account [remittance]
CR 300201 - Debtors (Takealot B2C Customer) [remittance]
MONTHLY (Purchase Invoice — DRAFT):
DR 700600 - Commission on Sales [success + fulfillment fees]
DR 500200 - Marketing [ad credits]
DR 700900 - Sales & Distribution [storage fees]
DR 700315 - Dues & Subscription [subscription]
DR 200300 - VAT 15% [input VAT]
CR 500100 - Trade Payables (TAKEALOT MAIN) [total fees]
NET: Bank receives Sales - Fees (what Takealot actually pays)
1. Architecture — Three-Tier Automated Model
DAILY (00:01 SAST) WEEKLY (Sat 6am) MONTHLY (3rd of month)
───────────────── ────────────────── ──────────────────────
Takealot API → CASHFOCUS 29830898 → Takealot Financial API →
SUBMITTED Sales Invoice SUBMITTED Payment Entry DRAFT Purchase Invoice
(one per day) (FIFO allocation) (fee breakdown from PDF)
Key Entities
| Entity | Name | Role |
|---|---|---|
| Customer | Takealot B2C Customer | Single B2B customer for all marketplace sales |
| Supplier | TAKEALOT MAIN | Supplier for monthly platform fees |
| Warehouse | Takealot - V | Stock sent to Takealot for fulfillment |
| Vendor ID | 29830898 | Takealot's bank remittance identifier |
| Bank Ref | CASHFOCUS 29830898 | How Takealot payments appear in FNB |
IMPORTANT: SMTLC ≠ Takealot. SMTLC = New Clicks customer (completely separate). Bank rules only match CASHFOCUS 29830898 for Takealot.
2. Daily Sales Import (Automated — Creates & Submits)
- Workflow: "Takealot Daily Sync (00:01 SAST)" — daily at 00:01 SAST
- Function:
takealotDailySyncv2 (Deno backend function) - Fetches previous day's sales from Takealot Marketplace API
- Creates ONE consolidated Sales Invoice per day (all orders as line items)
- Auto-submits the invoice (docstatus=1) immediately
- VAT-inclusive at 15%, source = "Takealot", warehouse = "Takealot - V"
- PO Number:
TA-DAILY-YYYY-MM-DD(used for dedup) - Bundle expansion:
TA4L-andT4L-prefixes → 3 units of base SKU
3. Weekly Payment Reconciliation (Automated)
- Workflow: "Takealot Weekly Reconciliation (Sat 6am)" — every Saturday 06:00 SAST
- Function:
takealotWeeklyReconv2 (Deno backend function) - Takealot remits every Friday — bank narrative:
CASHFOCUS 29830898 - Payment is SHORT of invoice total — Takealot deducts fees before paying
- Function: finds CASHFOCUS JEs → creates Payment Entry (full deposit) → allocates FIFO → submits
- Excess deposit stays as credit on customer account for future invoices
Why Payment < Invoice Total:
Week's Invoices: R100,000 (gross — what we invoiced)
CASHFOCUS received: R75,000 (what Takealot actually paid us)
Shortfall: R25,000 (fees Takealot deducted)
→ This R25,000 appears on the monthly Purchase Invoice from TAKEALOT MAIN
→ Golden Formula: R100,000 - R75,000 = R25,000 (the PI amount)
4. Monthly Fee Reconciliation (Automated)
- Workflow: "Takealot Monthly PI (3rd of month)" — on the 3rd at 08:00 SAST
- Agent downloads fee invoice PDF from Takealot API (
/v2/financial/invoices) - Parses PDF and creates DRAFT Purchase Invoice from TAKEALOT MAIN
- Verifies Golden Formula before creating PI — flags if discrepancy > R100
- Status: DRAFT (needs Tsakane/Chomba approval per posting guardrails)
Fee Breakdown → GL Mapping
| Fee Type | Expense Account | VAT |
|---|---|---|
| Success Fees | 700600 - Commission on Sales - V | 15% |
| Fulfilment Fees | 700600 - Commission on Sales - V | 15% |
| Stock Transfer / Removal | 700600 - Commission on Sales - V | 15% |
| Ad Credit Purchase | 500200 - Digital Marketing & Advertising - V | 15% |
| Storage Fees | 700900 - Sales And Distribution Expenses - V | 15% |
| Subscription Fee | 700315 - Dues And Subscription - V | 15% |
Reconciliation Verification (when PI is created)
Step 1: Sum all daily Sales Invoices for the month
Step 2: Sum all CASHFOCUS Payment Entries for the month
Step 3: Calculate Invoices - CASHFOCUS = Expected PI
Step 4: Compare with actual PI total from Takealot PDF
Step 5: If difference > R100 → FLAG DISCREPANCY (do not create PI)
Step 6: If balanced → create DRAFT PI for approval
5. Returns Processing
- Identify return in daily sync (negative qty or return_status)
- Create Credit Note against original daily Sales Invoice
- Write off damaged stock: Material Issue from "Takealot - V" warehouse
- If sellable: Transfer back to "Finished Goods - V" warehouse
6. Automation Status
| Process | Trigger | Status |
|---|---|---|
| Daily Sales Import + Submit | 00:01 SAST daily | ✅ Automated |
| Weekly Payment Reconciliation | Sat 06:00 SAST | ✅ Automated |
| Monthly Fee PI + Verification | 3rd of month 08:00 SAST | ✅ Automated |
| Bank Feed Classification | Midnight SAST | ✅ Automated |
| Returns Processing | Event-driven | 🔧 Manual |
7. Current Status (26 July 2026)
- July invoices: 10 submitted (July 17-26) totaling R157,532.03
- Payments: 3 Payment Entries totaling R162,307.46
- Credit on account: R4,775.43 (excess deposit)
- June PI: ACC-PINV-2026-00282 (R145,968.17) — DRAFT, needs approval
- July PI: Will auto-generate on August 3 from Takealot API
- June reconciliation: Manual (pre-automation period)