Notes and Tips
- This tutorial is presented for educational purposes only
- Always test the rules before running them in a production environment
- Understand the Salesforce environment before performing any operations that may affect your data
- BEST PRACTICE: If you are simulating this tutorial you must load from either a Custom Object, or from MDA.
- CAUTION: Ensure not to overwrite pre-existing data. If the source data is securely stored in a Custom Object or MDA, data should be safe.
Step 1 - Gaps Found in Data
The above image displays data with obvious gaps. Gaps are caused by missing data (NULLs).
Step 2 - All Zeros Rule
To avoid gaps in data on load, best practice is to load zero values to the date range of interest.
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
- 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 2c - Schedule the Initial Load Zeros Rule
To perform an initial "all zeroes" load, you must schedule the rule as follows:
- Run on a Weekly basis
- Schedule for start of the week (typically Sunday). Refer to your usage configuration to confirm.
- For the first load, choose a data range
- Start time must be the very start of the day (00 Hrs / 01 Mins)
- Select "Run for historical periods"
- Click START to initiate the rule run
Step 2d - First Run (for Historical Periods)
As "Run for historical periods" was selected, a confirmation screen is displayed. Click Yes to run the rules from the earlier date entered to the current date.
NOTE: This immediately runs the rule.
Step 2e - Edit/Confirm Schedule
When the rule runs, confirm dates going forward. The End Date is not required.
- 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
After the rule is executed, data is zeroed for each value specified.
Step 3 - Reload Data
After all zero values have been loaded to appropriate accounts, reload data from the source.
Again, this may be either a Custom Object or MDA.
Step 4 - Confirm
After running the rule, the data is now contiguous. No gaps exist in data for the required period.
As mentioned above, if the Load Zero Values rule is scheduled to run as the first step each week - zero values are always loaded, then overwritten with actual values. In the case there are no values for a week - entire data is set to zero; no gaps or NULL values will be apparent.