Tutorial Overview

Subject: This tutorial demonstrates a common situation where gaps are found in Usage Data and how to resolve and avoid them.
Scenario:
  • Data is loaded from a Custom Object or the MDA for a period of time. The History section of C360 displays gaps in data; the graph displayed is not contiguous. Usage data rules may create these gaps because they have NULL values. The administrator wants to make data more presentable by filling gaps.
Complexity: Hard
Description: Replace NULL or missing values with zero values.
Challenges: An initial "cleanup" step and reload of usage data is required.
Approach:
  1. Create a Rule which sets Usage Data metrics over a particular range to zero
  2. Run this rule over historical values - for a relevant date range
  3. Schedule this rule to execute weekly to avoid gaps caused by NULL/Missing values

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
  • BEST PRACTICE:  If you are simulating this tutorial you should load from either a Custom Object, or from the MDA.
  • CAUTION:  Be careful not to overwrite pre-existing data.  If your source data is securely stored in a Custom Object or the MDA data should be safe.

Step 1 - Gaps Found in Data

Step 1 - Gaps Found in Data

The above image shows data for which there are obvious gaps.  Gaps are caused by missing data (NULLs).  

Step 2 - The "All Zeros Rule"

To avoid gaps in data upon load, Best Practice is to load zero values to the date range of interest.

Step 2a - Create New Rule

Step 2a - Create New Rule

Create a New Rule with the following parameters:

  • Rule Type: Custom
  • Rule Name:  Admin: Weekly Usage Data Zero
  • Description: Load zero values at the beginning of the week for the date range of interest
  • Show:  Account::Id, Account::Account Name, Account::Customer Info, Account::Customer Info Name
  • Filters:  
    • Account::Customer Info / not equal to / Check (NULL)
    • Account::Account Name / equals / Wallys World

NOTE:  This tutorial is restricted to the Account "Wallys World" to avoid zeroing other data.

Step 2b - Create Load to Usage Action

Step 2b - Create Load to Usage Action

Create a new Load to Usage Action with mappings similar to the above image.

Important step is to set desired fields to zero.  In the above Page Views and Total Logins are added as Custom Fields and set to zero.

Step 2c - Schedule the Initial Load Zeros Rule

Step 2c - Schedule the Initial Load Zeros Rule

To perform an initial "all zeroes" load, you'll need to schedule the rule as follows:

  1. This will run on a Weekly basis
  2. Schedule for start of the week (typically Sunday).  Refer to your usage configuration to confirm.
  3. For the first load, choose a data range
  4. Start time should be the very start of the day (00 Hrs / 05 Mins)
  5. Check "Run for historical periods"
  6. Click "Start" to initiate

Step 2d - First Run (for Historical Periods)

Step 2d - First Run (for Historical Periods)

As "Run for historical periods" was selected, a confirmation screen is displayed.

NOTE:  This immediately executes the rule.

Step 2e - Edit/Confirm Schedule

Step 2e - Edit/Confirm Schedule

When the rule has executed, confirm dates going forward.  The End Date is not required.

NOTES:  

  • As this has been scheduled to run for historical periods, the "Run for historical periods" checkbox is unchecked to avoid overwriting data.
  • Going forward, this rule will run each week and place zero values for fields defined within the rule.

Step 2f - Values at Zero

Step 2f - Values at Zero

Once the rule has executed, data will now be zeroed for each value specified.

Step 3 - Reload Data

Once all zero values have been loaded to appropriate accounts, reload data from the source.

Again, this may be either a Custom Object or the MDA.

Step 4 - Confirm

Step 4 - Confirm

After executing the rule, data now is contiguous.  No gaps in data are present for the desired period.

As mentioned above, if the Load Zero Values rule is scheduled to execute as the first step each week zero values will always be loaded, then overwritten with actual values.   In the case there are no values for a week all data will be set to zero; no gaps or NULL values will be apparent.