# LATAM PQL (Mexico + Brazil)

LATAM runs the **EMEA + APAC model unchanged** — additive `Activity(40) + Fit(30) + Urgency(30) =
0–100`, banded to P0/P1/P2 — burning in before any LATAM-specific threshold tuning.

- **Scope:** LATAM self-serve TiDB Cloud tenants. Active flow: `status='active'`, `kind='external'`,
  `sales_force_region='LATAM'`, `plan NOT IN ('free_trial','new_user','closing')`. New-signup flow:
  previous UTC day, `country_region='LATAM'`, no plan filter.
- **Status:** burn-in — model deliberately not re-cut for the region yet. LATAM volume is much
  smaller than EMEA's, so early P0/P1 counts will be noisy; don't tune on them.
- **Engineering repo:** [`pingcap-inc/pingcap-support/latam_lambda_tasks`](https://github.com/pingcap-inc/pingcap-support/tree/main/latam_lambda_tasks)
  — five Python 3.12 Lambdas in one SAM stack (Dispatcher → Monitor SQS → Worker → Scoring SQS →
  Scoring, plus daily Summary and weekly Metrics to Feishu), same shape as `apac_lambda_tasks`.
  That repo's [`scoring_function.py`](https://github.com/pingcap-inc/pingcap-support/blob/main/latam_lambda_tasks/LATAM-Tenants-Scoring-Task/scoring_function.py)
  is the source of truth for current scoring — check it before this folder.

## Contents

- [`latam-data-source.md`](latam-data-source.md) — DB host/user/tables for `latam_regional_support`, verified schema, and how to connect (password via env var, never committed).
- [`mx-br-signups-analysis.md`](mx-br-signups-analysis.md) — the earlier exploratory funnel, country split, and channel mix that preceded the model.
- `mx-br-signups-since-2025-06.csv` — underlying export (gitignored, not committed).

## Relationship to the rest of the repo

LATAM is the first region to fork the model *without* also forking the plan-vs-build divergence APAC
hit — the pipeline landed as a direct adaptation of `apac_lambda_tasks`. Two things LATAM has that
APAC's live table does not:

- **`track_step`** (0=N/A, 1=email, 2=connected) plus `track_update_time` — the connected-guard
  field. The column exists from day one, but as of 2026-08-26 it is **0% populated** (all 221 rows
  at 0), exactly like APAC's. Nothing writes it yet, so the connected-guard is a no-op here too —
  see [`../universal/writeback-status-by-region.md`](../universal/writeback-status-by-region.md)
  (all three regions; moved out of `latam/` 2026-08-26).
- **`sales_owner_email` on the main tenant row**, rather than APAC's separate
  `apac_sales_owned_tenants` exclusion table.

Shared contract: [`../universal/`](../universal). Reference implementation: [`../emea/`](../emea).
APAC comparison: [`../apac/execution/README.md`](../apac/execution/README.md).
