# 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://a.sfdcstatic.com/developer-website/sfdocs/platform-pkg-exchange/media/pkg2\_dev/app_analytics_cookbook_tcrm_lmajoin.png)

1. [Monitor Your LMAJoin CRM Analytics Recipe](/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](/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](/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-lma-data.md)

**Next topic:** [Create Your App Analytics Dataset](/docs/platform/pkg2-dev/guide/app-analytics-cookbook-tcrm-da-prepare.md)
