Tutorial Overview

Subject: This use case demonstrates how NULL values can affect results which Rules Engine produces and how to address them.
Scenario: It may be important to ensure that each account has at least one sponsor that will show up under the Customer 360 View. Creating a single rule and looking at the "Sponsor Tracking" object only displays information about customers who have sponsors identified.
Complexity: Easy
Description: Create a checkbox field within SFDC to use for detecting customers without sponsors
Challenges: Access to create new fields in SFDC is required
Approach:
  1. Create new custom field (checkbox) in SFDC
  2. Check if sponsor has been identified
  3. Create CTA for customers without sponsors
  4. On a scheduled basis, look for changes

Notes and Tips

General:

  • This tutorial is presented for educational purposes only.
  • Always test your rules before running them in a production environment.
  • Understand your Salesforce environment before performing any operations which may affect your data.
  • IMPORTANT: This tutorial requires administrative access to Salesforce.com (SFDC).

Step 1 - Create Custom Field (Checkbox)

Within SFDC, create a Custom Field in Customer Info - call it “Customer Has Sponsor”.  This will provide a placeholder to tie back to the Sponsor Tracking object and detect Accounts for which there are no sponsors.

To create the Custom Field, perform the following steps:

  • Under SFDC, select Setup >> Create >> Object:
  • Click “Customer Info”
  • Under “Custom Fields
    • Click “New”
  • Step 1: Under New Custom Field
    • Select “Checkbox”
    • Click “Next”
  • Step 2: Enter the Details
    • Field Label = “Customer Has Sponsor”
    • Default Value = Unchecked
    • Field Name = “Customer_Has _Sponsor” (Will auto-populate)
    • Description:  
    • Click “Next”
  • Step 3: Establish field-level security
    • Per your company’s guidelines, select the appropriate level of permissions
  • Step 4:
    • Finalize/Save
    • The field should be saved and visible

NOTE: If the field does not become visible in Step 3 (below), log out/back into Salesforce.

Step 2 - Identify Customers with Sponsors

Create New Rule - Admin: Sponsor Check

Create a new rule:

  • Rule Type:  Custom
  • Rule Name: Admin: Sponsor Check
  • Description: <Something denoting intent of the rule>

 

In the Show Field Select:

  • Account::Id
  • SponsorTracking::COUNT_DISTINCT of Account
  • SponsorTracking::Account Name

Click "Next"

Create New Action

Create the following Action:

  1. Action Type:  Load to Customers
  2. Account::Id -> Account(string)
  3. Create a new Custom field.  From the drop-down list, select "Customer Has Sponsor (BOOLEAN)"
  4. Click +Criteria
    • Add:  SponsorTracking::COUNT_DISTINCT of Account / greater or equal / value / 1

This will identify all accounts where there is one or more sponsors and check the checkbox for "Customer Has Sponsor".

Run the Rule

Run the rule and confirm that it correctly identifies accounts that have sponsors.  In this case only two accounts were identified.

Step 3 - Create Rule that Generates CTAs for Accounts Without Sponsors

Once the "Admin: Sponsor Check" has executed, the checkbox fields in the Customer Info object will be updated correctly with a value of "true" for those accounts meeting the criteria.

Sponsor information is now available and can be leveraged with second rule that will detect and notify a CSM for customers that have no Sponsor identified.

Create New Rule - Detect Customers With No Sponsor

Create a new rule:

  • Rule Type:  Custom
  • Rule Name: Detect Customers With No Sponsor
  • Description: <Something denoting intent of the rule>

 

In the Show Field Add:

  • Account::Id
  • Account::Account Name
  • Customer Info::Customer Has Sponsor
  • Account::CSM

In Filters:

Customer Info::Customer Has Sponsor / equals / "unchecked"

Click "Next"

Create New Action - CTA

Create a new action:

  1. Action Type:  Call to Action
  2. Create CTA
  3. Name:  ${Account::Account Name} Has No Sponsors Identified   (Use the @ sign to see tokenization options)
  4. Priority:  Low
  5. Type:  Risk
  6. Status:  New
  7. Reason:  Adoption Issues
  8. Owner Field:  <Usually your CSM>
  9. Due Date:  <Your preference>
  10. Default Owner:  <Again, your preference>
  11. Comments:  The customer ${Account::Account Name} has no sponsor(s) identified.  Please review and add to the account.

Click "Save" to save the rule.

Run the Rule

Run the rule.  CTAs should be created correctly.

NOTE:  This may produce a number of CTAs.  Know your data and perform a test run to understand impact. 

Step 4 - Additional Rule and Scheduling

Prior to scheduling, one more rule should be created which:

  • Will "uncheck" all checkboxes on the Customer Info object.
  • Is run prior to the "Admin: Sponsor Check" rule

This will ensure that if a sponsor is removed from an account, the previous scripts will detect and notify correctly.

Create New Rule - Admin: Uncheck "Has Sponsor" Checkbox for All Accounts

In the Show Field Add:

  • Account::Id
  • Account::Account Name
  • Customer Info::Customer Has Sponsor

Create new Action

Create the following Action:

  1. Action Type:  Load to Customers
  2. Account::Id -> Account(string)
  3. Create a new Custom field.  From the drop-down list, select "Customer Has Sponsor (BOOLEAN)"
  4. Leave the checkbox unchecked (denoting NULL)

This will identify all accounts where there is one or more sponsors and check the checkbox for "Customer Has Sponsor".

This rule should be scheduled to run BEFORE the other rules above.

Using Rule Chains

Rule Chains enable you to group related rules and apply a shared schedule. For more information on Rule Chains, click here. The following instructions describe how to group the rules you created above into a rule chain.

 

In the previous steps, three rules were created which use a checkbox field on the Customer Info object to indicate which customers have no sponsors.  This is important, as querying against the “Sponsor Tracking” object only displays results for customers which have sponsors.

1. Click the Rule Chain view.

Create Rule Chain

2. Enter a Name and (optional) Description for the Rule Chain.

3. Click Create.

Add Rules to the Rule Chain

1. Select the first rule.

2. Click the "+" button to the right to nest the rules according to the screenshot above.

        a. Admin: Uncheck "Has Sponsor" Checkbox for All Accounts

                 1. This clears the checkbox across all accounts

        b. Admin: Sponsor Check

        c. Detect Customers With No Sponsor

3. Click Save, and procede to Schedule.

Schedule the Rule Chain

In the Schedule dialog box, set your preferred schedule and click "Create".

Completed rule chain

Each rule chain displays as a card. You can edit the rule chain and turn the status ON/OFF.