플랫폼
특징
상담원 스튜디오
신속한 에이전트 구축 및 사용자 지정
자율 엔진
LLMs 사용하여 대화 및 작업 안내
지식 베이스
사용자 지정 지식 소스로 봇을 학습시키세요
휴먼 핸드오프
사람이 참여하는 대화 관리
테이블
대화 데이터 저장 및 관리
채널
Whatsapp 엠블럼
WhatsApp
Instagram 엠블럼
Instagram
Facebook Messenger 로고
Messenger
Slack 로고
Slack
모든 채널
통합
허브스팟 로고
HubSpot
Notion 로고
Notion
Jira 로고
Jira
Calendly 로고
Calendly
모든 통합
LLM 공급자
OpenAI 로고
OpenAI
Anthropic 로고
Anthropic
Groq 로고
Groq
허깅페이스 로고
Hugging Face
모두 LLMs
솔루션
For
엔터프라이즈
미션 크리티컬 프로덕션 워크플로우 자동화
대행사
정교한 상담원 서비스 제공
개발자
상담원 개발을 위한 강력한 API 살펴보기
고객 사례
성공적인 고객 사례를 통해 Botpress 이 전 세계 비즈니스를 어떻게 혁신하고 있는지 알아보세요.
산업별
전자 상거래
교육
금융
호스피탈리티
모든 산업
부서별
판매
엔지니어링
제품
ITSM
모든 부서
사용 사례별
워크플로 자동화
티켓 관리
쇼핑 도우미
제품 코파일럿
모든 사용 사례
자원
필수
Academy
선별된 강좌를 통해 빌드 배우기
라이브러리
AI 워크플로우를 개선하기 위한 리소스
블로그
Botpress 및 AI 에이전트에 대한 인사이트 및 업데이트
건물
디스코드
수천 명의 동료와 함께 아이디어를 공유하세요
문서
종합 가이드 및 참고 자료
API
외부 시스템과 함께 사용하기 위한 참고 자료
이벤트
개발자와 기술에 관심이 많은 사람들을 위한 월간 밋업
영상
튜토리얼, 데모 및 제품 워크스루
변경 로그
최신 Botpress 업데이트에 대한 최신 정보
파트너
파트너가 되세요
인증된 전문가 네트워크에 가입하세요
전문가 고용하기
파트너 및 컨설턴트와 연결
문서
엔터프라이즈
가격정책
로그인
연락처가입하기
돌아가기 Hub

plus/magento2

v2.0.0
워크스페이스에 설치
관리: Botpress 성장 팀
  # Magento 2 (Adobe Commerce) Integration for Botpress

## Overview

This Botpress integration allows seamless interaction with **Magento 2 (Adobe Commerce)** to fetch product information, stock data, and sync products to Botpress tables. Perfect for e-commerce chatbots that need real-time product data and inventory management.

## Features

- **Product Management:** Retrieve products with flexible search criteria
- **Stock Information:** Get real-time stock levels and availability
- **Data Synchronization:** Sync products to Botpress tables with automatic schema creation
- **Custom Attributes:** Support for custom product attributes
- **Advanced Filtering:** Filter products during sync operations
- **OAuth Authentication:** Secure API access using OAuth 1.0a

---

## Installation and Configuration

### Step 1: Create Magento Integration

1. Open your **Magento Admin Panel**
2. Navigate to **System > Extensions > Integrations**
3. Click **Add New Integration**
4. Enter a valid name (e.g., `Botpress Integration`)
5. Go to the **API** tab and check:
   - `Catalog` and all items underneath it
   - `Inventory` (for stock operations)
   - `User Content` > `All Reviews`
   - `Reports` > `Reviews` (By Customers, By Products)
   - `Attributes` > `Product`, `Attribute Set`, `Ratings`, `Swatches`

   > **Note:** These additional API scopes are required for full product, review, and attribute support in the integration.
   >
   > **To enable review functionality, you must also install the Reviews API module:**
   >
   > ```sh
   > composer require divante/magento2-review-api
   >
   > bin/magento setup:upgrade
   > ```
   >
   > This ensures the necessary endpoints for product reviews are available in your Magento instance.

6. Return to the **Integration Info** tab, enter your admin password, and click **Save**
7. In the integrations list, click **Activate** next to your new integration
8. Copy the following credentials:
   - **Consumer Key**
   - **Consumer Secret**
   - **Access Token**
   - **Access Token Secret**

### Step 2: Configure Botpress Integration

1. In Botpress, navigate to your bot's **Integrations** section
2. Find and enable the **Magento 2** integration
3. Enter the following configuration:
   - **Magento Domain URL** (e.g., `www.yourstore.com`)
   - **Store Code** (optional, defaults to `all` - see Store Code section below)
   - **Consumer Key**
   - **Consumer Secret**
   - **Access Token**
   - **Access Token Secret**
   - **Botpress Personal Access Token (PAT)** for Tables API access
4. Click **Save Configuration**

> **Note:** The integration will automatically detect your store's base currency during the first sync operation. No additional currency configuration is required.

---

## Store Code Configuration

The **Store Code** parameter allows you to specify which Magento store view to use for API requests. This is particularly useful for multi-store Magento installations.

### Default Behavior

- **Default Value:** `all` (accesses all store views)
- **When to use:** Single-store installations or when you want to access products across all store views

### Multi-Store Configuration

For multi-store Magento installations, you can specify a specific store code:

- **Store Code Examples:**
  - `/default` - Default store view
  - `/en` - English store view
  - `/fr` - French store view
  - `/de` - German store view
  - `/us` - US store view

### How to Find Your Store Code

1. In your **Magento Admin Panel**, navigate to **Stores > All Stores**
2. Click on the **Store View** tab
3. The **Code** column shows the store codes available for your installation
4. Use the code with a leading slash (e.g., `/en` for the English store view)

### Usage Examples

- **Single Store:** Leave as default (`all`) or use `default`
- **Multi-Store English:** Use `en` to access only English store products
- **Multi-Store French:** Use `fr` to access only French store products

> **Note:** The store code affects all API requests, including product retrieval, stock information, and sync operations. Make sure to use the appropriate store code for your use case.

---

## Available Actions

### **Get Products**

Retrieve products from your Magento catalog using flexible search criteria.

> **Note:** To filter products, provide the filter JSON directly (as an array or object) in the input field—do not wrap it in a string, do not use escaped characters. All filter JSON examples in this guide apply to both the **Get Products** and **Sync Products to Botpress Table** actions.

#### **Input Example**

**Filter by Price:**

```json
[{ "field": "price", "condition": "gt", "value": 100 }]
```

**Filter by SKU:**

```json
[{ "field": "sku", "condition": "eq", "value": "24-MB01" }]
```

#### **Output**

```json
{
  "result": {
    "items": [
      {
        "id": 1,
        "sku": "24-MB01",
        "name": "Joust Duffle Bag",
        "price": 34.0,
        "type_id": "simple",
        "created_at": "2023-01-01 00:00:00",
        "updated_at": "2023-01-01 00:00:00"
      }
    ],
    "search_criteria": {},
    "total_count": 1
  }
}
```

### **Get Stock Item**

Get real-time stock information for a specific product by SKU.

#### **Input Parameters**

| Parameter | Type   | Required | Description                                         |
| --------- | ------ | -------- | --------------------------------------------------- |
| `sku`     | String | Yes      | The SKU of the product to get stock information for |

#### **Usage Example**

```json
{
  "sku": "24-MB01"
}
```

#### **Output**

```json
{
  "qty": 50,
  "is_in_stock": true
}
```

### **Sync Products to Botpress Table**

Automatically sync products from Magento to a Botpress table with intelligent schema creation. Large syncs are automatically split across multiple webhook executions to handle timeouts.

#### **Input Parameters**

| Parameter                        | Type    | Required | Description                                                   |
| -------------------------------- | ------- | -------- | ------------------------------------------------------------- |
| `table_name`                     | String  | Yes      | Name of the Botpress table to sync products to                |
| `custom_columns_to_add_to_table` | String  | No       | Comma-separated list of custom product attributes             |
| `filters_json`                   | String  | No       | JSON array of filter objects for selective syncing            |
| `retrieve_reviews`               | Boolean | No       | Whether to fetch and include product reviews (default: false) |

#### **Webhook Continuation Setup**

For large product catalogs, the sync action automatically continues in batches using webhook.
**No manual intervention is required**—the sync will continue automatically until all products are processed.

#### **Default Table Schema**

The integration automatically creates a table with the following columns:

| Column Name      | Type    | Description                                                          |
| ---------------- | ------- | -------------------------------------------------------------------- |
| `sku`            | text    | Product SKU (required, unique)                                       |
| `name`           | text    | Product name                                                         |
| `description`    | text    | Product description                                                  |
| `price`          | number  | Product price                                                        |
| `original_price` | number  | Original price (if available)                                        |
| `currency`       | text    | Currency code (e.g., USD)                                            |
| `image_url`      | text    | Main product image URL                                               |
| `thumbnail_url`  | text    | Thumbnail image URL                                                  |
| `stock_qty`      | number  | Quantity in stock                                                    |
| `is_in_stock`    | boolean | Whether the product is in stock                                      |
| `average_rating` | number  | Average review rating (only populated if `retrieve_reviews` is true) |
| `review_count`   | number  | Number of reviews (only populated if `retrieve_reviews` is true)     |

#### **Usage Examples**

**Basic Sync:**

- **Table Name:** magento_products

**With Custom Attributes:**

- **Table Name:** magento_products
- **Custom Columns to Add to Table:** color,brand,size,material

**With Filtering:**

- **Table Name:** magento_products
- **Custom Columns to Add to Table:** color,tent_type
- **Filters JSON:** [{"field": "price", "condition": "gt", "value": 50}]

**With Reviews Enabled:**

- **Table Name:** magento_products
- **Custom Columns to Add to Table:** color,brand
- **Retrieve Reviews:** true
- **Filters JSON:** [{"field": "price", "condition": "gt", "value": 100}]

#### **Output**

```json
{
  "success": true,
  "synced_count": 150,
  "total_count": 200,
  "table_name": "magento_products"
}
```

---

## Advanced Filtering

### Filter Conditions

When using `filters_json` in the sync action, you can use the following conditions based on the [Adobe Commerce REST API documentation](https://developer.adobe.com/commerce/webapi/rest/use-rest/performing-searches/#logical-and-and-or-search):

| Condition | Description                                   | Example                                                          |
| --------- | --------------------------------------------- | ---------------------------------------------------------------- |
| `eq`      | Equals                                        | `{"field": "sku", "condition": "eq", "value": "24-MB01"}`        |
| `neq`     | Not equal                                     | `{"field": "price", "condition": "neq", "value": 0}`             |
| `gt`      | Greater than                                  | `{"field": "price", "condition": "gt", "value": 100}`            |
| `gteq`    | Greater than or equal                         | `{"field": "price", "condition": "gteq", "value": 50}`           |
| `lt`      | Less than                                     | `{"field": "price", "condition": "lt", "value": 200}`            |
| `lteq`    | Less than or equal                            | `{"field": "price", "condition": "lteq", "value": 150}`          |
| `from`    | Beginning of a range (must be used with `to`) | `{"field": "price", "condition": "from", "value": 50}`           |
| `to`      | End of a range (must be used with `from`)     | `{"field": "price", "condition": "to", "value": 200}`            |
| `like`    | Like (supports SQL wildcard characters)       | `{"field": "name", "condition": "like", "value": "jacket"}`      |
| `nlike`   | Not like                                      | `{"field": "name", "condition": "nlike", "value": "test"}`       |
| `in`      | In (comma-separated list of values)           | `{"field": "sku", "condition": "in", "value": "SKU1,SKU2,SKU3"}` |
| `nin`     | Not in (comma-separated list of values)       | `{"field": "sku", "condition": "nin", "value": "SKU1,SKU2"}`     |
| `finset`  | A value within a set of values                | `{"field": "category_id", "condition": "finset", "value": "5"}`  |
| `nfinset` | A value that is not within a set of values    | `{"field": "category_id", "condition": "nfinset", "value": "5"}` |
| `moreq`   | More or equal                                 | `{"field": "price", "condition": "moreq", "value": 100}`         |
| `null`    | Is null                                       | `{"field": "description", "condition": "null"}`                  |
| `notnull` | Not null                                      | `{"field": "color", "condition": "notnull"}`                     |

### Filter Examples

#### Filter by Price Range

**Table Name:**
magentoProducts

**Custom Columns to Add to Table:**
(leave blank or enter your custom attributes)

**Filters JSON:**
[
{ "field": "price", "condition": "gteq", "value": 50 },
{ "field": "price", "condition": "lteq", "value": "200 }
]

---

#### Filter by Custom Attributes

**Table Name:**
magentoProducts

**Custom Columns to Add to Table:**
color,brand

**Filters JSON:**
[
{ "field": "color", "condition": "notnull" },
{ "field": "brand", "condition": "eq", "value": "Nike" }
]

---

#### Filter by SKU Pattern

**Table Name:**
magentoProducts

**Custom Columns to Add to Table:**
(leave blank or enter your custom attributes)

**Filters JSON:**
[
{ "field": "sku", "condition": "neq", "value": "" }
]

---

### Logical AND and OR Operations

**Logical AND (multiple filter groups):**

```json
[
  { "field": "price", "condition": "gteq", "value": 50 },
  { "field": "price", "condition": "lteq", "value": 200 },
  { "field": "status", "condition": "eq", "value": "1" }
]
```

**Logical OR (multiple filters in same group):**

```json
[
  { "field": "sku", "condition": "like", "value": "WSH%" },
  { "field": "sku", "condition": "like", "value": "WP%" }
]
```

**Complex AND/OR combination:**

```json
[
  { "field": "sku", "condition": "like", "value": "WSH%" },
  { "field": "sku", "condition": "like", "value": "WP%" },
  { "field": "price", "condition": "from", "value": 40 },
  { "field": "price", "condition": "to", "value": 49.99 }
]
```

> **Note:** OR operations can only be performed within the same filter group. You cannot perform OR across different filter groups like `(A AND B) OR (X AND Y)`.

---

## 📋 Search Criteria Reference

For advanced product filtering, refer to the [Adobe Commerce API Documentation](https://developer.adobe.com/commerce/webapi/rest/use-rest/performing-searches/).

---

## Best Practices

### Performance Optimization

- Use specific search criteria to reduce response times

### Data Management

- Use custom columns to add to table to include relevant product information
- Enable reviews retrieval for products that have customer feedback

### Security

- Keep your OAuth credentials secure

---

## 🔗 Additional Resources

- [Adobe Commerce API Documentation](https://developer.adobe.com/commerce/webapi/rest/)
- [Botpress Tables API](https://botpress.com/docs/learn/reference/tables)

더 나은 구축 Botpress

놀라운 AI 상담원 경험을 만들어 보세요.

시작하세요 - 무료입니다
자세한 내용은 다음에서 확인하세요. Botpress Academy

엄선된 교육 과정, 가이드 및 튜토리얼 컬렉션을 통해 AI 에이전트를 더 빠르고 효과적으로 구축하세요.

전문가 고용하기

인증된 개발자와 연결하여 필요에 맞는 전문 빌더를 찾아보세요.

모든 시스템 운영
SOC 2
인증
GDPR
규정 준수
© 2025
플랫폼
가격정책
상담원 스튜디오
자율 엔진
지식 베이스
휴먼 핸드오프
테이블
허브
통합
채널
LLMs
자원
판매 부서와 대화하기
문서화
전문가 고용하기
영상
고객 사례
API 참조
블로그
상태
V12 자원
커뮤니티
커뮤니티 지원
파트너가 되세요
홍보대사 되기
제휴사 되기
회사
회사에 대해서
경력
뉴스 & 보도자료
법적
개인 정보 보호