This tutorial walks you through the process of creating a Bionic rule that automatically fills a Date field when a milestone is applied to a CTA. For the purpose of this tutorial, we use a custom field called Last EBR Date and fill it with the date when a milestone is created.

Perform the following steps to update an EBR date:

  1. Create a Custom Field (Date field)
  2. Give permissions to Date object
  3. Create a Rule with Milestone Date
  4. Configure Rule by using Advanced Logic (Optional)

Create Custom Field (Date field)

In this step, create a custom field in SFDC Account object - call it “Last EBR Date”.

To create the Custom Field, perform the following steps:

  1. Click the dropdown on your name to navigate to the Object Page.
  2. Click Setup.

Step 1-Custom Field.png

  1. Type Objects in the quick find box.
  2. Click Customize.

Step 2-Custom Field.png

  1. Scroll down and click Accounts
  2. Click Fields.

Accounts and Fields.png

  1. Scroll down until Account Custom Fields & Relationships is visible.
  2. Click New.

Custom Fields and Relationships.png

  1. Scroll down and click Date.
  2. Click Next.

Date Field.png

  1. Type in an appropriate Field Label.
  2. Field Name is auto populated after clicking in the field.
  3. Provide description in Description (optional) area.
  4. Click Next.

Enter the Details.png

  1. Depending on the desired access levels, the Field-Level Security settings may be changed.
  2. Click Next.

Field Security.png

  1. Verify all information is correct.
  2. Select the required Page Layout Name(s).
  3. Click Save.

Add Page Layouts.png

Give Permissions to Date Object

In this procedure, we are providing the Admin access to the ID and Date object, to use them in the Rules Engine. The ID object is used as an identifier for the Date object.  

Note: You can access the Settings area only if the permission set called Gainsight Special is added to your user’s profile.  

  1. Navigate to Administration > Rules Engine.
  2. Click Rules Settings.


  1. In the Permissions (Load Actions) section, Click Add Object.
  2. Select Native Data and Account object. The list of available fields are displayed.
  3. Select ID and EBR Date fields checkboxes.
  4. Click SAVE.

Create a rule with Milestone Date

After providing permissions to Account ID and Date objects, create a rule with Milestone as the source object.

Name the Rule

Rule Type: Select Bionic.

  1. Rule For: Select Account.
  2. Rule Name: Update EBR Date by Milestone Date
  3. Folder: Select a folder for the rule.
  4. Description: < Something denoting intent of the rule>
  5. Click NEXT. Setup Rule page appears.
  6. Navigate to Administration > Rules Engine.


Setup Rule

  1. Select Salesforce as the data source.
  2. Select Milestone as the source object.
  3. Add the following fields to the Show fields section:
  • Milestone :: Milestone Created Date
  • Milestone :: Account
  • Milestone :: Milestone Name
  1. In the Filter section, set Milestone :: Milestone Created Date | equals | Rule Date.
  • If the rule is scheduled to run Daily, then the above condition is applicable.
  • If the rule is scheduled to run weekly, then filter must be Milestone Create Date greater Subtract N days Rule Date = 7.
  1. Click SAVE.

Setup Rule.png

Setup Action

  1. Click + ACTION and select the dataset.
  2. Select Load to SFDC Object for the Action Type.
  3. The following three  fields will auto populate (Created from the "Show" section on Rule Setup).
  • Milestone Created Date (Date)
  • Account (REFERENCE)
  • Milestone Name (Text)
  1. Map the following fields as:
  • Milestone Created Date (DATE)  → Last EBR Date (DATE)
  • Account (REFERENCE)  → Id (ID)
  1. Click SAVE and run the rule.

Gainsight recommends running the rule at the end of the day.

Setup Action.png

Configure rule using Advanced Logic

If you have multiple milestone dates, you can use the Filters section while setting up a rule. For more information on creating a new rule, refer to the Create a New Rule article. Once the filters are configured, you can use the Advanced Logic section to apply logic to those filters.

Filter on Milestone Created Date:

  • For instance, if you need to fetch only Opportunity Won, then you need to add an AND Filter: A AND B.
  • If you need to fetch multiple milestone dates, then you can add OR Filter: A AND ( B or C).
  • Here B, C are filters on Milestone Name.
Advanced Logic_ Filters (A AND B).png

Setting Dates for Past Milestones

If you want to fetch all the milestones for the past one year, then it is not recommended to use this tutorial. It is suggested to edit the rule to fetch all the milestones created in a month and run for historical runs for last year, this way you will run the rule 12 times an year. On completion of the rule run, change the rule to daily scenario (that means milestone created date = RuleDate) and schedule to run daily (time stamp end of the day).

Rule Configuration to fetch all the Milestones created in a month

A: Milestone Created Date greater or equal First Day of Current Month

B:  Milestone create date less or equal Last Day of Current Month.

(A  AND B) AND ( C OR D OR …)

Here C, D  are filters on milestone names.

Schedule this rule:

  • Choose Monthly
  • On Day 1st of Every Month
  • Start Date: Your Choice
  • End Date: Today’s Date.
  • Time Zone: Your Choice.
  • Select for historical runs.

After the rule is scheduled, change filters to fetch milestones daily (Milestone created Date = RuleDate) and schedule to run daily.