Meta CAPI Offline Conversion Reconciliation Utility
Format, validate, and SHA256-hash offline CRM conversion data to maximize Meta Conversions API (CAPI) Event Match Quality.
Problem it addresses
Develop a pure Python CLI utility (capi_reconciler.py) for formatting Meta CAPI offline events: 1) Normalizes Egyptian (+20) and GCC (+966, +971, +965, etc.) phone numbers to strict E.164 standards, handling missing leading zeroes, 2) Performs lowercase SHA256 hashing on emails, names, and phone numbers, 3) Formats Unix timestamps, 4) Generates a pre-flight validation report showing estimated Event Match Quality.
Who it is for
PRO operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.
What is inside
Key files listed in the README repository architecture:
data/mena_phone_rules.jsonexamples/hashed_meta_ready.csvexamples/raw_crm_sample.csvexamples/unmatched_crm_leads.csvLICENSEREADME.mdreports/reconciliation_summary.jsonsrc/capi_reconciler.pytemplates/offline_event_payload.jsontests/test_reconciler.py
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- Compare outputs with documented examples and review limitations before using them in a decision or client workflow.
Quick Start from the README: python -m unittest discover -s tests · python src/capi_reconciler.py --help
Scope and limitations
- Event Deduplication (event_id): Requires identical event_id and event_name on both browser pixel and server CAPI payloads within 48-hour deduplication window.
- Customer Information Parameters: Hashes PII (email, phone, first/last name) with SHA-256 before transmission to maximize Event Quality Match score.
- Timezone Normalization: Offline CRM delivery events must be converted to UTC Unix timestamps to match Meta ad auction attribution windows.
This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.