Magento 2 Integration

Overview

Magento (now Adobe Commerce) is a powerful open-source e-commerce platform written in PHP. It provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online store.

Magento 2, the latest major version, offers improved performance, enhanced security, and a more intuitive admin interface compared to Magento 1. It's used by thousands of businesses worldwide, from small retailers to enterprise-level organizations.

Key Features of Magento 2

🛍️ Flexible E-Commerce

Product catalog management, multiple stores, advanced pricing rules, and promotional tools

📊 Order Management

Complete order lifecycle management from creation to fulfillment, invoicing, and shipping

👥 Customer Management

Customer accounts, groups, segmentation, and B2B company structures

🔌 REST API

Comprehensive REST API for integrating with external systems

🏢 B2B Commerce

Native B2B features including company accounts, shared catalogs, and quote management

📦 Multi-Source Inventory

MSI (Multi-Source Inventory) for managing stock across multiple locations

When to Use This Integration

  • Sync orders from Magento to ERP, WMS, or fulfillment systems
  • Update inventory from external inventory management systems
  • Import/export products between Magento and PIM systems
  • Synchronize customers with CRM or marketing automation platforms
  • Create invoices and shipments programmatically from external systems
  • Manage B2B companies and credit limits from ERP systems

Configuration

Required Fields

To configure the Magento 2 integration in Retrieve, you need the following credentials from a Magento Integration:

API Authentication

{
  "url": "https://magento.example.com",
  "consumerKey": "your_consumer_key_here",
  "consumerSecret": "your_consumer_secret_here",
  "accessToken": "your_access_token_here",
  "accessTokenSecret": "your_access_token_secret_here",
  "type": "V1"
}
url

Type: String (required)

Description: Your Magento 2 store URL (e.g., https://yourstore.com)

Example: https://magento.example.com

consumerKey

Type: String (required)

Description: OAuth Consumer Key from Magento Integration

How to get: Generated when you activate the integration in Magento admin

consumerSecret

Type: String (required)

Description: OAuth Consumer Secret from Magento Integration

How to get: Generated when you activate the integration in Magento admin

accessToken

Type: String (required)

Description: OAuth Access Token from Magento Integration

How to get: Generated when you activate the integration in Magento admin

accessTokenSecret

Type: String (required)

Description: OAuth Access Token Secret from Magento Integration

How to get: Generated when you activate the integration in Magento admin

type

Type: String (optional)

Description: API version type

Options: V1 (default) or async/V1 (for asynchronous operations)

Note: Use async/V1 for better performance with bulk operations

Action-Specific Configuration

Some actions require additional configuration fields:

Pull Orders

Additional Field: orders_last_pull

Datetime tracking when orders were last fetched (auto-updated)

{
  "url": "https://magento.example.com",
  "consumerKey": "...",
  "consumerSecret": "...",
  "accessToken": "...",
  "accessTokenSecret": "...",
  "orders_last_pull": "2025-12-01 00:00:00"
}

Pull Customers

Additional Field: customers_last_pull

Datetime tracking when customers were last fetched (auto-updated)

{
  "url": "https://magento.example.com",
  "consumerKey": "...",
  "consumerSecret": "...",
  "accessToken": "...",
  "accessTokenSecret": "...",
  "customers_last_pull": "2025-12-01 00:00:00"
}

Pull Products

Additional Field: products_last_pull

Datetime tracking when products were last fetched (auto-updated)

{
  "url": "https://magento.example.com",
  "consumerKey": "...",
  "consumerSecret": "...",
  "accessToken": "...",
  "accessTokenSecret": "...",
  "products_last_pull": "2025-12-01 00:00:00"
}

How to Get Magento API Credentials

  1. Create Integration in Magento Admin

    Navigate to: System → Extensions → Integrations

  2. Add New Integration

    Click "Add New Integration" button and fill in the following fields:

    • Name: e.g., "Retrieve Integration"
    • Email: Your admin email address
    • Callback URL: Leave empty (not needed for REST API)
    • Identity Link URL: Leave empty
  3. Configure API Resources

    Go to "API" tab and select "All" for Resource Access, or choose specific resources:

    • Sales → Orders (for order operations)
    • Customers → Customers (for customer operations)
    • Catalog → Products (for product operations)
    • Inventory (for stock operations)
  4. Save and Activate

    Click "Save", then click "Activate". Click "Allow" in the authorization popup to grant access.

  5. Copy All Four OAuth Credentials

    After activation, Magento displays four credentials (shown only once - copy all four and save them securely!):

    • Consumer Key
    • Consumer Secret
    • Access Token
    • Access Token Secret
  6. Add to Retrieve Configuration

    Paste all four credentials in Retrieve's Magento 2 integration config:

    • consumerKey → Consumer Key
    • consumerSecret → Consumer Secret
    • accessToken → Access Token
    • accessTokenSecret → Access Token Secret

Resources

Next Steps