Sample Data (Testing Only)
The CDP4S App dashboard and Guest Lightning Web Component both show various statistics that are time-sensitive and it can be difficult to test these without real-world data. CDP4S provides automatic sample data generation for testing purposes.
This feature is not intended for Production use. It may pollute or even delete your data!
Enable Sample Data Tab
Sample data is generated from a tab on the CDP4S App that is not included in the CDP4S Administrator Permission Set. If you wish to access it via a normal user account, you may need to assign permission for the Sample Data tab.
In Setup, find and click Profiles.
Click Edit beside the profile you wish to assign.
Scroll down to Custom Tab Settings and change the dropdown beside Sample Data to Default On.
Scroll to the bottom and click Save.
The Sample Data tab will now appear in the CDP4S App:
Configuration
The sample data is intended for use with the Master Lookup Field set to a Lead reference. The Disable cascade delete setting should not be enabled, otherwise Guest records will not be removed on repeated sample generation.
If your settings do not match, you may encounter errors or unexpected results.
The dates for Guest and Session data are always created for the last n days as specified by the Dashboard Day Count setting, or 7 days if there are no settings configured yet.
Generate Data
Click the Generate Data button. A confirmation dialog will appear:
CDP4S Sample data uses a special Company name to identify Leads. All Leads with this value in the Company field WILL BE DELETED when you generate sample data!
The process of generating sample data will take a few seconds. Once complete a summary of the changes will be shown:
View Data
The sample data can be viewed as normal once created, you should now find current statistics in the CDP4S Dashboard. The dashboard in particular shows rolling data that is relative to the current date, if the existing sample data drops off simply repeat the generate process.
Notes on how the data is generated:
Guest, Segment and Goal names are stored in a static resource provided by CDP4S. You’ll see the same names each time you generate sample data.
Dates and visit count, view count, goal values are randomly generated within defined limits. You’ll see different numbers each time you generate sample data.