Using Notification Templates

Email notifications are sent automatically to users based on events in the store. To send them, you must first create a Notification Template. Notification templates under a channel define the sender, recipient, trigger, and content of an email notification.

Important

The preferred way to set up notifications is by creating a notification template and then using it in an object action. See Notification Template and Defining Object Actions for more information. The following instructions specify how to create a notification template at the channel level.

Note

To use notifications, first configure mail settings for your Liferay system. See Configuring Mail for more information.

Event Triggers

Every notification template has a type that determines the channel event that triggers the notification. Commerce includes the following event triggers for notification templates.

Notification TypeEvent
Order PlacedAn order is placed in the channel.
Order ProcessingThe order is in process.
Order Awaiting ShipmentThe order is ready for shipping.
Order Partially ShippedOrder items are shipped separately.
Order ShippedThe order has shipped.
Order CompletedThe order has been delivered and marked as complete.
Subscription RenewedA subscription is renewed.
Subscription ActivatedA subscription is activated.
Subscription SuspendedA subscription is suspended, pending review or action by the store.
Subscription CanceledA subscription is cancelled.

Creating a Notification Template

  1. Open the Global Menu (Global Menu) and navigate to CommerceChannels.

  2. Select a channel and go to Notification Templates.

    Select a channel and go to Notification Templates.

  3. Click Add (Add Button).

  4. Enter a name and description for the template.

  5. Select an event type to determine which channel events trigger the notification. Each template can only have one trigger.

  6. Toggle the switch to enable the template.

    Enter a name and description, select an event type, and enable the template.

  7. Under Email Settings, enter the sender and recipients for the notification.

    You can use template variables to populate these fields automatically using data from the triggering event. See Notification Template Variables Reference Guide for more information. If required, you can also specify the actual email addresses to send the notification to.

    Enter the sender and recipients for the email.

  8. In the Email Content section, enter a subject and body for the email.

    You can use template variables to populate these fields automatically using data from the triggering event. See Notification Template Variables Reference Guide for more information.

    Enter a subject and body for the email.

  9. Click Save.

While enabled, the notification template automatically sends emails when triggered. The Notification Queue tab displays all triggered notifications with its sender, recipients, event type, status, and priority.

Viewing Email Notifications of an Order

Email notifications related to an order are tracked. To view them, open the Global Menu (Global Menu) and navigate to CommerceOrders. Select an order and click the Emails tab. See Order Information to learn more.

You can view the triggered notification under the Emails tab of an order.

Commerce 2.0 and Below

To create email notifications in Commerce 2.0 and below:

  1. Navigate to Site AdministrationCommerceSettings.

    Open the Site Administration menu and navigate to Settings under Commerce.

  2. Click the Notifications tab.

  3. Click the Notification Templates sub-tab.

  4. Click Add (Add icon) to create a new Notification Template and enter the following information.

    • Name: New Orders
    • Description: New orders template
    • Account Groups: (leave blank or designate an optional account group)
    • From Address: Your store’s email address (for example: orders@yourstore.com)
    • From Name: Name of the store or a customer service representative
    • Type: Order Placed
    • Enabled: Switch the toggle to YES
    • Subject: Email subject (for example: Your order has been received.)
    • Body: You can use variables such as [%ORDER_CREATOR%] and [%ORDER_ID%] to represent a customer’s name and order ID respectively. See the Notification Template Variables Reference Guide to learn more.

    Creating and configuring a notification template is easy.

  5. Click Save.

The notification template now sends an automated email upon receiving an order. When you create a template, a new notification is added to the notification queue whenever an order is placed. To view this, you can check the Notifications Queue sub-tab after placing an order. By default, the Liferay instance checks the queue every 15 minutes to send any unsent notifications. To learn how to change the interval, see Configuring the Commerce Notification Queue.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy