- 01 Nov 2024
- 9 Minutes to read
- Print
- DarkLight
Email notification templates
- Updated on 01 Nov 2024
- 9 Minutes to read
- Print
- DarkLight
Zilliant CPQ sends email notifications about changes in opportunities and quotes, or when a manager approves a quote.
Configure email notification templates
For every email notification there is a pre-delivered notification message. This key-value pair is mapped to a specific CPQ operation. Maintain key-value pairs in the messages.properties file.
- From the application left navigation area, select Administration.
- From the top navigation bar, select Content Management.
- Select conf > email from the list.
- Download the properties file for the language you want to configure.
- Make changes to email content and key-value pairs, then upload the file.
Default email text
Email subject
workItem.approval.needed.title=Approval needed for ${doc.type} "${doc.objectName}"
Email body
workItem.approval.needed.content=Dear ${user.firstName},<br><br>${sender.firstName} ${sender.lastName} just submitted a quote which requires your review and approval. The quote’s expires on <span style="color: red; font-weight: bold;">${doc.salesDocumentDateOfExpiry}</span> and therefore immediate attention is needed!
<div>
<div><span>Quote ID:</span><span>${doc.quoteId}</span></div>
<div><span>Name:</span><span>${doc.objectName}</span></div>
<div><span>Quote Value:</span><span>${doc.includesDocumentHeaderPriceItem.documentHeaderPrice}</span></div>
<div><span>Account</span><span>${doc.quoteContainedBy.objectName}</span></div>
</div>
<br>You can review the quote <a href="${doc.url}">here</a> or approve / reject using the below buttons:<br><br>${approvalButtons}<br><br><br><i>Powered by</i><br>
<div><img src="https://www.inmindcloud.com/wp-content/uploads/2018/08/In-Mind-Cloud-New-Logo-small.png"></img></div>
<div style="color: #00B0F0; font-size: 10px; font-style: italic;">This email was automatically sent from Zilliant CPQ.</div>
Email template examples
Email to the order creator when a business admin approves the order
portal.order.approved.title = Your Order ${doc.orderId} Has Been Approved
portal.order.approved.content =
<body bgcolor="#F7F1E8">
Dear ${user.firstName} ${user.lastName},<br><br>Order ID "${doc.orderId}" - for amount "${doc.orderTotal}" that you submitted has been approved and submitted by ${sender.firstName} ${sender.lastName}</p>
<table style="background-color: rgb(255, 255, 255);">
<tbody>
<tr>
<td style="width: 150px;">PO ID:</td>
<td>${doc.poID}</td>
</tr>
<tr>
<td style="width: 150px;">Order:</td>
<td>${doc.objectName}</td>
</tr>
<tr>
<td style="width: 150px;">Order Value:</td>
<td>${doc.hasCurrency.objectName} ${doc.orderTotal}</td>
</tr>
<tr>
<td style="width: 150px;">Address:</td>
<td><br></td>
</tr>
<tr>
<td style="width: 150px;">Bill To:</td>
<td>${doc.orderBillTo.address1StreetPrefixName} ${doc.orderBillTo.address2AdditionalStreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}</td>
</tr>
<tr>
<td style="width: 150px;">Ship To To:</td>
<td>${doc.orderShipTo.address1StreetPrefixName} ${doc.orderShipTo.addressStreet} ${doc.orderShipTo.addressCity}</td>
</tr>
</tbody>
</table>
<p><br><a href="${applicationURL}">Access Portal Application</a><br><br></p>
<hr>
This is a system-generated message. Please do not reply to this email.
<p></p>
<p><span style="color: #FBB116; font-weight: bold; font-style: italic;"><br></span></p>
<p><span style="color: #FBB116; font-weight: bold; font-style: italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br></p>
<div><img src="https://f.hubspotusercontent30.net/hubfs/1797086/new%20logo%202021/IMC_LOGO_RGB_300x197.png" width="250" alt="IMC Logo"></div>
<div style="color: #FBB116; font-size: 12px; font-style: italic;">This email was auto-generated. Please do not reply.</div>
<p><br></p>
<p></p>
Email to the order creator when a business admin rejects the order
portal.order.rejected.title = Your Order ${doc.orderId} Has Been Rejected
portal.order.rejected.content = Dear ${user.firstName} ${user.lastName},<br><br>Order "${doc.orderId}" that you submitted has been rejected by ${sender.firstName} ${sender.lastName}<br><br>PO ID:   ${doc.poId}<br><br>Order:   ${doc.objectName}<br><br>Order Value: ${doc.hasCurrency.objectName} ${doc.orderTotal}<br><br>Address:  Bill To: ${doc.orderBillTo.address1StreetPrefixName} ${doc.orderBillTo.address2AdditionalStreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}<br><br>      Ship To: ${doc.orderShipTo.address1StreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}<br><br><a href="${applicationURL}">Access Portal Application</a><br><br>
<hr>
This is a system generated message. Please do not reply to this email.
Email to business admins when a user cancels an order that is submitted for review
portal.order.cancelled.title = Order ${doc.orderId} Has Been Cancelled
portal.order.cancelled.content =
<body bgcolor="#F7F1E8">
Dear ${user.firstName},<br><br>Order "${doc.orderId}" was submitted for your review, but has been cancelled by the submitter.<br><br>
<hr>
<span style="color: #FBB116; font-weight: bold; font-style: italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br>
<div><img src="https://f.hubspotusercontent30.net/hubfs/1797086/new%20logo%202021/IMC_LOGO_RGB_300x197.png" width="250" alt="IMC Logo"></img></div>
<div style="color: #FBB116; font-size: 12px; font-style: italic;">This email was auto-generated. Please do not reply. You can access your application <a href="${activationLink}">here</a></div>
</body>
Email to business admins when a user submits an order for review
portal.order.reviewRequest.title = Order ${doc.orderId} (PO: ${doc.poId}) Has Been Submitted For Your Review
portal.order.reviewRequest.content =
<body bgcolor="#F7F1E8">
Dear ${user.firstName},<br><br>The following order has been submitted for your review:<br>
<p></p>
<table style="background-color: rgb(255, 255, 255);">
<tbody>
<tr>
<td style="width: 150px;">PO ID:</td>
<td>${doc.poID}</td>
</tr>
<tr>
<td style="width: 150px;">Order:</td>
<td>${doc.objectName}</td>
</tr>
<tr>
<td style="width: 150px;">Order Value:</td>
<td>${doc.hasCurrency.objectName} ${doc.orderTotal}</td>
</tr>
<tr>
<td style="width: 150px;">Address:</td>
<td><br></td>
</tr>
<tr>
<td style="width: 150px;">Bill To:</td>
<td>${doc.orderBillTo.address1StreetPrefixName} ${doc.orderBillTo.address2AdditionalStreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}</td>
</tr>
<tr>
<td style="width: 150px;">Ship To To:</td>
<td>${doc.orderShipTo.address1StreetPrefixName} ${doc.orderShipTo.addressStreet} ${doc.orderShipTo.addressCity}</td>
</tr>
</tbody>
</table>
<p><br></p>
<p><br>You can review the details and place the order <a href="${doc.url}">here</a>
<hr>
<span style="color: #FBB116; font-weight: bold; font-style: italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br>
<div><img src="https://f.hubspotusercontent30.net/hubfs/1797086/new%20logo%202021/IMC_LOGO_RGB_300x197.png" width="250" alt="IMC Logo"></img></div>
<div style="color: #FBB116; font-size: 12px; font-style: italic;">This email was auto-generated. Please do not reply. You can access your application <a href="${activationLink}">here</a></div>
</body>
Email the order approver when a business admin approves the order, amends it and places the order, or places their own order
portal.order.approved.bizadmin.title = Your Order ${doc.orderId} (PO: ${doc.poId}) Has Been Submitted
portal.order.approved.bizadmin.content = Dear ${user.firstName} ${user.lastName},<br><br>Order "${doc.orderId}" (PO: ${doc.poId}) has been placed by you.<br><br>PO ID:   ${doc.poId}<br><br>Order:   ${doc.objectName}<br><br>Order Value: ${doc.hasCurrency.objectName} ${doc.orderTotal}<br><br>Address:  Bill To: ${doc.orderBillTo.address1StreetPrefixName} ${doc.orderBillTo.address2AdditionalStreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}<br><br>      Ship To: ${doc.orderShipTo.address1StreetPrefixName} ${doc.orderBillTo.addressStreet} ${doc.orderBillTo.addressCity}
eCommerce user or business admin submits an order inquiry
portal.inquiry.title = Inquiry ${doc.quoteId} Has Been Submitted
portal.inquiry.content = Dear ${user.firstName} ${user.lastName},<br><br>The following Inquiry has been submitted by you.<br><br>Inquiry ID:   ${doc.quoteId}<br><br>Account:    ${doc.quoteContainedBy.objectName}<br><br>This email was auto-generated. Please do not reply.<br><br>
Configure email notifications for each gate of the quote approval process
Configure email notifications to ensure that all relevant stakeholders are informed at each stage of the approval process. By sending email notifications to all relevant parties, you minimize the risk of oversights or miscommunication and ensure a smoother approval process.
Enable email notifications for each approval gate
From the application left navigation area, select Administration.
From the top navigation bar, select Master Data Management.
Scroll or search to locate Setting Boolean and select it from the list.
Scroll or search to locate the one of the following Boolean settings, then set the value to YES:
Label Description SettingNotificationsToPreviousGatesRolesOnQuoteApproval Sends approval notification emails to all users or roles involved in previous gates when the quote is approved by the current gate. SettingNotificationsToPreviousGatesRolesOnQuoteRejection Enables sending rejection notification emails to all users or roles involved in previous gates when the quote is rejected by the current gate. SettingNotificationsToUsersInvolvedInPreviousGates Sends approval or rejection notification emails only to the users who were involved in previous gates. SettingNotificationsToSameGateUsersOnQuoteApproval Sends approval notification emails to other users in the same gate when a user approves the quote. SettingNotificationsToSubmitteronEveryGatesofQuoteApproval Sends notification emails to the submitter for each quote approval gate. Select Save.
Provide a new email template for each specific approval action
Customers can modify the template's content (only its value, the key remains same) according to their business needs and add additional information to the approval email.
Email notification templates
Send notifications to previous gates roles on quote approval
If enabled, users or roles involved in previous gates receive an email when the quote is approved by the current gate. Provide a new email template.
Email subject: Quote [Quote ID] Approved at Gate [Gate Name]
Email template:
Dear [Role Name],
We are pleased to inform you that quote [Quote ID](include the link to the quote) has been approved at the gate [Gate Name].
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Gate: [Gate Name]
- Approved By: [Approver Name]
- Date: [Approval Date]
Thank you for your contribution to this process.
Best regards,
[Company Name / Logo]
Send notifications to previous gates roles on quote rejection
If enabled, users or roles involved in previous gates receive an email when the quote is rejected by the current gate. Provide a new email template.
Email subject: Quote [Quote ID] Rejected at Gate [Gate Name]
Email template:
Dear [Role Name],
We regret to inform you that quote [Quote ID](include the link to the quote) has been rejected at the gate [Gate Name].
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Gate: [Gate Name]
- Rejected By: [Rejector Name]
- Rejected Reason: [Rejected Reason]
- Date: [Rejection Date]
The quote will not proceed further unless resubmitted for review. Please review the Notes for further details.
Best regards,
[Company Name / Logo]
Send notifications to submitter on every gate of quote approval
If enabled, the submitter receives an email for each gate of the quote approval. Provide a new email template.
Email subject: Quote Approval Update: Gate [Gate Name] Completed for Quote [Quote ID]
Email template:
Dear [Submitter Name],
We wanted to inform you that your quote [Quote ID](include the link to the quote) has successfully passed the approval gate [Gate Name].
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Current Gate: [Gate Name]
- Approved By: [Approver Name]
- Date: [Approval Date]
Please be aware that the quote will proceed to the next gate of approval.
Thank you for your patience.
Best regards,
[Company Name / Logo]
Send notifications to previous gates users on quote approval
If enabled, only the user who was involved in previous gates receives an email when the quote is approved by the current gate. Otherwise, all the users with those roles receive an email notification. Provide a new email template.
Email subject: Quote [Quote ID] Approved at Gate [Gate Name]
Email template:
Dear [User Name],
We are pleased to inform you that the quote [Quote ID](include the link to the quote), which you were involved with, has been approved at gate [Gate Name].
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Gate Approved: [Gate Name]
- Approved By: [Approver Name]
- Date: [Approval Date]
Thank you for your contribution to this process.
Best regards,
[Company Name / Logo]
Send notifications to same gate users on quote approval/rejection
If enabled, notifications are sent to other users in the same gate when someone approves or rejects the quote. Provide a new email template.
For Approval
Email subject: Update on Quote [Quote ID]: Approved at Gate [Gate Name]
Email template:
Dear Team,
This is to notify you that the quote [Quote ID](include the link to the quote) at the gate [Gate Name] has been Approved.
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Gate: [Gate Name]
- Approved By: [Approver Name]
- Date: [Action Date]
Please review the quote details and take any necessary actions as required for your role.
Best regards,
[Company Name / Logo]
For Rejection
Email subject: Update on Quote [Quote ID]: Rejected at Gate [Gate Name]
Email template:
Dear Team,
This is to notify you that the quote [Quote ID](include the link to the quote) at the gate [Gate Name] has been Rejected.
Details:
- Quote ID: [Quote ID](include the link to the quote)
- Gate: [Gate Name]
- Rejected By: [Rejector Name]
- Rejected Reason: [Rejected Reason]
- Date: [Rejection Date]
Please review the quote details and take any necessary actions as required for your role.
Best regards,
[Company Name / Logo]
Configure custom email notifications through a Groovy script
You may need to send email notifications based on a specific business case. For example, if a quote's net value exceeds a particular amount, you can send a custom email notification to a specific manager. By running a Groovy script, you can tailor your notification to include quote details, a link to access the quote, and supporting attachments.
Create a Groovy script
Create a Groovy script that lists all characteristics needed in the notification email. Indicate the email recipient details and the attachments that the email notification should include.
This script supports the common binding variables and must call the following methods:
Method | Class | Description |
---|---|---|
createMimeMessage | mailSender | Creates a message for this sender. |
getAttachmentFiles() | salesItemsTree | Gets an attachment file by file name. |
Groovy script example with comments
// Import necessary classes and libraries
import java.util.Locale
import java.text.DecimalFormat
import java.text.DecimalFormatSymbols
import java.text.NumberFormat
import com.imc.vocabulary.Schema
import com.imc.iss.groovy.salesitem.*
import com.imc.iss.groovy.configitem.*
import com.imc.datamodel.BusinessObject
import com.imc.datamodel.transferobjects.BusinessDataAttributeDTO
import com.imc.datamodel.transferobjects.BusinessObjectDTO
import com.imc.datamodel.transferobjects.BusinessRelationAttributeDTO
import com.imc.datamodel.transferobjects.LocaleDTO
import java.text.SimpleDateFormat
import com.imc.util.NullUtil
import java.util.GregorianCalendar
import com.imc.context.IMCException
import org.apache.jena.ext.com.google.common.collect.Lists
import javax.activation.DataHandler
import javax.activation.DataSource
import javax.activation.FileDataSource
import javax.mail.BodyPart
import javax.mail.Message
import javax.mail.MessagingException
import javax.mail.Multipart
import javax.mail.internet.MimeBodyPart
import javax.mail.internet.MimeMessage
import javax.mail.internet.MimeMultipart
import javax.mail.util.ByteArrayDataSource
import java.io.File
import java.nio.file.Files
import javax.activation.DataHandler
import javax.activation.DataSource
import javax.activation.FileDataSource
// Call the createMimeMessage() method to create the email
def message = mailSender.createMimeMessage()
message.setSubject("Groovy Test")
// Specify the email recipient
message.addRecipient(javax.mail.Message.RecipientType.TO, new javax.mail.internet.InternetAddress("xyz@abc.com"))
message.addRecipient(javax.mail.Message.RecipientType.CC, new javax.mail.internet.InternetAddress("xyz@abc.com"))
// List attachment characteristics
def attachmentFilesSize = salesItemsTree.getAttachmentFiles().size()
def tempFiles = []
def tempFile = null
if (attachmentFilesSize == 0) {
message.setText("Hello,\n\nThis is the Testing mail of Groovy Script.")
} else {
def multipart = new MimeMultipart()
def messageBodyPart = new MimeBodyPart()
String emailText = "<html><body><h1>Hello</h1><p>This is a test email.</p></body></html>"
messageBodyPart.setText(emailText, "utf-8", "html");
multipart.addBodyPart(messageBodyPart)
attachmentBodyPart = new MimeBodyPart()
def attachmentFiles = salesItemsTree.getAttachmentFiles()
attachmentFiles.each { attachment ->
tempFile = File.createTempFile("attachment", ".txt")
Files.write(tempFile.toPath(), attachment.getFileContent())
tempFiles << tempFile
def attachmentBodyPart = new MimeBodyPart()
def source = new FileDataSource(tempFile)
attachmentBodyPart.setDataHandler(new DataHandler(source))
attachmentBodyPart.setFileName(attachment.getFileName())
multipart.addBodyPart(attachmentBodyPart)
}
message.setContent(multipart)
}
mailSender.send(message)
tempFiles.each { file ->
if (file.exists()) {
file.delete()
}
}
// Call the notifyInfo method to send the email
groovyLogger.notifyInfo("Mail sent successfully")
return true;