Overview
This tutorial demonstrates how to create a rule that prevents creation of duplicate milestones. 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. For example, 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.
Note: 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!
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.
- Go to Administration > Rules Engine > Create Rule.
- Select Rule Type as Bionic and Rule For Account. For more information on Bionic Rules, refer to Getting Started with Bionic Rules.
- Enter the rule name. For example, Milestone Go Live!
- Select a folder for the rule.
- Enter a rule Description (Optional).
- Click NEXT to navigate to the Setup Rule screen.
- Click DATASET to enter the task details:
- Enter the task name. For example, Milestone Go Live
- Task Description (Optional)
- Output Dataset Name
- Select Salesforce as the data Source.
- Select Usage Data as the source object.
- Add the following fields to the Show section:
- Usage Data::Account
- Usage Data::Account Name
- Usage Data::Id
- Customer Info::Orig. Contr. Date
- Usage Data::Unique_Logins (Change to Count of Unique_Logins)
- Add the following fields to the Filters section:
- Usage Data:: Unique 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 Date (enter the amount of days to check)
- Click SAVE to save the task details or click CANCEL.

- Click +ACTION and select Load to Milestones Action Type.
- Select the Rule Date.
- Select the Milestone name.
- Enter comments to help describe the milestone's purpose (Optional).
- Click SAVE.
Create a Custom Field
Create a field that allows a rule to check if a milestone already exists.
- Click your name > Setup > Create > Objects > click the Customer Info object.
- Scroll to Custom Fields & Relationships, and click New to create a new field.

- In Data Type, select Checkbox, and click Next.
- For Field Label, enter Has Go Live milestone.
- (Optional) Enter a description and click Next.

- Set field-level access as required and click Next.
- Click Save.
Create Rule to Check for Milestone
- Navigate to Administration > Rules.
- Click Create Rule.
- Select Rule Type as Bionic and Rule For Account.
- Enter the rule name. For example, Has Go Live! Milestone.
- Select a folder for the rule.
- Enter a rule Description (Optional).
- Click NEXT.
- Click DATASET TASK to enter the task details:
- Enter the task name. For example, Has Go Live
- Task Description (Optional)
- Output Dataset Name
- Select Salesforce as the data Source.
- Select Milestone as the source object.
- In Show, add Milestone::Account.
- In Filters, add Milestone::Milestone Name contains Go Live.
- Click SAVE to save the task details.

- Navigate to Setup Action.
- Click +ACTION.
- Select Action Type as Load to Customers.
- Under Field Mappings, map Account ID to Account (REFERENCE).
- Click +FIELD MAPPING, and set custom mapping to Has Go Live Milestone (BOOLEAN).
- Click SAVE. Schedule & Run the rule.
Enhance Rule for Setting Milestones
After completing the above steps, you can edit and add enhancements to the Milestone Go Live! Rule. 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.
Be sure to run the Does Customer have Go Live! Milestone rule prior to Milestone Go Live!