Skip to main content

Automation Roadmap

Automation as a strategic asset. Every automation is either reducing operational cost, improving user experience, or enabling scale. This page maps what runs without human intervention today and what's planned next.

Automation maturity

StageWhat it means
ManualHuman does every step
ScriptedTool exists, human triggers
ScheduledRuns on cron, human reviews output
Event-drivenTriggered by platform events automatically
Self-healingDetects own failures and recovers

Already automated ✅

Order lifecycle

AutomationTriggerWhat happens
Auto-cancel unpaid orders12hr timer on AWAITING_PAYMENTMove to CANCELLED, notify buyer
Auto-mark late shipments2-day timer on READY_TO_SHIPMove to LATE_TO_SHIP, notify ops
Auto-confirm delivered orders24hr timer on DELIVEREDMove to COMPLETED, trigger disbursement
Auto-approve low-value returnsRETURN_REQUESTED + item under IDR 50kSkip seller approval, refund buyer

Payment processing

AutomationTriggerWhat happens
Webhook idempotencyDuplicate webhookReturns original outcome, no double-processing
Amount mismatch detectionXendit webhookMove to PAYMENT_REVIEW, alert ops
Auto-disbursement queueOrder completesfin_disbursement row created with pending status

Communications

AutomationTriggerWhat happens
Order confirmation emailPayment confirmedSend via Resend
KTP status notificationOps decisionEmail user via Resend
Push notification on new chatChat message receivedSend push to recipient
Marketing broadcastCampaign scheduled in opsBulk email + push at trigger time

Background processing

AutomationTriggerWhat happens
OutboxProcessorEvery 15 minutesRetry failed side effects
Webhook retryFailed webhookRetry with exponential backoff
Stale listing detectionDailyFlag listings unsold > 30 days
Seller score recomputationWeeklyUpdate seller_scores based on activity

Anti-fraud

AutomationTriggerWhat happens
Duplicate listing detectionListing creationCompare against existing, flag if duplicate
Suspicious review flaggingReview submissionFlag if buyer-seller transact within 2 days
Rate limitingPer-IP request countBlock if exceeds threshold
KTP OCRKTP submissionExtract data, queue for ops review

In progress 🟡

AutomationStatusBlocker
HMAC shipping quote signingenv var set, signer/verifier pendingImplementation
Returns reverse label generationSpec'd, not builtBuild effort
Cuan AI botDesignedBuild effort
Sentry error trackingLibrary available, not integratedSetup

Planned 🔵

Pre-launch priorities

1. Sentry integration

Why: Indonesian C2C users don't report crashes, they uninstall. Without APM, first prod crash is found by user complaint.

What it enables:

  • Real-time error alerting
  • Crash reproduction
  • Performance monitoring
  • Release tracking

2. Xero sync (real implementation)

Why: Accounting compliance and audit-ready financials.

What it replaces: Current placeholder boolean flag.

3. Reverse Biteship label

Why: Returns flow can't fully automate without auto-generated return labels.

What it enables: Buyer ships back via Biteship aggregation, picks cheapest option, label generated in-app.

Post-launch roadmap

4. Automated dispute resolution suggestions

Why: Reduce ops time per dispute.

What it does: AI analyzes evidence, suggests resolution to ops admin. Admin approves or overrides. Builds training data over time.

5. Smart pricing suggestions

Why: Help sellers set competitive prices.

What it does: Suggest price range based on similar items, brand, condition, recent sales.

6. Listing quality scoring

Why: Surface improvement opportunities to sellers.

What it does: Score listings on photo count/quality, description detail, completeness. Suggest specific improvements.

7. Personalized recommendations (SekenPulse)

Why: Increase buyer return rate and basket size.

What it does: ML-based feed personalization, "you might like" suggestions, abandoned cart recovery.

8. Automated content moderation

Why: Scale moderation without growing ops team linearly.

What it does: AI pre-screens listings for banned content, surfaces high-confidence rejections to ops for batch processing.

9. Seller onboarding sequences

Why: Improve activation rate from current goal of >60% within 7 days.

What it does: Drip email + push sequence based on onboarding progress (KTP submitted, first listing, first sale, etc.)

10. Fraud pattern detection

Why: Catch fraud before it scales.

What it does: Real-time pattern matching on:

  • Same device fingerprint across multiple accounts
  • Accounts that only buy high-resale-value items
  • Buyer + seller sharing IP
  • Velocity anomalies

Where automation creates leverage

Three categories of leverage:

1. Cost reduction

Automate things ops staff currently does manually.

High-leverage targets:

  • Listing moderation (current: manual review of every listing)
  • KTP review (current: manual review post-OCR)
  • Dispute resolution (current: manual case-by-case)

2. User experience improvement

Make the platform feel faster, smarter, and more responsive.

High-leverage targets:

  • Personalized feed (vs. recency-only)
  • Smart search with synonyms
  • Real-time pricing suggestions
  • Abandoned cart recovery

3. Scale enablement

Things that work at 100 users but break at 100,000.

High-leverage targets:

  • Search infrastructure (current: in-memory filter, breaks at 50k listings)
  • Notification batching (current: per-event sends)
  • Analytics aggregation (current: real-time queries)
  • Image storage and CDN

Automation principles

1. Reversible by default

Every automation must have a manual override. Ops can always intervene.

2. Observable

Every automation logs to audit_log with input, output, and decision rationale.

3. Bounded

Every automation has explicit guardrails. Auto-approve refunds capped at IDR 50,000. Auto-cancel only after 12 hours, never sooner.

4. Tested

Every automation has integration tests covering happy path, failure modes, and edge cases.

5. Gradual rollout

New automations start in shadow mode (logs decision but doesn't act), then partial rollout (e.g., 10% of cases), then full rollout.

Where to look in the codebase

What you wantWhere it lives
Cron jobssupabase/functions/cron/
OutboxProcessorinfrastructure/reliability/OutboxProcessor.ts
State machine timersdomain/order/timers/
Auto-approve policydomain/order/policies/LowValueAutoApproval.ts
Fraud detectiondomain/fraud/

Next: Scalability →