Email notification templates
  • 14 Feb 2025
  • Dark
    Light

Email notification templates

  • Dark
    Light

Article summary

Zilliant CPQ sends email notifications about changes in opportunities, quotes, and agreements under negotiation, or when a manager approves a quote or an agreement.

Configure email notification templates

There is a pre-delivered notification message for each email notification. This key-value pair is mapped to a specific CPQ operation. Maintain key-value pairs in the messages.properties file.

  1. From the application left navigation area, select Administration.

  2. From the top navigation bar, select Operation Settings, then select System Settings subtab.

  3. In the General section, under Download Email Template Start, select Start.

  4. Make changes to the email title and content without changing the keys.

  5. Upload the file:

    1. From the application left navigation area, select Administration.

    2. From the top navigation bar, select Content Management.

    3. Select conf > email.

    4. Select , then select a file to upload.

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}&emsp;${doc.orderBillTo.address2AdditionalStreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${doc.orderBillTo.addressCity}</td>
         </tr>
         <tr>
            <td style="width:150px;">Ship To To:</td>
            <td>${doc.orderShipTo.address1StreetPrefixName}&emsp;${doc.orderShipTo.addressStreet}&emsp;${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:&emsp;&emsp;&emsp;${doc.poId}<br><br>Order:&emsp;&emsp;&emsp;${doc.objectName}<br><br>Order Value:&nbsp;&nbsp;&nbsp;&nbsp;${doc.hasCurrency.objectName} ${doc.orderTotal}<br><br>Address:&emsp;&emsp;Bill To:&emsp;${doc.orderBillTo.address1StreetPrefixName}&emsp;${doc.orderBillTo.address2AdditionalStreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${doc.orderBillTo.addressCity}<br><br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;Ship To:&emsp;${doc.orderShipTo.address1StreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${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}&emsp;${doc.orderBillTo.address2AdditionalStreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${doc.orderBillTo.addressCity}</td>
         </tr>
         <tr>
            <td style="width:150px;">Ship To To:</td>
            <td>${doc.orderShipTo.address1StreetPrefixName}&emsp;${doc.orderShipTo.addressStreet}&emsp;${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:&emsp;&emsp;&emsp;${doc.poId}<br><br>Order:&emsp;&emsp;&emsp;${doc.objectName}<br><br>Order Value:&nbsp;&nbsp;&nbsp;&nbsp;${doc.hasCurrency.objectName} ${doc.orderTotal}<br><br>Address:&emsp;&emsp;Bill To:&emsp;${doc.orderBillTo.address1StreetPrefixName}&emsp;${doc.orderBillTo.address2AdditionalStreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${doc.orderBillTo.addressCity}<br><br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;Ship To:&emsp;${doc.orderShipTo.address1StreetPrefixName}&emsp;${doc.orderBillTo.addressStreet}&emsp;${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:&emsp;&emsp;&emsp;${doc.quoteId}<br><br>Account:&emsp;&emsp;&emsp;&emsp;${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 and agreement approval process

Configure email notifications to inform all relevant stakeholders at each approval process stage. By sending email notifications to all parties, you minimize the risk of oversights or miscommunication and ensure a smoother approval process.

Enable email notifications for each approval gate

  1. From the application left navigation area, select Administration.

  2. From the top navigation bar, select Master Data Management.

  3. Scroll or search to locate Setting Boolean and select it from the list.

  4. Scroll or search to locate 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 current gate approves the quote or agreement under negotiation.

    SettingNotificationsToPreviousGatesRolesOnQuoteRejection

    Enables sending rejection notification emails to all users or roles involved in previous gates when the current gate rejects the quote or agreement under negotiation.

    SettingNotificationsToUsersInvolvedInPreviousGates

    Sends approval or rejection notification emails only to the users involved in previous gates.

    SettingNotificationsToSameGateUsersOnQuoteApproval

    Sends approval notification emails to other users at the same gate when someone approves the quote or agreement under negotiation.

    SettingNotificationsToSubmitteronEveryGatesofQuoteApproval

    Sends notification emails to the submitter for each quote or agreement under negotiation approval gate.

  5. Select Save.

Provide a new email template for each specific approval action

Tip

Customers can modify the template's content (only its value, the key remains the same) according to their business needs and add additional information to the approval email.

Email notification templates

Quotes

Notify users at the next approval gate about the quote approval request

workItem.approval.needed.title           = Approval required for ${doc.type} "${doc.objectName}"
workItem.approval.needed.content         = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>${sender.firstName} ${sender.lastName} just submitted a quote which requires your review and approval. The quote expires on <span style="color:#ec7404;font-weight:bold;">${doc.salesDocumentDateOfExpiry}</span> and therefore immediate attention is needed!<br><table><tbody><tr><td style="width:150px;">Quote ID:</td><td>${doc.quoteId}</td></tr><tr><td style="width:150px;">Name:</td><td>${doc.objectName}</td></tr><tr><td style="width:150px;">Quote Value:</td><td>${doc.hasCurrency.objectERPId} ${doc.includesDocumentHeaderPriceItem.documentHeaderPrice}</td></tr><tr><td style="width:150px;">Account:</td><td>${doc.quoteContainedBy.objectName}</td></tr><tr><td style="width:150px;">Effective Date:</td><td>${doc.quoteEffectiveDate}</td></tr><tr><td style="width:150px;">&nbsp;</td><td>&nbsp;</td></tr><tr><td style="width:150px;"><span style="background-color:#ffffff;color:#339966;">&nbsp;</span></td><td><span style="color:#339966;background-color:#ffffff;"><strong> </strong></span></td></tr><tr><td style="width:150px;">Approval Rule:</td><td><strong>${approval.rule}</strong></td></tr><tr><td style="width:150px;">Approval Reason:</td><td><strong>${approval.reason}</strong></td></tr></tbody></table><br>You can review the quote <a href="${doc.url}">here</a> or approve / reject using the below buttons:<br><br>${approvalButtons}<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify that the quote has been approved

workItem.approval.approved.title         = ${doc.type} "${doc.objectName}" is approved
workItem.approval.approved.content       = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>Your quote "${doc.objectName}" was approved. Please review the document <a href="${doc.url}">here</a>.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the next approval gate that the approval request has been canceled

workItem.approval.cancelled.title        = Approval request cancelled for ${doc.type} "${doc.objectName}"
workItem.approval.cancelled.content      = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>The request for your approval of ${doc.type} "${doc.objectName}" was cancelled.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify that the quote has been rejected

workItem.approval.rejected.content       = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>Your quote "${doc.objectName}" was rejected. Please review the document <a href="${doc.url}">here</a>.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify the submitter that the quote has passed the approval gate

The submitter receives an email for each successful gate of the quote approval.

workItem.approval.approved.title.submitter    = Quote Approval Update : Gate ${doc.gateName} Completed for Quote ${doc.quoteId}
workItem.approval.approved.content.submitter  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We wanted to inform you that your quote  <a href="${doc.url}"> ${doc.quoteId}</a> has successfully passed the approval gate. <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> Quote ID : <a href="${doc.url}">${doc.quoteId}</a><br> Current Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Please be aware that the quote will proceed to the next gate of approval.<br><br>Thank you for your patience.<br><br> Best regards,<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at previous gates that the quote has been approved

workItem.approval.approved.title.previous    = Quote ${doc.quoteId} Approved at Gate ${doc.gateName}
workItem.approval.approved.content.previous  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We are pleased to inform you that the quote <a href="${doc.url}"> ${doc.quoteId}</a> has been approved at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> Quote ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Thank you for your contribution to this process.<br><br> Best regards,<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at previous gates that the quote has been rejected

workItem.approval.rejected.title.previous    = Quote ${doc.quoteId} Rejected at Gate ${doc.gateName}
workItem.approval.rejected.content.previous  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We regret to inform you that the quote <a href="${doc.url}"> ${doc.quoteId}</a> has been rejected at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> Quote ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Rejected By : ${sender.firstName} ${sender.lastName}<br> Rejected Reason : ${doc.rejectReason}<br><br> The quote will not proceed further unless resubmitted for review. Please review the notes for further details.<br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the same gate that the quote has been approved

workItem.approval.approved.title.sameGate    = Update on Quote ${doc.quoteId} Approved at Gate ${doc.gateName}
workItem.approval.approved.content.sameGate  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> This is to notify you that the quote <a href="${doc.url}"> ${doc.quoteId}</a> has been approved <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> Quote ID: <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Please review the quote details and take any necessary actions as required for your role. <br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the same gate that the quote has been rejected

workItem.approval.rejected.title.sameGate = Update on Quote ${doc.quoteId} Rejected at Gate ${doc.gateName}
workItem.approval.rejected.content.sameGate = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> This is to notify you that the quote <a href="${doc.url}"> ${doc.quoteId}</a> has been rejected at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> Quote ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Rejected By : ${sender.firstName} ${sender.lastName}<br> Rejected Reason : ${doc.rejectReason}<br><br> Please review the quote details and take any necessary actions as required for your role.<br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Agreements under negotiation

Notify users at the next approval gate about the agreement approval request

workItem.approval.agreement.negotiation.needed.title           = Approval required for Agreement "${doc.objectName}"
workItem.approval.agreement.negotiation.needed.content         = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>${sender.firstName} ${sender.lastName} just submitted an agreement which requires your review and approval. The agreement expires on <span style="color:#ec7404;font-weight:bold;">${doc.salesDocumentDateOfExpiry}</span> and therefore immediate attention is needed!<br><table><tbody><tr><td style="width:150px;">ID:</td><td>${doc.quoteId}</td></tr><tr><td style="width:150px;">Name:</td><td>${doc.objectName}</td></tr><tr><td style="width:150px;">Value:</td><td>${doc.hasCurrency.objectERPId} ${doc.includesDocumentHeaderPriceItem.documentHeaderPrice}</td></tr><tr><td style="width:150px;">Account:</td><td>${doc.quoteContainedBy.objectName}</td></tr><tr><td style="width:150px;">Effective Date:</td><td>${doc.quoteEffectiveDate}</td></tr><tr><td style="width:150px;">&nbsp;</td><td>&nbsp;</td></tr><tr><td style="width:150px;"><span style="background-color:#ffffff;color:#339966;">&nbsp;</span></td><td><span style="color:#339966;background-color:#ffffff;"><strong> </strong></span></td></tr><tr><td style="width:150px;">Approval Rule:</td><td><strong>${approval.rule}</strong></td></tr><tr><td style="width:150px;">Approval Reason:</td><td><strong>${approval.reason}</strong></td></tr></tbody></table><br>You can review the agreement <a href="${doc.url}">here</a> or approve / reject using the below buttons:<br><br>${approvalButtons}<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify that the agreement has been approved

workItem.approval.agreement.negotiation.approved.title         = Agreement "${doc.objectName}" is approved
workItem.approval.agreement.negotiation.approved.content       = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>Your Agreement "${doc.objectName}" was approved. Please review the document <a href="${doc.url}">here</a>.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the next approval gate that the approval request has been canceled

workItem.approval.agreement.negotiation.cancelled.title        = Approval request cancelled for Agreement "${doc.objectName}"
workItem.approval.agreement.negotiation.cancelled.content      = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>The request for your approval of Agreement "${doc.objectName}" was cancelled.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify that the agreement has been rejected

workItem.approval.agreement.negotiation.rejected.content       = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br>Your agreement "${doc.objectName}" was rejected. Please review the document <a href="${doc.url}">here</a>.<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify the submitter that the agreement has passed the approval gate

The submitter receives an email for each successful gate of the agreement approval.

workItem.approval.agreement.negotiation.approved.title.submitter    = Agreement Approval Update : Gate ${doc.gateName} Completed for Agreement ${doc.quoteId}
workItem.approval.agreement.negotiation.approved.content.submitter  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We wanted to inform you that your agreement <a href="${doc.url}"> ${doc.quoteId}</a> has successfully passed the approval gate. <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> ID : <a href="${doc.url}">${doc.quoteId}</a><br> Current Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Please be aware that the agreement will proceed to the next gate of approval.<br><br>Thank you for your patience.<br><br> Best regards,<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at previous gates that the agreement has been approved

workItem.approval.agreement.negotiation.approved.title.previous    = Agreement ${doc.quoteId} Approved at Gate ${doc.gateName}
workItem.approval.agreement.negotiation.approved.content.previous  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We are pleased to inform you that the agreement <a href="${doc.url}"> ${doc.quoteId}</a> has been approved at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Thank you for your contribution to this process.<br><br> Best regards,<br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at previous gates that the agreement has been rejected

workItem.approval.agreement.negotiation.rejected.title.previous    = Agreement ${doc.quoteId} Rejected at Gate ${doc.gateName}
workItem.approval.agreement.negotiation.rejected.content.previous  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> We regret to inform you that the agreement <a href="${doc.url}"> ${doc.quoteId}</a> has been rejected at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Rejected By : ${sender.firstName} ${sender.lastName}<br> Rejected Reason : ${doc.rejectReason}<br><br> The agreement will not proceed further unless resubmitted for review. Please review the notes for further details.<br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the same gate that the agreement has been approved

workItem.approval.agreement.negotiation.approved.title.sameGate    = Update on Agreement ${doc.quoteId} Approved at Gate ${doc.gateName}
workItem.approval.agreement.negotiation.approved.content.sameGate  = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> This is to notify you that the agreement <a href="${doc.url}"> ${doc.quoteId}</a> has been approved <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> ID: <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Approved By : ${sender.firstName} ${sender.lastName}<br><br> Please review the agreement details and take any necessary actions as required for your role. <br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

Notify users at the same gate that the agreement has been rejected

workItem.approval.agreement.negotiation.rejected.title.sameGate = Update on Agreement ${doc.quoteId} Rejected at Gate ${doc.gateName}
workItem.approval.agreement.negotiation.rejected.content.sameGate = <body bgcolor="#F7F1E8">Dear ${user.firstName},<br><br> This is to notify you that the agreement <a href="${doc.url}"> ${doc.quoteId}</a> has been rejected at the gate <strong> ${doc.gateName}</strong>.<br><br> <strong> Details: </strong><br> ID : <a href="${doc.url}">${doc.quoteId}</a><br> Gate : ${doc.gateName}<br> Rejected By : ${sender.firstName} ${sender.lastName}<br> Rejected Reason : ${doc.rejectReason}<br><br> Please review the agreement details and take any necessary actions as required for your role.<br><br> Best regards,<br> <br><br><span style="color:#FBB116;font-weight:bold;font-style:italic;">In Mind Cloud </span><i>Digital Sales Platform</i><br><div><img src="${baseURL}/images/email_logo.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="${baseURL}">here</a></div> </body>

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;


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.