Overview

Subject: This Tutorial demonstrates how to create a rule that prevents a milestone from being created multiple times.
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 in order to create milestones on only the desired results.
If you create a rule to detect when the customer has their first 100 logins within 90 days of launch, this rule will continue to detect this state each time it runs and create duplicate milestones. This tutorial uses a checkbox to flag this condition, so the rule doesn’t create a duplicate milestone.
Complexity: Medium
Description: Create a field to indicate who has a milestone, then create a rule that follows up to prevent duplicate milestones from being created.
Challenges: In this tutorial the term Go Live! is used. Go Live! refers to the first time that 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 Milestones
  4. Enhance Rule for Setting Milestones

At a high-level, the steps you'll take are:

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

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. Leave the defaults in place for Rule Type (Custom) and Rule For (Account).

3. Enter the rule name, such as “Admin: Milestone Go Live!”.

4. (Optional) Enter a rule Description.

5. Click Next.

6. Select the Usage Data object.

7. Add to Show:

  • Account::ID
  • Account::Account Name
  • Usage Data:: Logins (Change to Count of Logins)
  • Customer Info:: Orig. Contr. Date

8. 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)

9. Click Next.

10. Click +Action and select Load to Milestones.

11. Select Rule Date.

12. Select Go Live! or other Milestone name.

13. (Optional) Enter comments to help describe the milestone's purpose.

14. Click Save.

Step 2 - Create a Custom Field

For this step, we have to create a field that will allow a rule to check if a milestone was already created.

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).

3. In Data Type, select Checkbox, and click Next.

4. For Field Label, enter “Has Go Live! Milestone”.

5. (Optional) Enter a description and click Next.

6. Set field-level access as appropriate and click Next.

7. Click Save.

Step 3 - Create Rule to Check for Milestone

1. Go to Administration > Rules

2. Click +Rule.

3. Leave the defaults in place for Rule Type (Custom) and Rule For (Account).

4. Enter the rule name, such as “Check for Go Live! Milestone”.

5. (Optional) Enter a rule Description.

6. Click Next.

7. Select Milestone as the source object.

8. In Show, add Account::Id.

9. In Filters, add Milestone::Milestone Name contains “Go Live!”

10. Click Next.

11. Click +Action and select Load to Customers.

12. Under Field Mappings, map Account ID to “Account (string)”.

13. Click +Field mapping, and set custom mapping to “Has Go Live! Milestone (BOOLEAN).

14. 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:

  • In Show, add “Customer Info::Has Go Live! Milestone”
  • In filters, add “Customer Info::Has Go Live! Milestone" not equal to (check the checkbox)

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

Be sure that the “Does Customer have Go Live! Milestone” rule runs before the “Admin: Milestone Go Live!” rule.