Phone Number Normalization
All numbers must be strictly normalized into E.164 format to ensure compatibility with the Meta WhatsApp API.
Core Library​
We utilize google-libphonenumber for deterministic parsing.
Country Detection Logic (Priority Order)​
- Explicit
+Prefix: If the number starts with+, trust the explicit country code (e.g.,+44 7700 900077). - Known Dialing Prefixes: Look for international exit codes like
00or011mapping to known country prefixes. - Default Upload Country: The API accepts an optional
defaultCountryISO-2 code (e.g.,INfor India) during upload. Numbers missing a+are parsed against this locale. - Majority-Country Heuristic: If no default is provided, the chunk processor analyzes the first 100 explicitly prefixed numbers. If 90% are
+91, it infersINfor ambiguous numbers. - Ambiguous Warning: If inference fails, the number is marked as a Warning/Error depending on strictness settings.