😫 The Pain Point
Customers input phones in every format imaginable: +84-90..., 090 123..., (090) 123....
SMS marketing tools reject anything that isn’t a clean 10-digit number 0901234567.
🚀 Agentic Solution
The Normalizer: Strips junk characters and unifies formatting.
Key Features:
- Prefix Logic: Changes
+84to0. - Validation: Checks if the number has the correct length (10 digits).
⚔️ Phase 1: Commander (Quick Fix)
For a quick cleanup.
Prompt:
“I have a ‘Phone’ column. Remove all non-digit characters. If it starts with ‘84’, replace with ‘0’. Check if length is 10. If not, mark as Invalid.”
Result: Cleaned numbers.
🏗️ Phase 2: Architect (Permanent Tool)
For Telesales.
Engineering Prompt:
**Role:** Python Data Cleaner
**Task:** Create a "Phone Number Standardizer".
**Requirements:**
1. **GUI:** Input Excel -> Select Column -> Process.
2. **Logic:**
* `re.sub(r'\D', '', phone)` (Remove non-digits).
* Normalize prefix (Country code rules).
* Validate length.
* Output statistics (Valid vs Invalid count).
3. **Deliverables:** `phone_fixer.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Regex
\D: This simple regex means “Anything that is NOT a Digit”. Replacing it with empty string removes spaces, dashes, parentheses instantly.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Select File -> Fix.