$ 140.65
In-App Purchases| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2325 |
| Technical Name |
eis_sms_apis |
| License | OPL-1 |
| Website | https://expertpk.com |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2325 |
| Technical Name |
eis_sms_apis |
| License | OPL-1 |
| Website | https://expertpk.com |
| Versions | 16.0 17.0 18.0 19.0 |
Dynamic SMS Gateway & Multi-Provider Templates
Send SMS from Odoo using your preferred provider. Configure REST API gateways (GET/POST, JSON/Form, headers/params), route by country prefix and priority, track responses, and optionally fall back to Odoo IAP.
Common challenges
- High SMS costs when relying on one service or region-limited pricing.
- Hard-coded provider integrations that break when APIs change.
- No routing rules (by prefix/priority) and limited visibility into send results.
How this module fixes them
- Configure multiple gateways and route by country prefixes and priority.
- Use dynamic headers/parameters and JSON body templates with placeholders.
- Track provider responses, keep status history, and process delivery callbacks.
Key Features
Built for admins who want flexible, provider-agnostic SMS sending in Odoo.
Smart Routing
Pick gateways by country prefixes and priority (sequence), with optional IAP fallback.
REST API Config Builder
GET/POST, JSON or form-data, plus headers and parameters with placeholders like {phone} and {message}.
Auth Options
API key, token, Basic Auth, or custom credentials stored per gateway.
Multi-Recipient Support
Send to multiple numbers in one request when the provider supports it (separator configurable).
Status Tracking
Store response text/HTTP code, extract provider message id, and review sent/failed history per gateway.
Provider Templates
Includes 37 pre-configured gateways you can duplicate and customize for your provider.
How It Works
Configure once, then send SMS from anywhere Odoo uses SMS.
Step 1 - Configure gateways
Define endpoint URL, request method (GET/POST), request type (JSON/Form), headers, and parameters. Set country prefixes and priority to control routing.
Step 2 - Send SMS from Odoo
Odoo chooses the best gateway by prefix/priority (or uses the default gateway). Optionally fall back to Odoo IAP when no match exists.
Step 3 - Track status and delivery callbacks
Store status rows (success/pending/error), extract message id via regex, and process delivery callbacks to update trackers.
Configuration
Gateway configuration is available from the Technical menus: Settings → Technical → SMS / Phone → SMS Gateways. Global behavior is controlled from: Settings → General Settings → SMS.
- Use IAP (
sms.use_iap) — Always use Odoo IAP SMS and ignore custom gateways. - Default Gateway (
sms.sms_gateway_id) — Used when no gateway prefix matches the destination number. - IAP Fallback (
sms.iap_fallback) — If enabled and no gateway is found, fall back to IAP instead of failing.
FAQ
Does this replace Odoo SMS (IAP)?
It can. You can force IAP (Use IAP = on), use gateways (Use IAP = off), and optionally enable IAP fallback.
How does Odoo choose the gateway?
Active gateways are matched by country prefix; the lowest sequence wins. If no match exists, the default gateway is used (if set).
Can I send to multiple recipients?
Yes, per gateway. Enable \"Supports Multiple Recipients\" and set the recipient separator to match your provider.
Do you provide templates?
Yes — the module ships with 37 gateway templates (duplicate and customize credentials, sender id, headers, and parameters).
Can I track delivery reports?
If your provider supports callbacks, enable \"Delivery Callback Enabled\" and share the generated callback URL to update message status.
Who can configure gateways?
Gateway configuration is intended for administrators with Technical access (system users).
Support
Dynamic SMS Gateway (Multi-Provider) for Odoo
Technical module name: eis_sms_apis
This module extends Odoo’s standard SMS feature by adding dynamic, configurable SMS gateways (REST APIs) with:
- Multiple gateways with routing by country prefix and priority
- GET/POST support (JSON or form data)
- Configurable headers/parameters with placeholders
- Optional status tracking and delivery callbacks
- Optional fallback to Odoo’s built-in SMS service (IAP)
1. Overview
Odoo can send SMS using its IAP service. This module adds the ability to send SMS through your own SMS provider(s) by configuring gateway records inside Odoo.
When an SMS is sent, the module can:
- Choose the best gateway based on the destination number’s country prefix
- Use a default gateway when no prefix matches
- Optionally fall back to IAP when no gateway is found
- Store response/status information per SMS for troubleshooting and reporting
2. Key Benefits
- Reduce costs by using local or preferred SMS providers.
- Avoid “hard-coded integrations”: gateways are configured from the UI.
- Route by region/prefix and define priority with a simple sequence number.
- Track the HTTP response and provider identifiers (message id) per SMS.
- Support delivery report callbacks (provider → Odoo) with configurable payload mapping.
3. Installation
- Install the module eis_sms_apis from the Apps menu.
- Ensure Odoo’s base SMS feature is available (this module depends on sms).
After installation, you will have a new technical menu entry for configuring gateways and additional settings in General Settings.
4. Initial Setup
Recommended first-time setup:
- Activate Developer Mode (for Technical menus), if required in your Odoo database.
- Open Settings → Technical → SMS / Phone → SMS Gateways.
- Duplicate one of the included gateway templates (the module provides 37 templates) and edit it with your provider’s credentials.
- Set State to Active and ensure the gateway is not archived (Active = True).
- Open Settings → General Settings → SMS and configure the global behavior:
- Disable Use IAP to use gateways.
- Set a Default Gateway.
- Optionally enable IAP Fallback.
5. Configuration Reference (ALL options)
This section lists every relevant configuration option delivered by this module.
5.1 Global Settings (General Settings)
Menu path:
- Settings → General Settings → SMS
Settings (stored as system parameters):
Use IAP (sms.use_iap) * Default: False * Effect:
- When enabled, Odoo uses IAP for all SMS and ignores custom gateways.
Default Gateway (sms.sms_gateway_id) * Default: empty * Effect:
- Used when no country prefix matches the destination number.
IAP Fallback (sms.iap_fallback) * Default: False * Effect:
- When enabled and no gateway is found for a recipient, Odoo falls back to IAP (instead of failing).
- This setting only applies when Use IAP is disabled.
Advanced (system parameter, no UI field):
sms.default_success_200 * Default: False * Effect:
- If enabled, a gateway response with HTTP 200/201/202 can be treated as Success in some “unclear” cases.
5.2 SMS Gateway Records
Menu path:
- Settings → Technical → SMS / Phone → SMS Gateways
Model: sms.gateway
Core fields:
- Gateway Name (name) — Display name for the gateway.
- Priority (sequence) — Lower number = higher priority.
- Active (active) — Archive/unarchive the gateway.
- State (state) — New, Active, or Disabled (used in routing).
API Settings (page API Settings):
- Service Doc Link (gateway_documentation_link) — Provider documentation URL.
- Base URL (base_url) — Endpoint URL (placeholders are supported).
- Country Prefixes (country_prefixes) — Comma-separated prefixes (example: +1,+92,0091).
- HTTP Method (method) — GET or POST.
- Request Type (request_type) — For POST: Form Data or JSON.
- Supports Multiple Recipients (supports_multiple_recipients)
- Recipient Separator (multi_recipient_separator) — Used when sending multiple numbers in one request.
- Message ID Regex (message_id_regex) — Extract provider message id from response text (enables callback matching when UUID is not returned).
- Success HTTP Codes (success_http_codes) — Comma-separated list (default includes 200/201/202).
- Success Substring (success_substring) — If present in response body, treat as success.
- Track Status (create_status) — Store status rows for each SMS.
Authentication (page Authentication):
- Authentication Type (auth_type): None / API Key / Token / Basic / Custom
- Credentials (depending on auth type): * API Key (api_key) * Token (token) * Username (username) * Password (password)
Parameters (page Parameters):
Model: sms.gateway.parameter
- Key (key) — parameter name (e.g. to / text).
- Value (value) — can include placeholders.
- Parameter Type (param_type) — controls how Odoo fills values (number, multi-number, message, auth, other).
Headers (page Headers):
Model: sms.gateway.header
- Key (key) — header name (e.g. Authorization).
- Value (value) — can include placeholders (example: Bearer {token}).
JSON Body (page JSON Body, visible when Request Type = JSON):
- JSON Body Template (body_template)
- Supports placeholders such as {phone}, {phones}, {message}, {api_key}, {token}, {username}, {password}
- Also supports typed tokens inside JSON values: * __phone__, __phones_list__, __message__, __api_key__, __token__, __username__, __password__
Status (page Status, visible when Track Status is enabled):
- Success Key (success_key) — optional legacy marker string.
- Error Key (error_key) — optional legacy marker string.
- SMS Statuses (sms_status_ids) — status rows linked to this gateway.
Request Preview (page Request Preview):
- Request Preview (request_preview) — computed preview of the request.
Delivery Callbacks (page Delivery Callbacks):
- Delivery Callback Enabled (delivery_callback_enabled)
- Callback URL (delivery_callback_url) — generated using your base URL + token.
- Callback Token (delivery_callback_token)
- Callback payload keys: * UUID Param (delivery_callback_uuid_param) — default uuid * Message ID Param (delivery_callback_message_id_param) — default message_id * Status Param (delivery_callback_status_param) — default status * Error Code Param (delivery_callback_error_code_param) * Error Message Param (delivery_callback_error_message_param)
- Status mapping (comma-separated values): * Success Values (delivery_callback_status_success) * Pending Values (delivery_callback_status_pending) * Error Values (delivery_callback_status_error) * Canceled Values (delivery_callback_status_canceled)
- Failure code mapping (model sms.gateway.callback.failure.map): * Provider Code (provider_code) * Failure Type (failure_type) — mapped to Odoo’s SMS failure types
6. Daily Workflow (step-by-step)
6.1 Configure or duplicate a gateway template
- Go to Settings → Technical → SMS / Phone → SMS Gateways.
- Open a template gateway (State will typically be New).
- Duplicate the gateway (recommended) so updates/templates don’t override your credentials.
- Configure: * Base URL * Authentication (token/api key/basic) * Parameters / Headers / JSON body * Country Prefixes (optional but recommended)
- Set State to Active.
6.2 Configure global routing behavior
- Go to Settings → General Settings → SMS.
- Disable Use IAP to route via gateways.
- Set a Default Gateway (recommended).
- Optionally enable IAP Fallback.
- Save.
6.3 Send an SMS from Odoo
Send SMS using Odoo’s standard features (provided by the sms module), for example from a Contact or any document that offers SMS.
At send time, routing works as follows:
- If Use IAP is enabled → IAP is used.
- Otherwise, Odoo selects the first Active gateway whose Country Prefixes match the phone number (lowest sequence wins).
- If no match exists: * Use Default Gateway if set, otherwise the first active gateway by sequence.
- If no gateway exists and IAP Fallback is enabled → IAP is used.
6.4 Monitor results per gateway
- Open the gateway record.
- Use the smart buttons: * Total SMS * Sent SMS * Failed SMS
- Review response text/HTTP code and the extracted provider message id (if configured).
7. UI Reference
7.2 Buttons (header buttons, smart buttons)
On the SMS Gateway form:
- Toggle State (header) — cycles state: New → Active → Disabled → Active.
- Archive/Unarchive (button box) — toggles the active field (standard Odoo behavior).
- Docs Link (button box, when a link exists) — opens gateway_documentation_link in a new window/tab.
- Total SMS — opens status rows for this gateway.
- Sent SMS — opens status rows where State = Success.
- Failed SMS — opens status rows where State ∈ (Error, Server Error).
7.3 Forms, notebooks, and info panels
SMS Gateway form notebook pages:
- API Settings
- Authentication
- Parameters
- Headers
- JSON Body (only when POST + JSON)
- Status (only when Track Status is enabled)
- Request Preview
- Delivery Callbacks
8. Automation
8.1 Scheduled actions / cron jobs
This module does not add scheduled actions (cron jobs) by default.
8.2 Delivery callback endpoint
If Delivery Callback Enabled is enabled on a gateway, you can configure your provider to call the generated URL.
Endpoint pattern:
- /eis_sms/callback/<token>
Notes:
- The endpoint accepts GET or POST.
- Payload fields are mapped using the gateway’s Delivery Callback configuration (UUID param, status param, etc.).
- If the provider does not send the Odoo UUID back, configure Message ID Regex so the module can store a provider message id and match callbacks later.
9. Roles & Permissions
- Configuration models (gateways, headers, parameters, status records) are intended for technical administrators.
- Access in this module is granted to the Settings / system group for the gateway configuration models.
10. Troubleshooting
SMS is still sent via IAP * Check Settings → General Settings → SMS → Use IAP (sms.use_iap).
No gateway is selected * Ensure at least one gateway is:
- Active (not archived)
- State = Active
- Verify Country Prefixes formatting (examples: +1,+92).
- Set a Default Gateway.
- If you want IAP as backup, enable IAP Fallback.
HTTP 200 but status shows Pending/Error * Configure Success HTTP Codes / Success Substring / Success Key. * If needed, set system parameter sms.default_success_200 = True.
Provider message id not stored * Configure Message ID Regex to capture the provider identifier from the response body.
Callbacks not updating status * Confirm Delivery Callback Enabled is enabled. * Ensure the provider calls the generated URL and sends the expected keys (status/uuid/message_id). * Use the callback status mapping fields to match provider-specific values.
11. FAQ
- Can I use multiple providers at the same time? Yes. Create multiple gateways and route by prefixes/sequence.
- Can I use one gateway for all countries? Yes. Leave Country Prefixes empty and use it as your default gateway (or set it as Default Gateway).
- Does the module support JSON APIs? Yes. Set method POST + request type JSON and define a JSON body template.
- Is delivery reporting supported? Yes, if your provider supports callbacks. Enable Delivery Callbacks and map the provider payload keys.
12. Changelog
- 19.0.1.0.9 — Odoo 19-compatible release (see module version).
13. Support
For installation assistance, provider setup, or customization, contact your vendor/support team.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module