# How to Integrate Retool with Magento (Adobe Commerce)

- Tool: Retool
- Difficulty: Intermediate
- Time required: 30 minutes
- Last updated: April 2026

## TL;DR

Connect Retool to Magento (Adobe Commerce) using a REST API Resource with integration token authentication. Build a multi-store e-commerce operations panel that manages orders, products, customers, and inventory across storefronts. Magento's REST API at /rest/V1/ provides complete catalog, sales, and customer management endpoints for building powerful admin tools beyond Magento's native admin panel.

## Build a Magento Multi-Store Operations Dashboard in Retool

Magento's native admin panel is powerful but built for individual store management — it lacks cross-store reporting, bulk operations across product catalogs, and custom workflow automation. Operations teams managing large Magento deployments often need a purpose-built internal tool that surfaces order queues, inventory alerts, and catalog management in a single interface designed for their specific workflows. Retool fills this role by connecting directly to Magento's REST API.

Magento's API covers every aspect of the platform: the catalog API manages products, categories, and attributes; the sales API handles orders, invoices, shipments, and credit memos; the customer API manages accounts, addresses, and groups; and the inventory API (for MSI) tracks stock across multiple warehouses. From Retool, you can build a single dashboard that combines all of these — an order operations panel showing today's pending orders alongside low-stock alerts for their products, for example.

For multi-store Magento deployments, the API's store scope mechanism allows your Retool app to query data across all stores from a single resource. A Select component bound to the store code drives which store scope the queries target, enabling the same dashboard to work across all storefronts without duplicating resources. This flexibility, combined with Retool's ability to join Magento data with ERP or accounting system data through multiple resources, makes for a genuinely powerful operations center.

## Before you start

- A Magento 2.x or Adobe Commerce installation with admin access
- Permission to create Integrations in Magento Admin (System → Extensions → Integrations)
- Your Magento store URL (https://your-magento-store.com)
- A Retool account with permission to create Resources
- Basic understanding of Magento's store structure (store views, websites, store codes)

## Step-by-step guide

### 1. Create a Magento Integration Token

Magento's recommended authentication method for API access is Integration Token — it creates a permanent OAuth access token scoped to specific Magento API resources without requiring user-specific admin credentials. Log in to your Magento Admin panel and navigate to System → Extensions → Integrations. Click the Add New Integration button. Give it a descriptive name like 'Retool Integration'. In the Identity Link URL field, you can leave this blank for server-to-server integrations. Click the API tab on the left side of the integration form. This is where you define the scope — which Magento resources this integration can access. For an operations dashboard, select the relevant resource scopes: under Sales, enable Orders, Invoices, Shipments, and Credit Memos. Under Catalog, enable Products, Categories, and Inventory. Under Customers, enable Customers and Customer Groups. You can also select All for full access, but scoping is better practice. Click Save. Magento will display the Integration activation screen — click Activate. You will see four token values: Consumer Key, Consumer Secret, Access Token, and Access Token Secret. For Retool's integration, you only need the Access Token (this is the Bearer token used in API requests). Copy the Access Token and store it securely. If you need to regenerate tokens later, you can reactivate the integration from the Integrations list.

**Expected result:** You have a Magento Integration Access Token copied and scoped to the API resources your Retool dashboard needs.

### 2. Configure the Magento REST API Resource in Retool

In Retool, navigate to the Resources tab and click Add Resource. Select REST API. Name the resource 'Magento API'. In the Base URL field, enter your Magento store URL followed by /rest — for example: https://your-magento-store.com/rest. Do not include /V1 in the base URL because multi-store queries may need to prepend a store code before /V1 in individual query paths. In the Authentication section, select Bearer Token and paste your Integration Access Token. Add a default header: key Content-Type, value application/json. Add a second header: key Accept, value application/json. Click Save Changes. To test the connection, create a quick test query in a Retool app: use GET method with path /default/V1/store/storeConfigs — this returns your store configuration and confirms the token is working. If the response includes your store name and base URL, the connection is correctly configured. For multi-store Magento setups, the /default/V1/ prefix uses the default store scope. You can swap 'default' for any store code (visible in Stores → Settings → All Stores in Magento admin) to scope queries to a specific store view.

**Expected result:** A Magento API resource is saved in Retool and a test query to /default/V1/store/storeConfigs returns store configuration data.

### 3. Query Magento orders with searchCriteria filters

Magento's REST API uses a structured searchCriteria filter system in URL parameters for list endpoints. Understanding this syntax is critical for building useful Retool queries. The filter format is: searchCriteria[filterGroups][0][filters][0][field]=status&searchCriteria[filterGroups][0][filters][0][value]=pending&searchCriteria[filterGroups][0][filters][0][conditionType]=eq. In Retool, you configure these as URL parameters in the query editor. Create a query named 'getOrders'. Set Method to GET. Set Path to /default/V1/orders. In the URL Parameters section, add the following key-value pairs: searchCriteria[filterGroups][0][filters][0][field] → status, searchCriteria[filterGroups][0][filters][0][value] → {{ statusFilter.value || 'pending' }}, searchCriteria[filterGroups][0][filters][0][conditionType] → eq, searchCriteria[sortOrders][0][field] → created_at, searchCriteria[sortOrders][0][direction] → DESC, searchCriteria[pageSize] → {{ pagination.pageSize || 25 }}, searchCriteria[currentPage] → {{ pagination.page || 1 }}. To filter by date range, add a second filter group: searchCriteria[filterGroups][1][filters][0][field] → created_at, value → {{ dateRange.startDate }}, conditionType → gteq. Add a transformer to reshape Magento's order response for display in a Retool Table.

```
// Transformer: reshape Magento orders for Retool Table
const orders = data.items || [];
return orders.map(order => ({
  id: order.entity_id,
  increment_id: order.increment_id,
  status: order.status,
  customer_email: order.customer_email,
  customer_name: `${order.customer_firstname || ''} ${order.customer_lastname || ''}`.trim(),
  grand_total: `$${parseFloat(order.grand_total || 0).toFixed(2)}`,
  items_count: order.total_item_count,
  store: order.store_name,
  created_at: new Date(order.created_at).toLocaleDateString(),
  payment_method: order.payment?.method || 'Unknown'
}));
```

**Expected result:** The getOrders query returns a normalized array of order objects visible in the query results panel, with pagination metadata.

### 4. Build the order management dashboard UI

With working queries, build the operations dashboard UI. Drag a Table component onto the canvas and set its Data property to {{ getOrders.data }}. Configure visible columns: increment_id (as a link to https://your-magento-store.com/admin/sales/order/view/order_id/{{ row.id }}), customer_name, customer_email, status, grand_total, items_count, store, created_at. Add a Pagination component below the table and connect it to the getOrders query. Add filter controls above the table: a Select component for status with options ['pending','processing','complete','canceled','on_hold'], a Date Range Picker component, and a Text Input for customer email search. Add a Search button that triggers getOrders with these filter values. For the order detail panel, add a Container on the right side. When a row is selected in the Table, show the order detail: create a query named 'getOrderDetail' — GET /default/V1/orders/{{ ordersTable.selectedRow.id }}. Use this to display order items, shipping address, payment details, and order history comments. Add an Update Status Form with a Select for new status and Text Area for order comments. Create a query 'addOrderComment' — POST /default/V1/orders/{{ ordersTable.selectedRow.id }}/comments, with body { 'statusHistory': { 'comment': '{{ commentInput.value }}', 'status': '{{ newStatusSelect.value }}', 'is_customer_notified': {{ notifyCustomer.value }}, 'is_visible_on_front': false } }.

```
// Add order comment and status update
{
  "statusHistory": {
    "comment": "{{ commentInput.value }}",
    "status": "{{ newStatusSelect.value }}",
    "is_customer_notified": {{ notifyCustomerToggle.value }},
    "is_visible_on_front": false,
    "entity_name": "order"
  }
}
```

**Expected result:** A functional order management panel shows filterable orders in a Table, with a detail panel for viewing order information and adding status comments.

### 5. Build a product catalog and inventory management panel

For catalog management, create a query named 'getProducts'. Set Method to GET, Path to /default/V1/products. Add searchCriteria URL parameters for pagination: searchCriteria[pageSize] → {{ catalogPagination.pageSize || 50 }}, searchCriteria[currentPage] → {{ catalogPagination.page || 1 }}. Add a search parameter to filter by SKU or name: searchCriteria[filterGroups][0][filters][0][field] → name, value → {{ productSearch.value }}, conditionType → like (Magento's LIKE operator requires % wildcards in the value, so use {{ '%' + productSearch.value + '%' }}). To get stock data alongside products, you need a second query: 'getStockStatus' — GET /default/V1/stockStatuses with a filter on product SKUs. Alternatively, Magento's /default/V1/products endpoint includes extension_attributes.stock_item for Simple products when you add fields=items[sku,name,price,status,extension_attributes] to the URL parameters. Add a Table for products showing SKU, name, price, status, and stock quantity. For bulk price updates, add a Checkbox column to the Table for multi-row selection, a Number Input for the new price, and a Button labeled 'Update Selected Prices'. Create a query named 'bulkUpdatePrice' that uses a JavaScript query type to loop through the selected rows and trigger individual PUT /default/V1/products/{{ sku }}/stockItems/1 calls. Use Promise.all to parallelize these updates.

```
// JavaScript query: bulk update product prices
const selectedProducts = catalogTable.selectedRows;
if (!selectedProducts.length) {
  return { updated: 0, errors: [] };
}

const updatePromises = selectedProducts.map(product =>
  updateProductPrice.trigger({
    additionalScope: {
      currentSku: product.sku,
      newPrice: bulkPriceInput.value
    }
  })
);

const results = await Promise.allSettled(updatePromises);
const errors = results
  .filter(r => r.status === 'rejected')
  .map(r => r.reason);

return {
  updated: results.filter(r => r.status === 'fulfilled').length,
  errors
};
```

**Expected result:** A product catalog panel shows searchable products with stock levels, and bulk price updates apply changes to multiple selected products simultaneously.

## Best practices

- Use Integration Tokens (System → Extensions → Integrations) rather than Admin User Tokens for all Retool connections — integration tokens are permanent, scoped, and not tied to personal admin accounts
- Scope Integration Token permissions to the minimum required API resources rather than using All access — limit catalog tokens to read-only for reporting dashboards that do not need write access
- Always include searchCriteria[pageSize] in list queries to prevent Magento from returning thousands of records at once — the default page size is 20 and the maximum depends on your Magento configuration
- Use Magento's asynchronous bulk API (/rest/async/bulk/V1/) for bulk operations like price updates or inventory adjustments on more than 10 items — it processes updates as background jobs without blocking the Retool query
- Cache expensive Magento queries in Retool (product catalog, category tree) using query caching with 2-5 minute TTLs since catalog data changes infrequently compared to order data
- For multi-store operations, create a Configuration Variable for the default store scope and allow Retool app users to switch store context via a Select component — avoid hardcoding store codes in query paths
- Join Magento order data with your ERP or warehouse management system data using multiple Retool resources — showing fulfillment status from your WMS alongside Magento order status prevents support agents from needing to check multiple systems

## Use cases

### Build a multi-store order management and fulfillment panel

Create a Retool operations dashboard that displays pending and processing orders across all Magento storefronts. Support agents can view order details, update statuses, add comments, generate invoices, and create shipments without logging into the Magento admin. Include filters by store, date range, payment method, and shipping status to handle high-volume order queues efficiently.

Prompt example:

```
Build a Retool panel showing all Magento orders with status 'pending' or 'processing', filterable by store and date range. Include order details on row selection, a button to add order comments, and invoice/shipment creation forms.
```

### Build a catalog and inventory management dashboard

Create a product management panel in Retool that shows all SKUs with current prices, stock levels, and category assignments. Allow catalog managers to bulk-update prices, adjust inventory quantities across warehouses, and manage product visibility. Include low-stock alerts for products below a configurable threshold.

Prompt example:

```
Build a Retool catalog panel that queries Magento products with current stock and price data. Include editable Table cells for price and quantity, a bulk update button, and a filtered view showing products with stock below a threshold set by a Number Input.
```

### Build a customer account and order history panel

Create a customer support tool in Retool that lets support agents search for customers by email or name, view their complete order history, account balance, and store credit, and perform account management operations like password resets and address updates — all through Magento's customer API.

Prompt example:

```
Build a Retool customer lookup panel for Magento. A search bar finds customers by email or name. On selection, show their profile, address book, order history list, and any store credit balance. Include buttons to reset password and update email.
```

## Troubleshooting

### 401 Unauthorized when testing Magento API connection

Cause: The Integration Token may not have been activated in Magento, or the wrong token was copied. Magento generates four token values (Consumer Key, Consumer Secret, Access Token, Access Token Secret) — only the Access Token is used as the Bearer token in Retool.

Solution: In Magento Admin → System → Extensions → Integrations, verify the integration status shows 'Active' (not 'Inactive'). Click the integration and re-activate if needed. Copy the Access Token value (not Consumer Key or Secret) and re-enter it in the Retool resource's Bearer Token field. Confirm there are no leading/trailing spaces in the token value.

### Magento returns empty items array even though orders exist in admin

Cause: The searchCriteria filter syntax in URL parameters requires exact parameter name formatting. Incorrect bracket notation in the parameter keys will cause Magento to treat them as invalid filters and return all items or no items unexpectedly.

Solution: Verify each searchCriteria URL parameter key uses the exact bracket notation: searchCriteria[filterGroups][0][filters][0][field], not searchCriteria.filterGroups.0.filters.0.field. Check the Retool query's 'Params' tab to see how parameters are being serialized. Also verify conditionType values — Magento accepts: eq, neq, like, nlike, in, nin, notnull, null, gteq, lteq, gt, lt, moreq, finset.

### Product queries return price and stock as null or missing for some products

Cause: Configurable products in Magento do not carry stock or price at the parent level — these attributes live on child Simple products. Querying /rest/V1/products returns the parent Configurable product with null stock values.

Solution: To get child product data, query /rest/V1/products/{{ sku }}/children for individual configurable products, or filter your product query with searchCriteria to only return type_id=simple. For inventory data, use the MSI endpoint /rest/V1/inventory/source-items with a filter on sku values returned from the products query.

```
// Filter to simple products only in searchCriteria
// Add this URL parameter:
// searchCriteria[filterGroups][1][filters][0][field] = type_id
// searchCriteria[filterGroups][1][filters][0][value] = simple
// searchCriteria[filterGroups][1][filters][0][conditionType] = eq
```

### 400 Bad Request when creating or updating Magento objects via POST/PUT

Cause: Magento's REST API requires the request body to be wrapped in the object's entity type key — for example, product updates must be wrapped as { 'product': { ... } } and order comments as { 'statusHistory': { ... } }. Sending the fields at the top level without the wrapper causes 400 errors.

Solution: Check Magento's API documentation for the specific endpoint's expected request body schema. Use Magento's Swagger UI (/swagger) which is available at https://your-magento-store.com/swagger to see the exact request body format for each endpoint. Wrap all create/update request bodies in their appropriate entity key.

## Frequently asked questions

### Does Retool have a native Magento connector?

No, Retool does not have a native Magento connector. You connect using a REST API Resource configured with your Magento store's base URL and an Integration Token as the Bearer authentication. Despite the manual setup, this gives you access to Magento's complete REST API, which covers every platform feature from orders and catalog to customer accounts and store configuration.

### How do I handle Magento's searchCriteria filter syntax in Retool queries?

Magento uses a bracket-notation URL parameter system for filtering list endpoints. In Retool's query editor, add each filter component as a separate URL parameter entry — do not try to build the complete filter string as a single parameter value. The key format is: searchCriteria[filterGroups][0][filters][0][field], searchCriteria[filterGroups][0][filters][0][value], and searchCriteria[filterGroups][0][filters][0][conditionType]. Use the Retool {{ }} syntax to bind filter values to UI components.

### Can I manage multiple Magento stores from a single Retool app?

Yes. Magento's REST API uses store scope as a URL path segment: /rest/{store_code}/V1/ routes queries to a specific store view. Add a Select component in your Retool app with store codes as options, then reference it in your query paths as /rest/{{ storeSelect.value }}/V1/orders. A single Retool resource handles all stores — you just vary the store code in the query path, not the resource itself.

### How do I create invoices and shipments for Magento orders from Retool?

Creating an invoice requires a POST to /rest/V1/invoices with the order_id and optional items array. Creating a shipment uses POST /rest/V1/order/{{ orderId }}/ship with the tracking information. Both endpoints require the entity to be in the correct state — you can only invoice orders in 'processing' status and only ship invoiced orders. Check the order's status and payment status before triggering these operations from Retool to avoid API errors.

### Is the Retool-Magento integration compatible with Adobe Commerce Cloud (hosted Magento)?

Yes. Adobe Commerce Cloud (the hosted version of Magento) exposes the same REST API at the same URL structure. The main difference is that Adobe Commerce may require IP whitelisting for API access — add Retool Cloud's IP ranges (available in Retool's documentation) to your Adobe Commerce access control list. For self-hosted Retool, use your own server's IP address.

---

Source: https://www.rapidevelopers.com/retool-integrations/magento
© RapidDev — https://www.rapidevelopers.com/retool-integrations/magento
