Magento 2 SMS Notification allows admin to send notification text messages to customers to keep them updated about their activities in Magento 2 store.
Table of Content
- Extension Installation Guide
- Twilio Registration
- Msg91 Registration
- Textlocal Registration
- Configuration
- API Settings
- Order Placement Notification Settings
- Order Invoice Notification Settings
- Order Cancellation Notification Settings
- Order Shipment Notification Settings
- Credit Memo Notification Settings
- Contact Inquiry Notification Settings
- New Customer Registration Notification Settings
- SMS Notification in Frontend
- SMS Logs
- For Magento Marketplace Customers
- Find the Composer name and version of the extension in the extension’s composer.json file.
- Login to your SSH and run:
- composer require meetanshi/magento2-sms-notification
- composer require twilio/sdk
- Enter your authentication keys. Your public key is your username; your private key is your password.
- Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
- To verify that the extension installed properly, run the command:
- php bin/magento module:status Meetanshi_Sms
-
- By default, the extension is probably disabled.
- Enable the extension and clear static view files:
-
- php bin/magento module:enable Meetanshi_Sms --clear-static-content
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
- php bin/magento module:status Meetanshi_Sms
- For Meetanshi Customers
- Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
- Login to your SSH and run below commands step by step:
-
- composer require twilio/sdk
-
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
Note: Don’t forget to install Twilio library even if you are not using Twilio SMS gateway for our extension.
- Twilio Registration
If you are going to use Twilio as an SMS gateway to send SMS notifications, you need to register with the Twilio to get Account SID, Auth Token and Twilio Phone Number.
- First of all, Sign Up for the Twilio account. Add the details and click to get started.
- After the Email verification, enter your mobile number and click to “Verify”.
- Once you click “Verify”, you will get an OTP on the added mobile number. Enter the OTP and verify the mobile number. Now move to Settings > General where you can see API details both for live and testing. Copy the Account SID and Auth Token to use them in Magento backend configuration for Twilio account.
- Now, click three dots from the left sidebar, go to Programmable SMS and click Build under the Learn and Build option. From here, you can get Twilio phone number to use for sending the SMSs. Click on the “Get a number” button.
- You will get a number to choose. Click “Choose This Number”.
- Once you click the button, you will get a Twilio phone number. Copy this number and set it in the Magento backend configuration for Twilio account.
- Msg91 Registration
The extension allows configuration of the Msg91 SMS gateway to send SMS notifications. If you choose to use Msg91 SMS gateway integration, follow the steps below to get sender ID and API key.
- Visit https://control.msg91.com/signup/. Enter the details and click to sign up.
- You will get and code or a magic link in the Email to verify the Email address.
- You will be asked to enter the mobile number for verification.
- Enter the OTP to verify the mobile number and you will be registered successfully. Login with the credentials.
- Under the settings, you can find the Sender ID which you need to copy and paste in the Magento configuration.
- Now move to API, where you can find the API key for the Magento configuration.
- You can find the Message type under the Send SMS tab. Select the SMS type in Msg91 configuration in Magento as per your requirement.
Note: If you are an Indian user of our Magento 2 SMS Notification extension with Msg91 API, don’t forget to follow DLT registration process and get your DLT templates approved for each SMS. Once you get the DLT template ID, enter the same in the respective field in Magento 2 extension configuration.
- Textlocal Registration
The extension allows the configuration of the Textlocal SMS gateway to send SMS notifications. If you choose to use Textlocal SMS gateway integration, follow the steps below to get sender ID and API key.
- Create a Textlocal account from https://www.textlocal.in/signup/
- After the registration, you will get a verification link in your registered Email ID, clicking the link will land you to add additional information page. Here, add the account details and submit to activate your Textlocal account.
- Navigate to Settings > API Keys and create new key to use. Copy the created API Key and paste it in Magento 2 extension configuration.
- Now move to Settings > All Settings and click on “Sender Names” to get your sender name.
- You can copy your Textlocal sender name from here and paste it in Magento 2 extension configuration.
- Textlocal requires to create message template to send SMS notification. Go to Send > Templates & Drafts and click to create and request new SMS template.
- You have to create new message template for each SMS notification enabled in Magento 2 SMS notification extension configuration. Enter title, select category and sender name. Set message text same as SMS text in Magento 2 extension configuration notification settings. You have to create new SMS template in Textlocal for every enabled SMS notification in Magento 2. For example, if you have enabled “Order Placement Notification” from Magento 2 backend, create a message template for the same in Textlocal having exactly the same SMS text.
- For the dynamic values in text message input, click “Insert Restricted Template Items”. Click “Insert an Input Box” and it will open a popup to create new placeholder for the dynamic value. Add placeholder text name and set maximum length for the dynamic value. Insert it into the SMS text and while sending the message, this placeholder will match the variable in Magento 2 notification text and replace it with the real value.
- Once message templates have been created and submitted for each SMS notification, it will take approximately a week to be approved by the Textlocal. You can send SMS notifications only after the message templates approved by the Textlocal.
- Configuration
To configure the extension, login to Magento backend, move to Stores > Configuration > SMS Notification where you can find various settings to configure the extension.
- SMS Notification: Enable or disable the SMS Notification extension.
- Admin Mobile Number: Enter mobile number of admin to receive the SMS notifications.
- API Settings
To allow compatibility of the extension with any SMS gateway, it’s API settings has to configured after receiving the essential details like Sender ID, API key and URL.
- API Provider: Select one of the SMS gateway API providers from Msg91, Twilio, Textlocal.
- Sender ID: Enter sender ID you got while registration with SMS gateway.
- API Key: Enter the API Key.
- API URL: Enter the API URL.
- Message Type: Select the message type to be sent to the customers.
For Other SMS API:
If you are going to use custom SMS API other than Msg91, Twilio or Textlocal, you have to add your CURL URL as below:
Format:
https://yoursmsapi.com/sms/submitsms.jsp?user=yourusername&senderid=yoursenderid&key=yoursmskey&mobile={mobile}&message={msg}
Sample CURL URL:
https://foxxsms.com/sms/submitsms.jsp?user=METANSHI&senderid=FOXGLV&accusage=6&key=587e05afbcXX&mobile={mobile}&message={msg}
- Order Placement Notification Settings
The module allows to send notification to both admin and customers when they place the order. To configure its settings, follow these steps as shown below:
- Order Placement Notification: Enable order placement notification to customers.
- SMS Text for Customers: Add order placement notification text to send to customers.
- Order Placement Template ID: Enter the DLT template ID for order placement SMS if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Placement Notification to Admin: Enable order placement notification to admin.
- SMS Text for Admin: Add order placement notification text to send to admin.
- Order Placement Template ID for Admin: Enter the DLT template ID for order placement SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Invoice Notification Settings
You can send notification to customers as well as admin to let them know that the Order Invoice is generated once the following settings are configured:
- Order Invoice Notification: Enable order invoice notification to customers.
- SMS Text for Customers: Add order invoice notification text to send to customers.
- Order Invoice Template ID: Enter the DLT template ID for order invoice SMS if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Invoice Notification to Admin: Enable order invoice notification to admin.
- SMS Text For Admin: Add order invoice notification text to send to admin.
- Order Invoice Template ID for Admin: Enter the DLT template ID for order invoice SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Cancellation Notification Settings
To let customers know that their order has been cancelled, an SMS notification is sent. Additionally, admin is also notified of a cancelled order. Follow these steps for the same:
- Order Cancellation Notification: Enable order cancelation notification to customers.
- SMS Text for Customers: Add order cancellation notification text to send to customers.
- Order Cancellation Template ID: Enter the DLT template ID for order cancellation SMS if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Cancellation Notification to Admin: Enable order cancellation notification to admin.
- SMS Text For Admin: Add order cancellation notification text to send to admin.
- Order Cancellation Template ID for Admin: Enter the DLT template ID for order cancellation SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Shipment Notification Settings
Customers get notification when their shipment is off for delivery. Admin is also notified for the same. This feature will be enabled when the following settings are configured:
- Order Shipment Notification: Enable order shipment notification to customers.
- SMS Text for Customers: Add order shipment notification text to send to customers.
- Order Shipment Template ID: Enter the DLT template ID for order shipment SMS if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Shipment Notification to Admin: Enable order shipment notification text to send to admin.
- SMS Text For Admin: Add order shipment notification text to send to admin.
- Order Shipment Template ID for Admin: Enter the DLT template ID for order shipment SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Credit Memo Notification Settings
To confirm with customers that their refund request has been accepted, an SMS will be sent to customers. Similarly, admin will be sent an SMS notification when a credit memo is generated. Configure the following settings to enable this feature of the module.
- Order Credit Memo Notification: Enable refund request notification approval to customers.
- SMS Text for Customers: Add refund request notification approval text to send to customers.
- Order Credit Memo Template ID: Enter the DLT template ID for order credit memo SMS if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Order Credit Memo Notification to Admin: Enable credit memo generation notification to admin.
- SMS Text for Admin: Add credit memo generation notification text to send to admin.
- Order Credit Memo Template ID for Admin: Enter the DLT template ID for order credit memo SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- Contact Inquiry Notification Settings
Admin is notified whenever there is a contact inquiry. To enable this feature, configure following settings:
- Contact Inquiry Notification: Enable contact inquiry notification to admin.
- SMS Text for Admin: Add contact inquiry notification text to send to admin.
- Contact Inquiry Template ID for Admin: Enter the DLT template ID for contact inquiry SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
- New Customer Registration Notification Settings
The admin is notified when a new customer registration takes place. To enable this notification, following settings are to configured:
- New Customer Registration Notification: Enable new customer registration notification to admin.
- SMS Text for Admin: Add new customer registration notification text to send to admin.
- New Customer Registration Template ID for Admin: Enter the DLT template ID for new customer registration SMS for admin if you are an Indian customer and using Msg91 as an API provider for the SMS notification.
Note: If you are an Indian user of our Magento 2 SMS Notification extension with Msg91 API, don’t forget to follow DLT registration process and get your DLT templates approved for each SMS above. Once you get the DLT template ID for each, enter the same here in the respective.
- New Registration Notification to Admin
When a customer registers a new account, admin is notified as shown below:
- New Order Placement Notification to Customer
A notification of acknowledgement of the order placed is sent to customers as shown here:
- New Order Placement Notification to Admin
Admin is notified when a new order is placed in the store as shown below:
- Order Invoice Generation Notification to Customers
When an Order Invoice is generated, a notification as shown below is sent to customers.
- Order Invoice Generation Notification to Admin
When an Order Invoice is generated, a notification is sent to Admin as shown here:
- Order Shipment Notification to Customer
Customers get notified at the time of order shipment via SMS as shown below:
- Order Shipment Notification to Admin
Once the order gets shipped and shipment is generated, admin gets notified by an SMS as shown here.
- Refund Request Notification to Customer
A customer gets notified of refund request approval as shown below:
- Credit Memo Generation Notification to Admin
Credit memo generation notification sent to admin is shown below:
- New Contact Inquiry Notification to Admin
Whenever a customer inquires through submitting contact form, admin is notified as below:
- SMS Logs
The extension saves the log of all the sent and received messages. Go to Meetanshi SMS Notification > SMS Logs where you can find all the SMS logs listed with the details like ID, mobile number, provider, response, message and date. The admin can delete the SMS logs using the mass action. Also, the admin can export the logs in an XML or CSV file.