How do I enable email notifications to monitor milestones?

You can configure email notications to warn required teams and managers that a milestone is about to expire, or email notifcations can be used to escalate a service request when a milestone expires.

After you set up the scheduled process, you can configure object workflows to perform actions when a milestone's WarnedFlag is set to Y or ComplianceFlag is set to N (when the milestone expires).

  1. Sign in to the application as an administrator.

  2. Navigate to Application Composer and then click Common Setup > Email Templates. The Email Templates page is displayed.

  3. Click Create to create a new template. The Create Email Template page is displayed.

  4. From the Object drop-down list, select Milestone.

  5. Specify the Name, Email Subject, and Email Body for the content of the email you want to send.

  6. Click Save and Close.

  7. After you create the template, Click Navigator > Configuration > Sandboxes.

  8. Select and enter a sandbox.

  9. In Application Composer select CRM Cloud in the Application drop-down list, and then select Service as the Object Tags option.

  10. Click Object Workflows. The Object Workflows page is displayed.

  11. Click Create to create a new object workflow. The Create Object Workflow page is displayed.

  12. From the Object drop-down list, select Milestone.

  13. Enter the Name and Description for the object workflow.

  14. Specify the Event Point and Condition for the milestone object workflow.

    For example, to trigger a workflow action when the WarnedFlag is set to Y:

    1. For the Event Point option, select When a record is updated.

    2. In the Condition field, enter the following expression:

      if (isAttributeChanged('WarnedFlag') && WarnedFlag=='Y')

      return true;

  15. Select the action you want to perform as part of the workflow. You can set up Email Notification and Field Updates for the milestone.

    1. In the Email Notification section, click Create to add a new notification.

    2. Specify the schedule and addresses to which you want to send the notifications.

    3. Click Save to save the milestone object workflow.

  16. Republish the sandbox in which you created the object workflow.

You can create a script for specific aspects of the workflow, such as looking up the assignee and assignee manager details for sending the notification. Here's an example script you can use to get the assignee and assignee manager details and populate the Address field for the email notification.

def resourceVO = newView('Resource')
resourceVO.appendViewCriteria("PartyId = ${AssigneePartyId}")//party id of SR assignee
resourceVO.executeQuery()
def mgrPartyId
while (resourceVO.hasNext()) {
  def curResourceRow = resourceVO.next()
  mgrPartyId = curResourceRow.ManagerPartyId
  }
return mgrPartyId
if (mgrPartyId != null) {
def resourceMgrVO = newView('Resource')
resourceMgrVO.appendViewCriteria("PartyId = ${mgrPartyId}")
resourceMgrVO.executeQuery()
def mgrEmailId
while (resourceMgrVO.hasNext()) {
  def curResourceMgrRow = resourceMgrVO.next()
  mgrEmailId = curResourceMgrRow.EmailAddress
  }
return mgrEmailId
}