Install and Test Your Data Cloud Package
Learning Objectives
After completing this unit, you’ll be able to:
- Install a package.
- Create a data stream from a data kit.
- Create a calculated insight from a data kit.
- Troubleshoot and follow best practices.
Test Your Package
The Get Cloudy Consulting team has finished developing the features for their Data Cloud app but want to verify the completeness of its packaged data kit. To test the package, Get Cloudy Consulting creates a non-namespaced scratch org that includes Data Cloud features.
To test a Data Cloud app, or if you’re a consumer of a Data Cloud app, use these steps to install the package and the data kit in your test org.
Install a Package with a Data Kit
Before they can test anything, the Get Cloudy the team now needs to install the Data Cloud package with their data kit onto their test scratch org.
Most tasks in Data Cloud require either a Data Cloud Admin permission set or a Data Cloud for Marketing Data Aware Specialist permission set. If you’re unable to complete these steps, reach out to your Salesforce admin for assistance. Don’t try to follow these steps in your Trailhead Playground. Data Cloud isn’t available in a typical Trailhead Playground.
Let’s review the steps to install a package with a data kit.
- From a separate tab or new window in the Data Cloud org you wish to install the package with the data kit, enter the provided URL.
- Choose Install for Admins Only, and click Install.
- Click Done when the installation completes.
Deploy the Components of the Data Kit
After you install the package and its data kit, you’re ready to deploy the features in the data kit into your org. Let’s deploy the data streams and calculated insights into this org.
There are a few ways to deploy the components of a data kit in your org. One way is through the user interface, which is what we’ll use in this module. But you might not always interact with Data Cloud and data kits through the user interface—maybe you’re interacting with it through the command line or scripts. In this case, you can install a data kit programmatically instead. You can do so using the Deploy Data Kit Components flow, which you can learn more about in the Data Cloud Developer Guide.
Let’s go over the steps to deploying data streams and calculated insights from a data kit.
Deploy Data Streams from Data Kits
While logged into the org where you installed the data kit, follow these steps.
- Go to Data Cloud and the Data Stream tab.
- Click New to create a data stream.
- If it's a CRM stream, select the CRM stream and click Next. Otherwise, select Installed Data Kits & Packages and click Next.
- If Salesforce CRM, select the appropriate Salesforce org. If not, select the package under Installed Data Kits and Packages.
- Find your data kit under Custom Data Bundles.
- Click Next.
- Select the data space, review the fields in your data stream, and click Next.
- Review details and click Deploy.
Your new data stream is created with the same model and mappings found in your dev environment.
Deploy a Calculated Insight from a Data Kit
If your data kit contains calculated insights, you can deploy those insights from the data kit.
- Go to the Calculated Insights tab and click New.
- Select Create from a Data Kit and click Next.
- Select the package and data kit click Next.
- Click Deploy.
Update a Data Kit
The Get Cloudy team decides that the data kit needs some additional data from Sales. They add a new mapping to a Sales data stream in their source org. How should Get Cloudy Consulting get its changes to reflect in its data kit? Get Cloudy Consulting will have to update its data kit with its changes and create a new package version.
Since we're using source-based development, you create a new Data Cloud scratch org for this update. Once the org has been created and Data Cloud initialized, you can deploy your package source code to the org. In your scratch org, update the content within your data kit for Salesforce CRM data streams by following these steps.
- In Data Cloud, navigate to Data Cloud Setup.
- Under Tools, click Data Kits.
- Open your data kit, and click Update.
- Select the updated data streams.
- Click Next.
- Select the related objects and relationships.
- Click Save.
The updated package is now ready to re-install in your destination org.
Tips and Best Practices
As you build data kits, it’s helpful to review these troubleshooting tips and best practices.
- Confirm your environment setup if you get an error that your package can’t be installed. You can’t install a standard package in the same org you created it in.
- Create a managed package version if you need to upgrade or make updates to a package regularly. To reflect the latest updates, the new package version needs to be installed in the destination org.
- CRM and Commerce data kits can be packaged and reused multiple times in an org and can be mapped to multiple orgs.
- Calculated insights should be packaged and used in an org with a corresponding data model established and mapped. Without the required data models, installed, calculated insights cannot be deployed.
- When new data model relationships are added, make sure to include the relationships in the package for the new version.
Distribute a Data Cloud App
After Get Cloudy is satisfied with its package, the consultancy can prepare to distribute it to others as a Data Cloud app on AppExchange.
When Get Cloudy is ready to distribute its package version, it is promoted to a released version.
Congrats! You’ve followed the Get Cloudy team as they created, tested, and promoted their Data Cloud package. There are a few more steps in the journey to publishing the app on AppExchange. These steps include:
- Submitting the package to AppExchange Security Review
- Drafting release notes and post-install instructions for the package
-
Publishing the app on AppExchange
Happy packaging, and hope to see you on AppExchange!
Resources