Using transactional SMS notifications in Magento 2

Learn to set up transactional SMS notifications and where you can find your reports in Magento 2.

Overview

If you are a Magento 2 merchant, you can send transactional SMS messages to your customers through our API. This type of non-promotional, transactional messaging lets you notify your customers about different transactional events such as:

  • New order confirmations
  • Order updates
  • New shipments
  • Shipment updates
  • New credit memos

We provide templates for each of these transaction types, but you can also re-create these in your own words, and you can use any of the available variables for each transactional SMS notification template.

Enabling transactional SMS notifications does not affect your transactional email notifications. Your customers receive both the regular email notification and the SMS message.

Before you start

Things you need to know before you start:

  • This feature is only available for Magento 2 user that have version 2.3+ and version 4.10.0+ of the Dotdigital extension.  
  • You must have SMS pay-as-you-go enabled to use this feature.

    To learn more about how to enable SMS pay-as-you-go, check out Understand SMS pay-as-you-go and spend limit.

  • You must enable the Dotdigital SMS module in Magento 2:
    composer require dotmailer/dotmailer-magento2-extension-sms

Set up transactional SMS notifications in Magento 2

To set up transactional SMS notifications in Magento 2:

  1. Go to STORES > Settings > Configuration > DOTDIGITAL > Transactional SMS.
  2. Go to the Transactional SMS Settings area to enable and manage your SMS notifications:
    • Select Yes or No from the Enabled drop-down menu to enable or disable SMS notifications. You can select Click here for status to go to the SMS Sends Report area in Magento 2.
    • Select Yes or No from the Enable mobile phone validation drop-down menu to enable or disable mobile phone number validation when a customer checks out.

      It's recommended to select Yes because valid mobile phone numbers are required to use transactional SMS notifications.

    • Select Edit SMS settings to manage your SMS settings in Dotdigital.
  3. In the SMS Templates area, go to the template you want to enable and select Yes from the Enabled drop-down menu.
  4. In the Message box, enter the message that appears to your customers when it’s triggered.

    You can use our suggested transactional SMS templates.

  5. Select Save Config.

Transactional SMS variables

Transactional SMS variables vary for each message.

Variable limitations

These variables are specifically for transactional SMS notifications and aren't pulling data from Magento 2 attributes or Dotdigital data fields. Only a limited number of variables are for use in your templates. To see which variables are available for each template, hover over the question mark icon next to each SMS Message box.

Here’s a list of transactional SMS variables that you can use in the Message box:

Variable Description of variable
{{ first_name }} Returns the first name of the customer.
{{ last_name }} Returns the last name of the customer.
{{ email }} Returns the email of the customer.
{{ store_name }} Returns your store name.
{{ order_id }} Returns the order ID.
{{ order_status }}

Returns the status of the order. For example, cancelled or on hold.

{{ tracking_carrier }}

Returns the name of the tracking company. For example, FedEx or DHL.

Only available for New Shipment and Shipment Update notifications.

{{ tracking_number }}

Returns the tracking number.

Only available for New Shipment and Shipment Update notifications.

{{ refund_amount }}

Returns the amount that is refunded to the customer.

Only available for New Credit Memo notifications.

Transactional SMS templates

Here’s a list of transactional SMS templates that you can use in the Message box:

  • New Order Confirmation
    Used for any new order confirmations.
    Thanks {{ first_name }}, your order has been placed on {{ store_name }}. We'll notify you when it ships. View order {{ order_id }}
  • Order Update
    Used for orders that are cancelled or on hold.
    {{ first_name }}, your order {{ order_id }} has been updated with a status: {{ order_status }}. View order {{ order_id }}
  • New Shipment
    Used for any new shipment notifications.
    Great news, your order from {{ store_name }} has been shipped. {{ tracking_carrier }} tracking number: {{ tracking_number }}
  • Shipment Update
    Used to update the shipping status of an order.
    {{ first_name }}, the recent shipment of order {{ order_id }} has been updated. {{ tracking_carrier }} tracking number: {{ tracking_number }}
  • New Credit Memo
    Used to notify customers about order refunds.
    {{first_name}}, your order {{ order_id }} from {{ store_name }} has been refunded for {{ refund_amount }}

Reporting for transactional SMS notifications in Magento 2

To find transactional SMS notification reporting in Magento 2, go to REPORTS > Customer Engagement > SMS Sends, or go to the Transactional SMS Settings area and select Click here for status.

In the SMS Sends Report area, you can see single send details about each SMS notification:

  • Type
    The type of SMS notification that was sent.
  • Order ID
    The ID of the order.
  • Store
    The store where the order came from.
  • Website
    The Magento website where the order was placed.
  • Phone
    The phone number of the customer that the SMS notification was sent to.
  • Customer Email
    The email address of the customer.
  • Content
    The content that makes up the notification message that was sent to the customer.
  • Status
    The status of the SMS notification message. Can be Delivered, Pending, or Failed.
  • Created at
    The date and time the SMS notification was created.
  • Sent at
    The date and time the SMS notification was sent.
  • Message
    The message that was sent to the customer.
Did you find this article helpful?

Can we help?

Thanks for using Dotdigital. If you need more help or support, then contact our support team.