Article summary
Version cleanup rules for Mexico +52 lists from different periods and accept WhatsApp Registration through stratified exceptions rather than silent repair.
When a Mexico +52 list spans several collection years, one cleanup script may not fit every source. The right response is not silent digit editing. Record rule versions, quarantine exceptions and compare Registration outcomes by provenance.
Register cleanup rules like code
| Field | Purpose |
|---|---|
| rule_id | Unique rule name |
| valid_from | Applicable period |
| source | Rule authority |
| transform | Exact conversion |
| reviewer | Approver |
Stratify by acquisition year and source
Run small samples for legacy CRM, store forms and the current website. If exceptions cluster in one source, inspect its historical entry rules instead of reformatting every +52 phone.
Make the original phone immutable
Retain phone_raw and create transformations only in phone_candidate. Log every deletion, insertion and country-code change in transform_log. Unsupported rows enter review.
Registration is not a format repair engine
TXT contains one rule-approved phone per line, and Excel returns phone plus registration observation. A missing result cannot reveal how the phone should be edited and must not trigger automatic variant attempts.
Count four outcome classes
format_exception, registered, not_observed and task_unknown have different owners. Calculate outcomes by rule version to distinguish legacy-data defects from task behaviour.
Deduplicate while preserving one-to-many return
One normalized phone may connect to several CRM rows. Deduplicate execution and reconnect through a crosswalk. Conflicts do not merge customers or permissions automatically.
A country code does not create a market label
+52 describes the numbering plan, not residence, language or citizenship. Foreign phones in a Mexico business list keep their own rule; market comes from an order or self-report.
Make rule upgrades reversible
Compare old and new rules on a small batch for exceptions, returns and conflicts before full approval. If the result degrades, restore candidate generation without affecting phone_raw.
Deliver the rule card with Excel
The handoff includes input counts, rule version, exception reasons, task time and allowed use. Future +52 work can then reproduce history instead of guessing it.
