> For the complete documentation index, see [llms.txt](https://docs.eesel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eesel.ai/integrations/magento.md).

# Magento

Connect your Agent with Magento so it can look up orders, check payments, track shipments, and take order actions on your behalf.

## What you can do

* Look up orders by order number or customer email
* Check shipment and tracking information
* Check payment status on an order
* Refund or cancel orders
* Send customer-facing order notices
* Check product stock by SKU

## Connecting Magento

You'll need two things to connect:

* Your Magento store URL (e.g. `https://store.example.com`)
* A Magento integration access token (API key)

The steps below walk through generating the access token from your Magento Admin Panel.

### Step 1: Log in to the Magento Admin Panel

Open your browser and go to your Magento admin URL (e.g. `https://yourstore.com/admin`). Sign in with your admin credentials.

### Step 2: Open the Integrations page

In the left sidebar, click **System**. Under the **Extensions** section, select **Integrations**.

### Step 3: Create a new integration

Click **Add New Integration** in the top-right corner. Fill in the required details:

* **Name** — a descriptive label (e.g. `eesel_orders_integration`)
* **Email** — any valid email address you control
* **Callback URL** and **Identity Link URL** — leave blank
* **Your Password** — your Magento admin password (required to authorize the integration)

Leave the other fields at their defaults.

### Step 4: Configure API permissions

Switch to the **API** tab on the left side of the integration form.

Under **Resource Access**, select **Custom**, then expand the **Sales** section in the resource tree and check **Orders** to grant order-related access.

Add other resources only if you need them — keeping the scope tight is the safer default.

### Step 5: Save and activate

Click **Save** at the top-right. You'll be returned to the Integrations list.

Find the integration you just created and click **Activate** in the **Actions** column. A confirmation pop-up will appear showing your access keys — keep this window open.

### Step 6: Copy the access token

In the activation pop-up you'll see four values: Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Copy the **Access Token** value and store it somewhere safe (a password manager works well). This is the API key you'll paste into eesel. Click **Done** to finish activation in Magento.

### Step 7: Connect in eesel

1. In eesel, go to **Integrations > Magento**
2. Enter your store URL and the **Access Token** from Step 6
3. Click **Connect Magento**

## Actions

### Order lookup

| Action                  | Description                                           |
| ----------------------- | ----------------------------------------------------- |
| **Get Order by ID**     | Pull full details for a specific order number         |
| **Get Orders by Email** | Find a customer's recent orders by email              |
| **Get Order Tracking**  | Get shipment status and tracking numbers for an order |
| **Get Payment Status**  | Check whether a payment went through and method used  |

### Order actions

| Action                | Description                                       |
| --------------------- | ------------------------------------------------- |
| **Refund Order**      | Refund an order via Magento's creditmemo endpoint |
| **Cancel Order**      | Cancel an order that hasn't shipped               |
| **Send Order Notice** | Send a customer-facing notice about an order      |

### Product information

| Action                 | Description                                   |
| ---------------------- | --------------------------------------------- |
| **Check Stock Status** | Inventory level and in-stock status for a SKU |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eesel.ai/integrations/magento.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
