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

# Connect your app to Magento (Adobe Commerce)

> Connect your app to a Magento Open Source or Adobe Commerce store to read and manage products, orders, customers, and inventory.

[Magento](https://business.adobe.com/products/commerce.html) is an ecommerce platform that Adobe sells as Adobe Commerce and publishes as Magento Open Source. The Magento connector lets your Lovable app read and manage the products, orders, customers, and stock of a store running either edition. It's designed for storefronts, back-office tools, and dashboards that keep the store as the system of record.

With Magento, your app can:

* List and search products, orders, customers, and categories with filters, sorting, and paging
* Read stock levels and update product quantities
* Create and update products and their attributes
* Add comments to orders, and invoice and ship them
* Read the store's websites and store views, Magento's scopes for running several storefronts from one installation

The connector works with Magento Open Source and with Adobe Commerce, whether you host the store yourself or run it on Adobe's cloud infrastructure. It does not work with Adobe Commerce as a Cloud Service, the edition you open from Commerce Cloud Manager with an Adobe ID (see [Limitations](#limitations)). It's a good fit for apps that give a team a tailored view of an existing store without replacing it.

Magento is available as an [app + chat connector](https://docs.lovable.dev/integrations/app-connectors.md): one shared connection that works in [Chats](https://docs.lovable.dev/features/chats.md), in the project chat while you build, and in your published apps.

## Common use cases and example apps

These examples show what you can build with Magento, each with a prompt to start from.

| Example app | Example prompt | Description |
| :- | :- | :- |
| Order dashboard | *Use Magento and build a dashboard that lists today's orders by status with totals per shipping method.* | **Your team sees new orders without opening the store admin.** The app reads orders with filters and paging and refreshes on a schedule. |
| Warehouse screen | *Use Magento and build a warehouse display of orders waiting to be shipped, grouped by carrier.* | **Pickers work from one screen on the warehouse floor.** The app lists orders in a processing state and marks them shipped when a parcel leaves. |
| Sales rep ordering app | *Use Magento and build a mobile app where sales reps look up a customer, browse the catalog, and place an order.* | **Reps place B2B orders from the field.** The app searches customers and products and checks stock before an order is placed. |
| Customer segments | *Use Magento and build a tool that groups customers by the products they bought and exports the list for a newsletter.* | **Marketing reaches buyers of a product line with a targeted message.** The app joins orders to customers and exports a segment as CSV. |
| Product landing page | *Use Magento and build a landing page for one product line that pulls prices and stock from the store.* | **A campaign page always shows the live price and availability.** The app reads the products and links shoppers to the store's checkout. |
| Stock sync | *Use Magento and build an admin page where I update stock quantities after a stock count.* | **Stock counts reach the store in one step.** The app writes new quantities to each product's stock item. |

## How to connect Magento

Who can create Magento connections depends on your plan and workspace settings. App + chat connectors are available by default. On Business and Enterprise plans, [Who can create connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-create-connections-and-clients) starts at **Admins**. Some Enterprise workspaces start at **No one**, which disables the connector. An admin or owner changes it in **Connectors → Admin settings → App + chat connectors**.

You can create multiple Magento connections for different stores, or for different integrations on one store. An integration is a store-side identity with its own access rights. Separate connections keep a staging store apart from production, or connect several stores.

When the connection is created, you can [link it to the projects](https://docs.lovable.dev/integrations/app-connectors.md#link-a-connection-to-a-project) where you want to use it. Anyone building in a project can ask Lovable in the project chat to link their project to it. Linking follows the connection's access rules.

### Prerequisites

Before connecting Magento, make sure you have:

* A Magento Open Source or Adobe Commerce store (version 2.x) reachable over HTTPS from the internet
* An admin account on that store that may manage integrations
* Permission to **create connections** in your Lovable workspace (see [Who can create connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-create-connections-and-clients))

> [!NOTE]
>
> All API requests made through this connector go to your own store. Billing and quota are handled directly by your store hosting or Adobe, not Lovable.

### Step 1: Create an integration in your store

The integration has its own access rights and four credentials. Lovable signs every request with those credentials. The credentials are not exposed to your published app.

To create an integration:

**1. Open the integrations list**

Sign in to your store admin and go to **System → Extensions → Integrations**.

**2. Add an integration**

Click **Add New Integration**. Under **Integration Info**, give it a name, for example `Lovable`, and enter your admin password in **Your Password**.

**3. Grant access to resources**

Open the **API** tab, set **Resource Access** to **Custom**, and select every resource your app uses:

* **Catalog**: products and stock (stock sits under **Catalog → Inventory**)
* **Sales**: orders, invoices, and shipments
* **Customers**: customer records
* **Stores → Settings → All Stores**: websites and store views

Click **Save**. You can add a resource later without reconnecting.

**4. Activate the integration**

In the integrations list, click **Activate** on the new row, then **Allow**. The store shows the **Consumer Key**, **Consumer Secret**, **Access Token**, and **Access Token Secret**. Copy all four, then click **Done**.

> [!WARNING]
>
> The four values together function like a password for your store. Keep them secure and never share them publicly. You'll need them in the next step.

See Adobe's documentation for more: [Integrations](https://experienceleague.adobe.com/en/docs/commerce-admin/systems/integrations).

### Step 2: Connect Magento to Lovable

You connect the store by entering its URL and the four integration values.

**1. Open Magento in Connectors**

Open [Connectors](https://lovable.dev/dashboard?connectors) and select **Magento (Adobe Commerce)**. For the other places to open the catalog from, see [Where to find connectors](https://docs.lovable.dev/integrations/introduction#where-to-find-connectors).

**2. Add a connection**

Click **Connect** on the connector page. The form is split into collapsible sections, **Details**, **Configure connection**, and **Sharing**.

**3. Name the connection**

Under **Details**, Lovable fills in a name for the connection, which you can change. The name is only used inside Lovable to identify the connection.

**4. Configure the connection**

Under **Configure connection**, enter:

1. **Store URL**: the HTTPS address of your store, for example `https://shop.example.com`. Include the subdirectory when the store is not hosted at the domain root.
2. **Consumer key**: the consumer key shown when you activated the integration.
3. **Consumer secret**: the consumer secret from the same screen.
4. **Access token**: the access token from the same screen.
5. **Access token secret**: the access token secret from the same screen.

**5. Choose who can use this connection**

Under **Sharing**, the connection is private to you by default and shows a **Private** label. To share it, click **Share with others**. Then add workspace members by email, or click **Invite entire workspace** to make the connection available to everyone in your Lovable workspace.

See [Who can use connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-use-connections-and-clients) for more information.

**6. Connect**

Click **Connect** at the bottom of the form. Lovable verifies the credentials against your store before saving the connection.

When connected, anyone building in a project can ask Lovable in the project chat to link their project to Magento. Linking follows the connection's access rules. Your Lovable apps can then read and manage the store's catalog, orders, customers, and stock.

## Limitations

The Magento connector cannot:

* Connect to Adobe Commerce as a Cloud Service, Adobe's software-as-a-service edition. You are on it when you open your store admin from Commerce Cloud Manager after signing in to Adobe Experience Cloud with your Adobe ID. That edition signs in through Adobe's identity service instead of integration credentials
* Use the store's GraphQL API. The connector covers the REST API
* Create admin tokens or act as an admin user. The connection acts as the integration you created
* Support per-end-user Magento login. Each connection represents a single integration shared across all projects linked to it

## Troubleshooting

Use these checks when connecting fails or a Magento request returns an unexpected status.

> [accordion] The consumer isn't authorized to access Magento\_Sales::actions\_view
>
> The integration lacks the resource the message names. In the store admin, open **System → Extensions → Integrations**, edit the integration, and select that resource on the **API** tab. `Magento_Sales::actions_view` is **Sales → Operations → Orders → Actions → View**. Click **Save**. The store applies the change to the next request, so you do not need to reconnect.

> [accordion] Every request fails after you reauthorized the integration in the store
>
> Reauthorizing an integration issues a new access token and access token secret and invalidates the old ones. The consumer key and consumer secret do not change. The creator of the connection opens it in [Connectors](https://lovable.dev/dashboard?connectors). Under **Configure connection**, they click **Edit** on **Access token** and **Access token secret**, paste the new values, and click **Update**.

> [accordion] Magento (Adobe Commerce) did not validate your credentials
>
> Click **Show error** under the message to see the store's reply. A reply about the signature or the token means one of the four values is wrong. Copy them again from the store, or reauthorize the integration under **System → Extensions → Integrations** and paste the new tokens. A reply that names Adobe Commerce as a Cloud Service means the store is on the edition listed under [Limitations](#limitations). An HTML page or a `503` means the store is down or in maintenance mode. Check that the store URL opens in a browser, then try again.

## Manage your Magento (Adobe Commerce) connection

Connections are managed from [**Connectors**](https://lovable.dev/dashboard?connectors): select **Magento (Adobe Commerce)**, then open the connection.

* **Unlink projects** to remove Magento (Adobe Commerce) access from specific projects while keeping the connection available for others. See [Unlink projects from a connection](https://docs.lovable.dev/integrations/app-connectors.md#unlink-projects-from-a-connection) for the steps.
* **Delete the connection** to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Magento (Adobe Commerce) stop working until a new connection is added. See [Delete a connection](https://docs.lovable.dev/integrations/app-connectors.md#delete-a-connection) for the steps and who can delete.
