Overview

Subject: This tutorial demonstrates how to create a rule that prevents creation of duplicate milestones.
Scenario: This tutorial exists because there is the possibility to have duplicate milestones created. With the creation of milestones it is always recommended to start general, and then filter down as much as you can to create milestones on only the required results.
If you create a rule to detect the customer's first 100 logins within 90 days of launch, this rule will continue to detect this state each time it runs and creates duplicate milestones. This tutorial uses a checkbox to flag this condition, to prevent creation of a duplicate milestone.
Complexity: Medium
Description: Create a field to indicate whether a milestone exists or not, then create a rule that follows up to prevent creation of duplicate milestones.
Challenges: In this tutorial the term Go Live! is used. Go Live! refers to the first time a customer gains value using the product. If you use a different milestone name, it can be substituted for the use of Go Live!
Required Permissions: SFDC Admin Rights
Approach:
  1. Create or Review Rule for Setting Milestones
  2. Create a Custom Field
  3. Create Rule to Check for Milestone
  4. Enhance Rule for Setting Milestones

At a high-level, the following are the required steps:

  1. Create or Review Rule for Setting Milestones
  2. Create a Custom Field
  3. Create Rule to Check for Milestone
  4. Enhance Rule for Setting Milestones

Step 1 - Create or Review Rule for Setting Milestones

Milestone_Dupe_1.png

In order for this tutorial to work, a rule that creates milestones must exist. If your org already has a rule that creates milestones for “Go Live!, then skip this step.

  1. Go to Administration > Rule > + Rule.
  2. Select Rule Type as Bionic and Rule For Account. For more information on Bionic Rules, refer to Getting Started with Bionic Rules.
  3. Enter the rule name. For example, Admin: Milestone Go Live!
  4. (Optional) Enter a rule Description.
  5. Click NEXT to navigate to the Setup Rule screen.
  6. Click DATASET TASK to enter the task details:
  • Task Name
  • (Optional) Task Description
  • Output Dataset Name
  1. Select the Usage Data object.
  2. Add to Show:
  • Account::ID
  • Account::Account Name
  • Usage Data:: Logins (Change to Count of Logins)
  • Customer Info:: Orig. Contr. Date
  1. Add Filters:
  • Usage Data:: Logins greater or equal 100 (enter the amount of logins to check)
  • Customer Info: Orig. Contr. Date greater or equal Subtract N Days from Rule 9 (enter the amount of days to check)
  1. Click SAVE to save the task details or click CANCEL.
Milestone_Dupe_2.jpg
  1. Click +ACTION and select Load to Milestones Action Type.
  2. Select Rule Date.
  3. Select the Milestone name.
  4. (Optional) Enter comments to help describe the milestone's purpose.
  5. Click SAVE.

Step 2 - Create a Custom Field

Create a field that allows a rule to check if a milestone already exists.

  1. Click your name > Setup > Create > Objects > click the Customer Info object.
  2. Scroll to Custom Fields & Relationships, and click New to create a new field.
Milestone_3.jpg
  1. In Data Type, select Checkbox, and click Next.
  2. For Field Label, enter Has Go Live milestone.
  3. (Optional) Enter a description and click Next.
Milestone_4.jpg
  1. Set field-level access as required and click Next.
  2. Click Save.

Step 3 - Create Rule to Check for Milestone

Milestone_8.jpg
  1. Navigate to Administration > Rules.
  2. Click +RULE.
  3. Select Rule Type as Bionic and Rule For Account.
  4. Enter the rule name. For example, Has Go Live! Milestone.
  5. (Optional) Enter a rule Description.
  6. Click NEXT.
Milestone_5.jpg
  1. Select Milestone as the source object.
  2. In Show, add Account::Id.
  3. In Filters, add Milestone::Account Name contains Go Live
  4. Click SAVE to save the Task details.
Milestone_6.jpg
  1. Navigate to Setup Action.
  2. Click +ACTION.
  3. Select Action Type as Load to Customers.
  4. Under Field Mappings, map Account ID to Account (REFERENCE).
  5. Click +FIELD MAPPING, and set custom mapping to Has Go Live Milestone (BOOLEAN).
  6. Click SAVE. Schedule & Run the rule.

Step 4 - Enhance Rule for Setting Milestones

After completing the above steps, you can edit and add these enhancements to the Admin: Go Live! Milestone rule:

Milestone_7.jpg
  • In Show, add Customer Info::Has Go Live Milestone
  • In filters, add Customer Info::Has Go Live Milestone not equal to and select the checkbox

For tips and information on how to schedule a rule, see the Scheduling Rules article.

Ensure to run the Does Customer have Go Live! Milestone rule prior to Admin: Milestone Go Live!