New License Manager

Laravel PHP Licenser & Updates Manager - REST API, webhooks, customer portal

SH SMS Notifier

Plugin
Automatically send SMS notifications for email-triggered events in Botble CMS.
$25.00 $32.00

Version

4.1.2

Botble Version

>= 7.0.0

License

MIT

Smart SMS Notifier Plugin for Botble CMS

🎯 Overview

The Smart SMS Notifier plugin automatically sends SMS notifications for all email-triggered events in Botble CMS. It provides a robust gateway system, country-based routing, and a dynamic template engine.

🔧 Features

  • Automatic Email-to-SMS: Automatically detect when an email is sent using Botble's EmailHandler and send a corresponding SMS.
  • Multi-Gateway Support: Built-in support for Twilio, Nexmo (Vonage), Fast2SMS, and a flexible Custom API gateway.
  • Country-based Routing: Route SMS through different gateways based on the recipient's phone number prefix (e.g., +880, +91).
  • Dynamic Templates: Edit SMS templates directly from the admin panel with support for variables like {{customer_name}}, {{order_id}}, etc.
  • SMS Logs: Track every SMS sent, including status and gateway responses.
  • Queue Support: Offload SMS sending to Laravel queues for better performance.

📖 How to Use

1. Initial Setup

  1. Navigate to Smart SMS Notifier > Settings.
  2. Enable the plugin using the Enable Smart SMS Notifier toggle.
  3. (Optional) Enable Use Queue to offload SMS sending to background jobs for better performance.
  4. Set your Default Gateway from the dropdown menu.

2. Configuring Gateways

  1. From the Settings page, click the Edit button next to your preferred gateway (e.g., Twilio, Nexmo).
  2. Enter your API credentials (API Key, Secret, etc.) as provided by your SMS service.
  3. Use the Test SMS card at the bottom of the page to verify your credentials by sending a message to your own number.

3. Custom Gateway Integration

If your provider is not built-in, you can add it dynamically:

  1. In Settings, locate the Custom Gateways List field.
  2. Enter the name(s) of your custom gateways, separated by commas (e.g., MyLocalProvider, SecondProvider).
  3. After saving, these will appear in the gateway list where you can configure their endpoints, HTTP methods, and payload mapping using {phone} and {message} placeholders.

4. SMS Templates

  1. Go to Smart SMS Notifier > SMS Templates.
  2. Here you can customize the content for various events (e.g., Order Placed, Customer Welcome).
  3. Use variables like {{customer_name}}, {{order_id}}, and {{site_title}} to personalize messages.
  4. You can enable or disable specific templates as needed.

5. Country-based Routing

  1. Navigate to Smart SMS Notifier > Country Routing.
  2. Add rules to route SMS through specific gateways based on the recipient's phone prefix.
  3. For example, route all +880 numbers through a local gateway while using Twilio for the rest of the world.

6. Monitoring Logs

  1. Visit Smart SMS Notifier > SMS Logs to see a history of all sent messages.
  2. Click the Eye Icon on any log entry to view full delivery details, including the raw response from the SMS gateway for advanced debugging.

🔌 Developer Integration (v3.0.x)

Smart SMS Notifier is designed for easy integration with other Botble plugins.

1. Create a Template

Add a .stpl (SMS Template) file in your plugin's resources: platform/plugins/your-plugin/resources/sms-templates/ticket_created.stpl

Example Content:

Hi {{customer_name}}, your ticket #{{ticket_id}} has been created.

2. Dispatch SMS from Code

Inject or use the SmsHandler facade in your support helpers or controllers:

use Platform\Plugins\SmartSmsNotifier\Facades\SmsHandler;

SmsHandler::setModule('your-plugin')
    ->setVariableValues([
        'customer_name' => $user->name,
        'ticket_id' => $ticket->id,
    ])
    ->sendUsingTemplate('ticket_created', $phone);

The system will automatically log the attempt as "Pending", then update with the gateway response.

[!TIP] Want to add a new SMS provider via code? Check out our Gateway Development Guide.

⚙️ Gateway Setup

Built-in Gateways

  • Twilio: Requires Account SID, Auth Token, and a verified From Number.
  • BulkSMSBD: Requires Member ID, Username, Password, and Sender ID.
  • Nexmo/Vonage: Requires API Key, Secret, and From Number.

Custom API Gateway

If your provider is not listed, use the Custom API gateway:

  1. Endpoint: Your provider's API URL.
  2. Method: GET or POST.
  3. Payload: Define the JSON payload or query parameters.
  4. Keyword Mapping: Use {phone} and {message} as placeholders in your request.

📊 SMS Logs & Details

  • Every SMS is logged in Smart SMS Notifier > SMS Logs.
  • Click the Eye Icon (View Details) in the table to see the full JSON response from the gateway for debugging.

Built with ❤️ for Botble CMS.

Leave a comment

Your email address will not be published. Required fields are marked *

Kindly log in to share your feedback on this plugin.