HomeGuides
Submit Documentation FeedbackJoin Developer CommunityLog In

Working with email lists and templates

This topic describes a description of email lists and templates, the process flow for how emails are sent, how to add a missing template, and troubleshooting tips.

What are email lists and templates?

Email Templates are HTML documents used to format emails sent by the B2B Commerce Cloud application. Email Lists identify the Email Template that is associated with it, in addition to the email's Subject and From information.

πŸ“˜

Notes

The Manage Subscribers finger tab is not relevant when working with the standard out-of-the-box Email Lists and Templates. For more information, refer to the article on Creating or Editing Email Templates.

Names of Email Lists are predefined and cannot be changed. During the process of updating or changing an Email List, if the name of the Email List is changed, the system regenerates a new email list using the default values.

How emails are sent using lists and templates

When certain events occur, such as an order being submitted, B2B Commerce Cloud retrieves all Email Lists connected to the Email Template associated with the event. The Email List provides the information for the To, From, and Subject. The Email Template provides the HTML for the body of the email. The following diagram shows the general workflow:

Default email templates

B2B Commerce Cloud provides several default email templates used for certain events throughout the application. There are two types of Email Templates: those that rely on an Email List, and those that do not. Certain events, like a submitting an order, do not require the use of an email list, as the confirmation email is generated by the system instead.

Contact Us Email

List NameTemplate Name
ContactUsTemplateContactUsTemplate

This template is used when a user completes and submits the contact form on the "Contact Us" page on the commerce site. The template includes the information provided in the contact form. Emails using this template are sent to any email addresses specified in the "Send Email To" field of the "ContactUsForm" widget in the CMS. This defaults to a single email address, [email protected], if not changed.

Order Confirmation Email

List NameTemplate Name
OrderConfirmationOrderConfirmation

This template is used after a user places an order on the website. The template includes information regarding the order, including products ordered, payment method, and customer billing and shipping contact information. This template's emails are sent to the Billing and Shipping customers used while placing the order.

Request for RMA Email

List NameTemplate Name
RequestRMARequestRMA

This template is used after a user requests an RMA from the Order History page. The template includes information regarding the product the user would like to return, along with the order that contains the product. This template's emails are sent to the user who requested the RMA as well as the email address specified in the "RMA_DestinationEmail" application setting.

Request for Quote Email

List NameTemplate Name
RfqQuoteRfqQuote

This template is used during the lifetime of a quote. The template includes information such as quote status (such as Requested, Proposed, Rejected) and the product being quoted. This template's emails are sent either to the user who requested the quote or the salesperson who is responsible for proposing a quote, depending on the quote's current status.

πŸ“˜

Note

See the following article for more information about Request for Quote: Examples of Request for Quote Notifications and Messaging

Shipment Confirmation Email

List NameTemplate Name
ShipmentConfirmationShipmentConfirmation

This template is used after a portion of a shipment package has been shipped. The template includes order and shipping information, such as the quantity of product that has been shipped. However, an email is only sent after the "Send Shipment Confirmations" integration job completes. This integration job is responsible for sending shipment confirmation emails. The email is sent to the user who placed order, Billing and Shipping customers associated with the order, salesperson associated with the order, and the email address specified in the Customer Service Email Address application setting.

The following Email Templates do not use Email Lists:

Integration Job Status Report Email

List NameTemplate Name
StatusReport

This template is used after the "Job Status Report" integration job completes. The template includes status information about any integration jobs started within a certain time period and the status of each. This template's emails are sent to the email addresses listed in the "Notification Email List" for the associated integration job.

A common use case for this email is to create a recurring integration job to help with troubleshooting and make job failures and successes more visible. This automatically sends the Status Report email on a specified schedule.

Tell a Friend about a Product Email

List NameTemplate Name
No Associated ListTellAFriend

This template is used when a user shares a product from the product detail page with a friend. The template includes information about the product that was shared and a link to the product detail page. This template's emails are sent to the friend's email address specified in the sharing product form.

PunchOut_FailedOrderRequest

List NameTemplate Name
No Associated ListPunchOut_FailedOrderRequest

https://support.insitesoft.com/hc/en-us/articles/214227506-Creating-an-Automated-Email-for-Failed-Orders

This template is used if a Punch Out order request fails to be processed by the Insite Commerce application. The template includes order information and the error message generated during the order processing. This template's emails are sent to email addresses specified in the Punchout_FailedOrderEmail application setting. If this setting is blank, then no email is sent.

Notification of New Admin User Account

List NameTemplate Name
Admin_AccountActivationAdmin_AccountActivation

This template is used when an administrator sends an activation email to a newly created Admin Console user account. The template includes a link with which the new user can activate his or her account. This template's emails are sent to the new user.

Notification of New Website/Website User Account

List NameTemplate Name
Website_AccountActivationWebsite_AccountActivation

This template is used when an administrator sends an activation email to a newly created Website user account. The template includes a link with which the new user can activate his or her account. This template's emails are sent to the new user.

Notification of a Reset Admin Account Password

List NameTemplate Name
Admin_ResetPasswordAdmin_ResetPassword

This template is used when an Admin Console user forgets his or her password and elects to reset the password from the sign in form on the Admin Console. The template includes a link with which the user can reset his or her password. This template's emails are sent to the user who needs his or her password reset.

Notification of a Reset Website/Website Account Password

List NameTemplate Name
Website_ResetPasswordWebsite_ResetPassword

This template is used when a Website user forgets his or her password and elects to reset the password from the sign in form on the website. The template includes a link with which the user can reset his or her password. This template's emails are sent to the user who needs his or her password reset.

Share an Invoice with Another User Email

List NameTemplate Name
ShareInvoiceShareInvoice

This template is used when a Website user elects to share an invoice with another user. The template includes a link to the invoice and a message from the user who shared the invoice. This template's emails are sent to the user with whom the invoice is being shared.

Add a missing email template

πŸ“˜

Note

This task involves searching the B2B Commerce Cloud source code. A developer may be required to complete this activity.

The B2B Commerce Cloud application does not create an email template in the Admin Console until it needs to be used to send an email. If you need to add an email template before the application automatically creates it, use the following steps:

  1. Create an email template in the Admin Console. For the "Name" field, use one of the names of the headings above (such as TellAFriend). The application looks for this name when it searches for an email template.
  2. Find the appropriate email template in the source code. The default email templates can be found in the source code in the directory ~/InSiteCommerce.Web/Views/DefaultEmails/. Each template is a .cshtml file and is named using the headings above (such as TellAFriend.cshtml).
  3. Copy the content from the email template file.
  4. Paste the content into the appropriate email template revision in the Admin Console.
  5. Adjust the email template as necessary.

Now the application will use the email template you created the next time it needs to send the associated email.

Troubleshooting tips

Logo

For the account activation, reset password, username changed, and shipment confirmation email templates, a company logo appears in the upper left corner. If this logo does not appear in these templates, go to Websites > edit website in the Admin Console, and populate the Print & Email Logo Image field with the appropriate logo. Each website may have a unique logo.

πŸ“˜

Note

The remainder of this section requires knowledge of HTML, web browsers, > and the Microsoft Razor templating engine for .NET. You may need a > developer to complete this.

The templates are written using HTML and the Microsoft Razor templating engine.

HTML

Since the template uses plain HTML, you can view it using a web browser to eliminate any HTML parsing or rendering problems.

Razor

The templates use the standard Razor engine. All variable usages should be prefixed by the @ symbol followed by the variable name. Because of how the templates are rendered, none of the standard MVC or HTTP Request objects will be available (such as @Html.TextBox). If the template does include any malformed Razor or C# code, an error log should be produced while trying to use the email template and send the email. Error logs are visible in the Admin Console > Administration > System > Application Logs.


Did this page help you?