This article will explain:
- How to set email notifications when orders are submitted (or change to another status)
- How to customize the email subject and message body content
Go to Setup -> Settings -> Sales Activities -> Transaction Types and click on the "Workflow" tab for the Transaction type you wish to add email notification for.
Edit the In Creation -> Submitted Transition actions:
Email notification is a Post action that can be triggered in the Workflow by any status change.
Add the Post action and fill in the following:
- To, Cc, Bcc or dynamic email address
- Customized message body
- Customized subject
- Attached file format (PDF, Excel, etc)
- Send email to the Account email and/or the user who created the order
Enter the addresses in the To, Cc, Bcc fields.
Pepperi allows you to dynamically determine email addresses using variables. You can send an email to a particular role in your organization (ie a brand manager role, or catalog manager role) whose email address may change over time. You can update the address in one place, and Pepperi will retrieve it wherever it may be used in your configuration. For details on how to configure this see: Pepperi’s dynamic email notifications
Tick "Send email to Account" if you wish an email to be sent to the Account (customer) for this Transaction status change. The email will be sent to the email address of the Account in Pepperi.
Tick "Send email to the user who performed this activity" if you wish an email to be sent to the Pepperi user's email who submitted this order.
Customize the Email Subject and Message Body:
You can use the default email subject and message body, or customize them as predefined text or to include order information such as the order status or any other fields from the Account or Transaction, formatted in an XSLT file.
The subject uses a default configuration file called "Email subject", the email's message body is empty by default and does not have a default configuration file. You can easily create one if you require text and Pepperi fields to appear in the message body (instructions below).
Use Plain text message
To use a predefined text click the edit link next to the Subject or Message actions. Enter a static text in the "Use plain text message" area that will be displayed in the subject or message body. Using plain text does not allow including Pepperi field values, this requires using a configuration file (explained below). |
Use Configuration File
Click the Edit link next to the Subject or Message sections and select "Use Configuration file". The default configuration file "Email subject" is an XSLT formatted file that includes several Pepperi fields. You can select the default file "Email subject" or duplicate it to create your own customized format to include any fields or text you require. The configuration files listed in the menu are those in the Configuration Files section that are of Object = Order and Type = Email.
The following default EmailSubject.xslt file is attached to this article for your reference. It's pretty intuitive to modify the fields, if you are familiar with the Pepperi field names. The email subject for the following default configuration file will be:
Subject: Order #<ID> / AccountName / Sales Rep Name
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
Order #<xsl:value-of select="/SalesTransaction/TransactionHeader/TransactionHeaderFields/WrntyID"></xsl:value-of>
/ <xsl:value-of select="/SalesTransaction/TransactionHeader/AccountFields/AccountName"></xsl:value-of>
<xsl:if test="string(/SalesTransaction/TransactionHeader/SalesRepFields/AgentName) != ''">
/ </xsl:if>
<xsl:value-of select="/SalesTransaction/TransactionHeader/SalesRepFields/AgentName"></xsl:value-of>
</xsl:template>
</xsl:stylesheet>
To modify it, download the template, modify it, add another configuration file and then upload it.
Add a new configuration file with File Type = Sales Transaction Email, and upload your xslt. You will then be able to select this file for the email subject or message body in the email action.
See more detailed instructions on how to upload your own configuration files.
Attach File
The default "PDF" is of course typically the file that you wish to send.
The options available for File attachments are the configuration files you defined in the Configuration Files section. Here you will find the templates that will generate the file attachments upon submission of the transaction and that may be sent along with the email.
The format of the PDF can be configured in the Views and Forms Tab under "Details PDF" and "Cart - PDF view". For details on configuring the layout see: Sales Transaction Types - Order, Invoice, Quote, Return and more
If you have created a different XSLT file for the PDF, select it from the Configuration Files you defined.
1 comment
this article was really useful for me
Please sign in to leave a comment.