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.

Capabilities

Product

Education

Contact Us

Connect

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