---
title: "Trade Portal Automated Notifications"
canonical: "https://kb.myframeworks.com.au/space/FRAM/28408848/Trade%20Portal%20Automated%20Notifications"
format: markdown
---
# Overview

Using the [Event Definition Maintenance](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28405008) you can create automated notifications when a Quote or Order is created from the Trade Portal. The creation of a Quote or Order within the Trade Portal creates the event **TpaOrderCreated **which, when triggered, any of the available automation actions can be subscribed to for the event.

This document will help you create automated email notifications to the **customer, sales rep **and **branch **email addresses

> ⚠️ **Important:** The feature code **SNA** must be activated first to allow the Standard Notification Actions of Create-Task, Email, SMS and Frameworks Notifications.

# Automated Emails for New Trade Portal Quotes and Orders 

To set up automated email notifications to the **customer, sales rep **and the **branch **perform the following:.

## 1. Subscribe to the Trade Portal Order Created Event

The first set is to subscribe to the **TpaOrderCreated **so you can then add the email actions once the event is triggered. To do this, perform the following:

1. Click the **Frameworks Menu** and navigate to **System Administration > Event Notifications > Setup & Administration > Event Definition Maintenance **from the navigation tree.
2. Click **New** at the bottom of the page.
3. From the **Event ID **drop-down menu, select **TpaOrderCreated.**
4. Enable the **subscribe** checkbox.
5. In the **Description **field, enter a description about the event, for example, "Order or Quotes created from the Trade Portal."

## 2. Create an email to the Customer

Now that the **TpaOrderCreated **event has been subscribed to, you can create the first email action.

1. From the **Actions List** select the **Email **action.
2. In the **Actions Details **section, update the following information to be able to send an email to your customers on the creation of a Quote or Order via the Trade Portal.
  1. In the **Description **field, add **(Customer)** to the end of the description to let you know this action will email the customer.
  2. Enable the **Subscribed **checkbox. This will enable this action.
  3. In the** From **field, enter the email address you want the customer to receive the email from
  4. In the **To **field, enter the variable **{order:contactEmail}**. This will add in the customer's email address for the order as set in their Trade Portal.
  5. If required, in the **Cc** and **Bcc** fields, enter any additional email addresses.
  6. In the **Subject **and **Body **fields, enter the subject and message you would like added to the email for the customer.  Enable the **Show Body as HTML **to create an HTML email.

> **Example**
> 
> - **Subject: **Trade Portal Order {order:numTran} created
> - **Body: **Hi {order:ContactName}, Your Trade Portal Order: {order:numTran} has been created.

![image](media://88dabfa1-aab6-4669-8af3-9d1121996462)

> ✅ Refer to the **Using the Helper** section in the [Event Definition Maintenance](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28405008) User Manual for more information about variable text.

---

### An example of an HTML email body

When creating an email for your customer you can add your required marketing information as you would a normal email. 

**For Example:**

With **Show Body as HTML **disabled, you can use HTML tags and inline code to create your email, such as:

```html
Hi {order:ContactName}, 
<div><br></div> <div>Your Order: {order:numTran} has been confirmed</div> 
<div><br></div> <div>Regards</div> 
<div><b>Sales Manager</b> 
<div><br></div> <a href="https://www.myframeworks.com.au/"><img src="https://skb.sterland.com:8443/picture/location/frameworkslogo.png" alt="Frameworks" title="Frameworks" width="236"></a>
```

With **Show Body as HTML **enabled you can use the HTML formatting toolbar create your email, such as:

![image](media://9db9f285-c5e0-4c23-9edd-79906e635026)

3. Click **Save **to commit the changes.

## 3. Create an email to your Sales Rep

With the first automated email created, you can now create additional email actions.

> ⚠️ Ensure that the **TpaOrderCreated **event is still selected.

1. Click the **Add **button to add a new action.
2. In the **Actions Details **section, update the following information to be able to send an email to your sales rep on the creation of a Quote or Order via the Trade Portal.
  1. From the **Action** drop-down menu select **Email**.
  2. In the **Description **field add **Send an email notification (Sales Rep) **as the description to let you know this action will email the sales rep.
  3. Enable the **Subscribed **checkbox. This will enable this action.
  4. In the** From **field enter the email address you want the customer to receive the email from
  5. In the **To **field enter the variable **{order:emailSalesRep}**. This will add the sales rep's email address for the order.
  6. If required, in the **Cc** and **Bcc** fields enter any additional email addresses.
  7. In the **Subject **and **Body **fields enter the subject and message you would like added to the email for the sales rep. Enable the **Show Body as HTML ** to create an HTML email.

> **Example**
> 
> - **Subject: **Trade Portal Order {order:numTran} created
> - **Body**: Hi {order:idSalesRep}, {order:ContactName} has created the Order: {order:numTran} in the Trade Portal

![image](media://f15e20b7-631e-4413-b75e-16e29313c7e3)

3. Click **Save **to commit the changes.

## 4. Create an email to the Branch

With the first and second automated email created, you can now create the final email actions.

> ⚠️ Ensure that the **TpaOrderCreated **event is still selected.

1. Click the **Add **button to add a new action.
2. In the **Actions Details **section, update the following information to be able to send an email to the branch the order is for on the creation of a Quote or Order via the Trade Portal.
  1. From the **Action** drop-down menu select **Email**.
  2. In the **Description **field add **Send an email notification (Branch) **as the description to let you know this action will email the branch the order is for.
  3. Enable the **Subscribed **checkbox. This will enable this action.
  4. In the** From **field enter the email address you want the customer to receive the email from
  5. In the **To **field enter the variable **{branch:mobileAppsEmailAddress}**. This will add the branch's email address for the order.
  6. If required, in the **Cc** and **Bcc** fields enter any additional email addresses.
  7. In the **Subject **and **Body **fields enter the subject and message you would like added to the email for the sales rep. Enable the **Show Body as HTML ** to create an HTML email.

> **Example:**
> 
> - **Subject: **Trade Portal Order {order:numTran} created
> - **Body**: Hi Team, {order:ContactName} has created the Order: {order:numTran} in the Trade Portal

![image](media://10057c86-ad4b-481d-8d5a-995bf5f224e7)

3. Click **Save **to commit the changes.

# Additional Information

> ✅ Refer to the [Event Definition Maintenance](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28405008) User Manual for more information.
> ✅ 
> ✅ Refer to [Email Action](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28408730) for more information.