---
schema_version: "1"
id: b82174e6f47b2ef3a4437284672f8404740d2d38fbb77c1ca4c25d0e53da2e5e
title: Create the LMAJoin CRM Analytics Recipe
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-tcrm-lmajoin.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-lmajoin.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7fb12dbe3ea820e0f1d9de168bed715d1b12197e8f78a64544d5fbb0a94a1f11
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Create the LMAJoin CRM Analytics Recipe

Create a CRM Analytics recipe that contains your License Management App (LMA) data.

## Before You Begin

| Required Editions                                                                        |
| ---------------------------------------------------------------------------------------- |
| Available in: both Salesforce Classic and Lightning Experience                           |
| Available in: **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions |

In your org in Analytics Studio in CRM Analytics:

1.  Click **Data Manager**.
2.  In Dataflows & Recipes on the Recipes tab, click **Create Recipe**.
3.  Click **Add Input Data**.
4.  Select **sfLma**License**c**, and select all columns.
5.  Create a transform named `License` with these specifications.

    - Custom Formula: `string(Id)`
    - Output Type: **Text**
    - Length: `255`
    - Default Value: `blank`
    - Show Results In: **New Column (and Keep Original)**
    - Column Label: `LicenseRecordId`

6.  Add a join to Lead with these specifications.

    - Select Input Data to Join: **Lead**
    - Columns to Select: **Company**, **First Name**, **Id**, **Last Name**
    - Join Type: **Lookup**
    - Join Keys: **License: Record ID = Lead ID**
    - API Name Prefix for Right Columns: `Lead`

7.  Add a join to Account with these specifications.

    - Select Input Data to Join: **Account**
    - Columns to Select: **Name**
    - Join Type: **Lookup**
    - Join Keys: **Account Name = Account Name**
    - API Name Prefix for Right Columns: `Account`

8.  Add a join to sfLma**Package**c with these specifications.

    - Select Input Data to Join: **sfLma**Package**c**
    - Columns to Select: `All fields`
    - Join Type: **Lookup**
    - Join Keys: **Package = Record ID**
    - API Name Prefix for Right Columns: `Package`

9.  Create a transform between the join and `sfLma__Package__c` with these specifications.

    - Custom Formula: `substr(sfLma__Package_ID__c, 1, 15)`
    - Output Type: **Text**
    - Length: `255`
    - Default Value: none
    - Show Results in: **New Column (and Keep Original)**
    - Column Label: `PackageID15`

10. Create another join with these specifications.

    - Select Input Data to Join: **sfLma**Package_Verzion**c**
    - Columns to Select: `All fields`
    - Join Type: **Lookup**
    - Join Keys: **Package Version = Record ID**
    - API Name Prefix for Right Columns: `PackageVersion`

11. Create an output with these specifications.

    - Write To: **Dataset**
    - Dataset Display Label: `LMAJoin`
    - App Location: **PartnerIntelligence**
    - Sharing Source: default
    - Security Predicate: **Apply row-level security to the target dataset by adding a predicate filter condition**

12. Click **Apply**.
13. Click **Save**.
14. Save your recipe as `LMAJoin`.
15. Click **Save and Run**.
16. To monitor the status of your job, click **Go to Data Monitor**.

## Example

When complete, your LMAJoin CRM Analytics recipe looks like this.

![The LMAJoin CRM Analytics recipe displaying nodes, transforms, joins, and output](https://developer.salesforce.com/media/pkg2_dev/app_analytics_cookbook_tcrm_lmajoin.png)

1.  [Monitor Your LMAJoin CRM Analytics Recipe](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-lmajoin-monitor.md)


    CRM Analytics recipes can take a while to complete. Use these steps to monitor the status of your LMAJoin recipe.

2.  [Run the LMAJoin CRM Analytics Recipe](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-lmajoin-schedule.md)


    To create a reusable dataset, schedule your LMAJoin CRM Analytics recipe to run on a regular basis. We recommend daily at midnight.

**See Also**

**Previous topic:** [Connect to Your License Management App Data](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-lma-data.md)

**Next topic:** [Create Your App Analytics Dataset](https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-da-prepare.md)
