> ## Documentation Index
> Fetch the complete documentation index at: https://developers.loyaltylion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adobe Commerce 2

| Adobe Commerce edition | Minimum compatible version |
| ---------------------- | -------------------------- |
| Magento 2 Open Source  | 2.1                        |
| Adobe Commerce 2       | 2.1                        |

## Understand the LoyaltyLion module

The LoyaltyLion module for Adobe Commerce 2 (formerly Magento 2) has three primary responsibilities:

* We add a single frontend block to your layout, which loads the [LoyaltyLion SDK](/sdk/) to provide customer UI
* We add observers to your order and customer lifecycle, to keep LoyaltyLion in sync as this data changes
* We use your REST API (rooted at `<your-store.com>/rest/V1`) to retrieve store configuration and manage price rules

<Info>
  We don't modify your database schema, add cron jobs, or modify customer data
  within your database. This minimizes the risk of incompatibility between
  LoyaltyLion and other modules.
</Info>

## Install the module

<Warning>
  Installing Adobe Commerce modules is a complex process. We recommend giving
  these instructions to the person responsible for maintaining your Adobe
  Commerce setup rather than attempting to install the module yourself.
</Warning>

<Steps>
  <Step title="Install the module with composer and the Adobe Commerce command-line tools">
    In your Adobe Commerce project directory:

    ```sh theme={null}
    composer require loyaltylion/core
    magento setup:upgrade
    ```
  </Step>

  <Step title="Provide API access">
    LoyaltyLion needs access to your store API to manage Price Rules and retrieve store configuration.

    First, make sure that you're logged into your LoyaltyLion account.

    Head to `System` → `Integrations`:

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/system-integrations-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=e634c79f5ae324c7699701e85ed95b6c" alt="Integrations" width="1200" height="603" data-path="images/documentation/adobe-commerce-2/system-integrations-m2.png" />
    </Frame>

    Hit `Activate` on the LoyaltyLion integration and follow the prompts through to completion:

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/activate-integration-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=23706a666839a335936feed314eef40d" alt="Activate" width="1200" height="336" data-path="images/documentation/adobe-commerce-2/activate-integration-m2.png" />
    </Frame>
  </Step>

  <Step title="Configure the module">
    <Info>
      Your Loyalty Program is completely hidden from your customers until you choose
      to launch using the button on the LoyaltyLion admin dashboard.
    </Info>

    First, find the LoyaltyLion configuration section at `Stores` → `Configuration` → `Customers` → `LoyaltyLion`:

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/configuration-loyaltylion-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=a976989477d710a07009128437202056" alt="Configuration" width="1200" height="710" data-path="images/documentation/adobe-commerce-2/configuration-loyaltylion-m2.png" />
    </Frame>

    Next, pick your configuration scope. Pick the **website** you wish to set up a Loyalty Program for.
    LoyaltyLion isn't visible or active for customers on other **websites** hosted on the same Adobe Commerce server.

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/choose-scope-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=278c92e7f50cbcb30b3eb4131683e08b" alt="Choose scope" width="1200" height="539" data-path="images/documentation/adobe-commerce-2/choose-scope-m2.png" />
    </Frame>

    Then, enter your LoyaltyLion `secret` and `token`. You can find these by referring to your setup page.

    <Warning>Each token-secret pairing may only be used once. If you wish to install LoyaltyLion on multiple websites, then you need a secondary program. Please email [support@loyaltylion.com](mailto:support@loyaltylion.com) if you wish to add one. </Warning>

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/enter-token-secret-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=a86d63f68eb979a3517cc30f2d65031b" alt="Enter token and secret" width="1200" height="409" data-path="images/documentation/adobe-commerce-2/enter-token-secret-m2.png" />
    </Frame>

    Don't forget to save your configuration.

    <Frame>
      <img src="https://mintcdn.com/loyaltylion/mzpO03HW8a1K958n/images/documentation/adobe-commerce-2/save-configuration-m2.png?fit=max&auto=format&n=mzpO03HW8a1K958n&q=85&s=60296d7b9559047c4cd80a63b8aa236d" alt="Save configuration" width="1200" height="132" data-path="images/documentation/adobe-commerce-2/save-configuration-m2.png" />
    </Frame>
  </Step>

  <Step title="Validate your installation">
    <Check> You can now return to [setup page](https://app.loyaltylion.com/go/setup/validate-magento-install) and check to see if LoyaltyLion was installed correctly. </Check>
  </Step>
</Steps>
