---
schema_version: "1"
id: d718b3511cbe9d22197c73be9657995817f464fd1487a146460fb4015e2c5487
title: Before You Begin
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/second-generation/appexchange/app-analytics/app-analytics-cookbook/app-analytics-cookbook-prework.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-prework.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 691111963317facf0c23391f5a3a07b3e6a6035e8adc4d237ba88db0add6a3d6
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Before You Begin

Complete these prerequisites before you create App Analytics recipes.

## Before You Begin

| Required Editions                                                                        |
| ---------------------------------------------------------------------------------------- |
| Available in: both Salesforce Classic and Lightning Experience                           |
| Available in: **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions |

| User Permissions Needed                                                |                                                                                               |
| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| To access License Management App data, packages, and package versions: | Read on Licenses, Packages, Package Versions                                                  |
| To request and retrieve AgentExchange App Analytics data:              | Create, Read, Edit, Delete, View All, and Modify All on the `AppAnalyticsQueryRequest` object |
| To use CRM Analytics:                                                  | CRM Analytics Plus Admin user                                                                 |

To brush up on your AgentExchange App Analytics or CRM Analytics skills, we recommend completing these Trailhead modules.

- [AgentExchange Partner Intelligence Basics](https://trailhead.salesforce.com/en/content/learn/modules/appexchange-partner-intelligence-basics)
- [CRM Analytics Data Integration Basics](https://trailhead.salesforce.com/en/content/learn/modules/wave_enable_data_integration_basics)

1.  Set up your [License Management Org](https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/package_associate_lmo.htm) (LMO).

    Use your LMO to track all Salesforce users who install your managed package. The LMO receives a notification in the form of a lead record when a user installs or uninstalls your package. It also tracks each package upload on AgentExchange. Typically, as an AgentExchange partner, you use your [Partner Business Org](https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/isv1_3_quickstart.htm) (PBO) as your LMO.

2.  Register your security-reviewed managed package with your LMO. Follow the directions in [Link a Package with Your License Management Organization](https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/package_associate_lmo.htm).
3.  If you’re not using your PBO as your LMO, install the License Management App (LMA) in your LMO. The LMA lets you manage leads and licenses for your AgentExchange offerings. To install the LMA, read [Get Started with the License Management App](https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/lma_setup.htm?search_text=license%20management%20app).

    **note:** If you’re using your PBO as your LMO, you’re all set. The LMA is automatically installed for you.

4.  Create an App Analytics Admin permission set that includes create and read access on the AppAnalyticsQueryRequest object. Assign this permission to any non-Admin users so that they can create App Analytics requests. Read [Create Permission Sets](https://help.salesforce.com/articleView?id=platform.perm_sets_create.htm&type=5) in Salesforce Help if you need instructions.
5.  Set up the CLI using the [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm). If you need a CLI refresher, take the [App Development with Salesforce DX](https://trailhead.salesforce.com/en/content/learn/modules/sfdx_app_dev) Trailhead module.
6.  [Enable CRM Analytics](https://help.salesforce.com/articleView?id=000335760&type=1&mode=1) in your Salesforce org.
7.  Create a CRM Analytics app named PartnerIntelligence.
8.  To request and retrieve a sample package usage log, create an AgentExchange App Analytics query request using the CLI. Save the CSV data file as `RawPackageLogFile.csv`.
9.  To request and retrieve package usage logs automatically, create an automation. Which automation method you choose depends on your business specifications and which data volume you’re automating.

    - For smaller datasets, such as package usage summaries, Apex scales well for automation. This [GitHub repo](https://github.com/developerforce/partner-intelligence-basics) has the details.
    - For larger datasets, such as package usage logs, automate using an [Amazon Web Services (AWS) stack](https://medium.com/@kamipatel/automate-appanalytics-aws-stack-74cbebc49d2a).
    - You can also use the free Salesforce Labs app, [App Analytics](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G0nUXUAZ). It offers great functionality to retrieve and automate data collection and to get started with recipes and dashboards. Salesforce Labs apps are developed by Salesforce employees and are unsupported.

- **[Get Help with Prerequisites](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-prework-help.md)**


    If you need help with setting up your solution, you can request a consultation with a Platform Expert.

**See Also**

**Previous topic:** [What Are Recipes?](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-what-are-recipes.md)

**Next topic:** [CRM Analytics Recipes](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-intro.md)
