Reference Material
Thanks to this local post Adding a CRM Analytics Dashboard to a Salesforce page so users without license can see it?, that contains this insight that sums up the process well:
It's all super convoluted, I am afraid
I've found this Tableau CRM Packaging for ISVs Medium post (also posted on Salesforce). It's full of magical JSON edits and includes the key point:
However, the best and the only recommended way to distribute a package is by choosing the “Analytics Template” component.
There is this Salesforce documentation:
An embedded app template has a templateType of embeddedapp. An embedded app doesn’t require users to have access to Analytics Studio. The embedded app is created when a managed package containing the template and other supporting assets is installed in a Salesforce org. An embedded template uses the auto-install framework to install the app in an org without user interaction.
Note this valuable (150 pages though - yikes) reference information to help with the hand-editing of the template Analytics Templates Developer Guide.
But a key source for me is answers here Comprehensive documentation on creating embedded app template for CRM Analytics. Particularly how to work with scratch orgs where:
- Adding the feature "DevelopmentWave" turn on CRM Analytics - you can do the development in this org.
- Adding the feature "AnalyticsAppEmbedded" (and not adding "DevelopmentWave") makes the "Analytics View Only User" permission set available - use this org to test your package Analytics Template.
For production there is a $0 "Analytics View Only Embedded App" SKU that needs to be turned on to get the equivalent of the "AnalyticsAppEmbedded" scratch org feature.
Checklist
This is how to package CRM Analytics that can be installed in an org that doesn't have full CRM Analytics licenses.
- You'll need to convert your Analytics components to an Analytics template; the metadata type for that is WaveTemplateBundle and the files are put in a
waveTemplates
folder - Manual edits are needed, especially
auto-install.json
,"templateType" : "embeddedapp"
and"shares": [ { "shareType": "Organization", "accessType": "View" } ]
; as the install is not interactive, no need/possibility to create input field pages - I removed the
wave
folder to package as I got a "dashboard with devname [xxxxxxxx_tp] already exists" error on install otherwise - When the package is installed/upgraded, the results of the Analytics App install are shown in "Auto-Installed Apps" in "Setup" together with some log information (but a successful install doesn't mean users will be able to see the analytics; both the
"shares":
and the following point matter AFAIK) - Assign the "Analytics View Only User" permission set to any user that needs to see the analytics
This can all be tested in scratch orgs, but for production the "Analytics View Only Embedded App" SKU must be added.