Back to Case Study

Architecture & API Integration

Status Draft v1.0
Owner Product, in partnership with Engineering
Series
Ad Copilot Portfolio Doc

Written as the artifact a PM brings into an engineering design review — enough system detail for a real tradeoff conversation, not a substitute for engineering’s own design doc. Open questions for engineering are flagged rather than dictated.

1. System overview

┌─────────────────────┐ │ Ad Platforms │ │ (Meta Ads, Google │ │ Ads APIs) │ └──────────┬───────────┘ │ OAuth + REST ▼ ┌─────────────────────┐ │ Ingestion Service │ │ (hourly pull, │ │ rate-limit aware) │ └──────────┬───────────┘ ▼ ┌─────────────────────┐ │ Performance Data │ │ Store (time-series) │ └──────────┬───────────┘ ▼ ┌─────────────────────┐ │ Drift Detection & │ │ Recommendation Svc │ └──────────┬───────────┘ ┌─────────────────┼─────────────────┐ ▼ ▼ ┌─────────────────────┐ ┌─────────────────────┐ │ Creative Generation │ │ Confidence Scoring │ │ Service (LLM calls) │◄──────────────┤ & Lane Assignment │ └──────────┬───────────┘ └──────────┬───────────┘ ▼ ▼ ┌─────────────────────┐ ┌─────────────────────┐ │ Brand-Safety Filter │──────────────►│ Review Queue │ └──────────────────────┘ └──────────┬───────────┘ ▼ ┌─────────────────────┐ │ Action Executor │ │ (writes to APIs) │ └──────────┬───────────┘ ▼ ┌─────────────────────┐ │ Audit Log & Rollback│ └──────────────────────┘

2. Core components

ComponentResponsibility
Ingestion ServiceHourly pulls from Meta/Google; OAuth refresh, rate-limit backoff, pagination
Performance Data StoreTime-series spend/conversions/ROAS/CPA/CPC/CTR for drift windows
Drift Detection & RecommendationCompares live metrics to targets; emits recommendation objects
Creative Generation ServiceTiered LLM calls, caching, per-account cap enforcement
Confidence Scoring & Lane AssignmentComposite confidence → Auto-apply / Suggest / Escalate
Brand-Safety FilterDeterministic check before anything enters the review queue
Review Queue (UI + API)Approve/edit/reject surface; system-of-record for human feedback
Action ExecutorOnly component with write access to live campaigns
Audit Log & RollbackImmutable log of every AI action; 5-minute Auto-apply rollback (NFR-2)

3. Key API integrations

3.1 Meta Marketing API

3.2 Google Ads API

3.3 LLM Provider API

4. Data model notes

5. Security & compliance

6. Open questions for engineering