This plugin normalize phone numbers to E164 international format eg. +41446681800. By default try normalize already recognized numbers (start with + etc), then applied you own defined rules for aby country from plugin settings. Others numbers are skipped.
- Use last version
- Unzip files to plugins/MauticPhoneNumberNormalizerBundle
- Clear cache (app/cache/prod/)
- Go to /s/plugins/reload
- Go to plugins and setup Phone Number Normalizer
- Select phone fields to normalize
- Set regex rules for location (If you want) - optional 4.Enable Normalize before contact phone field change If you want normalize phone number on each contact's phone number change
- Enable Normalize before SMS send to contact If you want normalize number before SMS send. This option doesn't overwrite numbers, just
You can set rules in plugins settings. The first input is regexp for start with of phone numbers /^yourregexpfromsettings/. Second input is country code (US, SK, GB, FR, NL etc.)
This definition set all phone numbers start with to Slovak phone numbers
- 901, 902, 903, 904, 905, 906, 907, 908, 909
- 911, 912, 913, 914, 915, 916, 917, 918, 919
- 0901, 0902, 0903, 0904, 0905, 0906, 0907, 0908, 0909
- 0911, 0912, 0913, 0914, 0915, 0916, 0917, 0918, 0919
Another example of regexp:
This definition set all phone numbers start with to Netherlands numbers:
- 06, 6, 316
You can set any definition for any countries. Your regexp can test on https://regex101.com/
php app/console mautic:phone:number:normalize
Process all contacts with phone numbers and normalize it.
php app/console mautic:phone:number:normalize --dry-run
Process all contacts with phone number and display table before/after normalization
Optional parameters:
- --batch-limit (default 100)
- Plugins from Mautic Extendee Family https://mtcextendee.com/plugins
- Mautic themes https://mtcextendee.com/themes
Icons made by DinosoftLabs