Guide · ~7 min
Build an Odoo SMS plugin for bulk sending from CRM
Teams want to send campaigns and alerts from Odoo, not copy numbers into a separate portal. Here’s how to wire a gateway API into CRM and contacts the right way.
Short answer: build a custom Odoo module that wraps your SMS provider’s REST API, exposes send actions on crm.lead and res.partner, logs every message on the record, and surfaces account balance in settings or the systray.
Why not use a generic connector?
Off-the-shelf apps often miss sender ID rules, Unicode billing, delivery callbacks, or the exact CRM workflow your sales team uses. A bespoke plugin matches your gateway contract and keeps compliance fields (opt-out, audit trail) under your control.
Core module components
- Configuration: API key, base URL, default sender ID, company-level toggles.
- Send service: Python client with retries, timeout handling, and structured error messages.
- UI actions: “Send SMS” on partner/lead lists; bulk wizard with preview and character count.
- Message log: model linked to partner/lead with status (queued, sent, failed, delivered).
- Balance & top-up: periodic balance fetch; optional link to provider top-up page.
CRM workflow tips
Templates with merge fields ({{ object.name }}, custom fields) reduce errors. For bulk sends, batch API calls and respect provider rate limits, queue jobs with queue_job or cron for large lists.
Production checklist
- Staging send to test numbers before production keys
- Idempotent webhooks for delivery reports
- Role-based access, not every user should bulk-send
- Cost visibility per campaign in reporting
Need an SMS plugin built?
Share your gateway API docs and Odoo version, we’ll scope the module.