Magento 2

Comprehensive technical documentation for the Omnium Magento 2 integration. Learn how to configure order synchronization, product import/export, inventory management, and customer sync.

The Omnium Magento 2 integration provides bidirectional synchronization between Omnium OMS and Adobe Commerce/Magento 2. This integration enables e-commerce order management with full support for product synchronization, inventory management, customer sync, and order status updates.

Overview

The integration supports:

  • Order Import: Imports orders from Magento to Omnium for fulfillment
  • Order Export: Updates order status, invoices, and shipments back to Magento
  • Product Import: Imports products from Magento (simple, configurable, and bundle products)
  • Product Export: Exports product data and prices to Magento
  • Inventory Export: Synchronizes stock levels from Omnium to Magento
  • Customer Sync: Imports customer data from Magento to Omnium

Architecture

┌─────────────┐                    ┌─────────────────┐
│   Omnium    │◄──────────────────►│   Magento 2     │
│     OMS     │   REST API         │                 │
└─────────────┘                    └─────────────────┘
      │                                    │
      │ ┌─────────────────────────────────┐│
      │ │  Data Flows:                    ││
      │ │  ← Orders (import)              ││
      │ │  → Order status (export)        ││
      │ │  ← Products (import)            ││
      │ │  → Products/Prices (export)     ││
      │ │  → Inventory (export)           ││
      │ │  ← Customers (import)           ││
      │ └─────────────────────────────────┘│
      ▼                                    ▼

Configuration

Connector Options

The Magento integration is configured via connector options in the tenant settings. Add a connector with the name Magento.

PropertyTypeDescription
HoststringThe Magento API base URL (e.g., https://your-store.com/rest/)
UsernamestringAPI access token (Bearer token)
PasswordstringNot used for token auth, can be empty

Order Import/Export Properties

PropertyTypeDefaultDescription
IsExportInvoiceEnabledboolfalseEnable invoice creation in Magento when order is captured
IsExportShipOrderEnabledboolfalseEnable shipment creation in Magento when order ships
IsExportStatusEnabledboolfalseEnable order status updates to Magento
CustomerIdFieldstringphoneField to use as customer ID (email or phone)
IsMagentoSkuModifiedByOptionsboolfalseStrip option suffixes from SKU (e.g., SKU-M-RedSKU)
IsShipmentMethodInKlarnaExtensionsboolfalseRead shipping method from Klarna extension attributes
PickUpInStoreShippingMethodstring-Shipping method name for click & collect orders
PickUpIdStoreExternalIdNamestring-External ID name for store lookup

Product Import/Export Properties

PropertyTypeDefaultDescription
IsOmniumMasterForProductsboolfalseOmnium is master for product data (enables full product export)
IsConfigurableProductsEnabledboolfalseExport configurable products (products with variants)
IsProductUpdatedOnMultipleMarketsboolfalseUpdate product prices per market/store view
IsSpecialPriceMapperToProductboolfalseMap Magento special prices to Omnium prices
IsBrandIncludedInProductNameboolfalsePrepend brand to product name
DefaultAttributeSetIdstringRequiredDefault attribute set ID for new products
DefaultTaxClassIdstring-Default tax class ID for new products
VariantIdentifierCustomAttributestring-Custom attribute(s) that identify variants (comma-separated)
EanCustomAttributestring-Custom attribute name for EAN/barcode
ExcludedProductFieldsstring-Product fields to exclude from import (separated by ||)
MagentoIdFieldMappingstring-Custom attribute to use as product ID instead of SKU

Inventory Export Properties

PropertyTypeDefaultDescription
IsInventoryExportOnlyForPrimaryWarehousesboolfalseOnly export inventory from primary warehouses

Property Mapping (Product Export)

Map Omnium product fields to Magento custom attributes using map_ prefixed properties:

PropertyDescription
map_VariantParentIdMaps to configurable product's parent ID
map_BrandMaps Brand field to specified Magento attribute
map_ColorMaps Color field to specified Magento attribute
map_SizeMaps Size field to specified Magento attribute
map_{PropertyName}Maps any product property to a Magento attribute

Example configuration:

{
  "Properties": [
    { "Key": "map_Brand", "Value": "manufacturer" },
    { "Key": "map_Color", "Value": "color" },
    { "Key": "map_Size", "Value": "size" }
  ]
}

Market Configuration

For multi-store Magento setups, configure markets with Magento store codes:

PropertyEntityDescription
magentoStoreCodeMarketMagento store view code for product content
magentoStoreIdStoreMagento website ID for inventory source

Store Configuration

PropertyEntityDescription
MagentoSourceCodeStore (ExternalId)Magento MSI source code for inventory
MagentoIsStoreExcludedStoreExclude store from inventory export

Order Import

Orders are imported from Magento via the MagentoOrderScheduledTask. The scheduler polls Magento for orders changed since the last sync.

Import Flow

  1. Scheduled task queries Magento for orders updated since last sync (minus 10 minutes buffer)
  2. Orders are paginated and fetched in batches of 100
  3. Each Magento order is mapped to an Omnium order
  4. New orders with status New or PaymentReview are processed through the order workflow
  5. Existing orders are updated if not already in a progressed state

Order Status Mapping

Magento StatusOmnium StatusDescription
new, processing, created, svea_pendingNewNew order ready for processing
pending, pending_payment, payment_reviewPaymentReviewOrder awaiting payment confirmation
packingInProgressOrder being fulfilled
completeShipOrder shipped
canceledOrderCanceledOrder canceled
returned, closedReturnedOrder returned/refunded
holdedOnHoldOrder on hold

Payment Mapping

The integration maps various payment methods automatically:

Payment MethodHandling
klarna_kcoExtracts transaction ID from status history comments
vippsUses order increment ID as transaction ID (configurable)
netaxeptExtracts GUID from status history
sveacheckout (Swish/Trustly)Adds automatic capture transaction
Gift Cards (FrontSystems, AW)Creates separate payment entries
Reward PointsCreates bonus point payment

Shipping Integration

The integration supports multiple shipping providers:

  • Ingrid: Reads TOS ID, carrier, location from extension attributes
  • Klarna Shipping Assistant: Reads delivery details from Klarna extensions
  • Porterbuddy: Fetches tracking number from Magento shipments
  • Service Points: Extracts service point ID from shipping method name

Order Properties

PropertyDescription
MagentoEntityIdMagento order entity ID
MagentoStatusOriginal Magento status
IngridTosIdIngrid Transport Order Session ID
MagentoExternalCustomerIdExternal customer ID from Magento

Order Export

Orders are exported to Magento when workflow triggers.

Export Operations

OperationPropertyDescription
InvoiceIsExportInvoiceEnabledCreates invoice in Magento
ShipIsExportShipOrderEnabledCreates shipment in Magento
StatusIsExportStatusEnabledUpdates order status in Magento

Export Flow

  1. Order reaches export workflow step
  2. Exporter checks which operations are enabled
  3. For invoice: Calls POST /V1/order/{id}/invoice
  4. For ship: Calls POST /V1/order/{id}/ship
  5. For status: Calls order status update endpoint
  6. Success/failure tracked via order properties

Export Properties

PropertyDescription
MagentoInvoiceExportSet to true after successful invoice
MagentoShipOrderExportSet to true after successful shipment
MagentoOrderStatusExportSet to true after successful status update

Product Import

Products are imported from Magento via scheduled tasks that support both delta and full imports.

Scheduled Tasks

TaskDescription
MagentoProductImporterScheduledTaskDelta import of changed products
MagentoFullProductImporterScheduledTaskFull catalog import

Import Flow

  1. Task queries Magento for products changed since last sync
  2. Configurable products and their variants are processed together
  3. Simple products are identified as standalone or variants based on visibility
  4. Products are enriched with existing Omnium data and saved

Product Type Handling

Magento TypeOmnium Handling
simple (visibility=1)Imported as variant of parent product
simple (visibility>1)Imported as standalone product
configurableImported as product with variants
bundleVariants flattened into individual products

Field Mapping

Magento FieldOmnium Field
skuSkuId, ProductId
nameName
pricePrices[].UnitPrice
special_pricePrices[] (with ValidFrom/ValidUntil)
statusIsActive (2=Disabled)
descriptionDescription
short_descriptionShortDescription
imageMainImageUrl
media_gallery_entriesAssets
category_idsCategoryIds, ProductCategories
cost_price / price_inCost
warehouse_locationLocation
delivery_dateExpectedDeliveryDate

Custom Attribute Mapping

Magento AttributeOmnium Field
brand / manufacturer / brandsBrand
colorColor
size (and variants)Size
supplierSupplierName
supplier_article_number / supplier_skuSupplierSkuId
seasonSeason
front_genderGender
front_product_idExternalId (FrontSystemsId)

Product Export

Products are exported to Magento when Omnium is the master system (IsOmniumMasterForProducts=true).

Export Flow

  1. Products trigger export via scheduled task or manual action
  2. Products are mapped to Magento format with configured attribute mappings
  3. Products are grouped by market/store view
  4. Batch PUT requests update products in Magento
  5. Configurable product links are created for parent-child relationships

Mapping Configuration

Use map_ prefixed properties to map Omnium fields to Magento attributes:

{
  "Properties": [
    { "Key": "map_Brand", "Value": "manufacturer" },
    { "Key": "map_VariantParentId", "Value": "parent_sku" },
    { "Key": "map_Color", "Value": "color" },
    { "Key": "map_Size", "Value": "size" }
  ]
}

Website Assignment

Products are assigned to Magento websites based on store configuration:

  • Store must have magentoStoreId property set
  • Product must be assigned to the store in Omnium

Inventory Export

Inventory is exported from Omnium to Magento.

Export Methods

Single Source (Legacy)

  • Uses PUT /V1/products/{sku}/stockItems/{itemId}
  • Requires IsInventoryExportOnlyForPrimaryWarehouses=true
  • Only exports inventory for primary warehouses

Multi-Source Inventory (MSI)

  • Uses POST /V1/inventory/source-items
  • Supports multiple warehouses/sources
  • Each store maps to a Magento source via MagentoSourceCode external ID

Export Flow

  1. Inventory change triggers export
  2. Store is validated (must be warehouse, not excluded)
  3. Source code is resolved from store external ID or store ID
  4. Available quantity is calculated
  5. Source item is posted to Magento with status (1=in stock, 0=out of stock)

Configurable Product Stock

When a variant comes back in stock, the exporter also checks if the configurable (parent) product needs its stock status updated.

Scheduled Task

TaskDescription
MagentoInventoryExporterScheduledTaskFull inventory export for changed items

Customer Sync

Customers are imported from Magento via the MagentoCustomersScheduledTask.

Import Flow

  1. Task queries Magento for customers changed since last sync
  2. Customers are matched by email address
  3. New customers are created in Omnium
  4. Customer club memberships are synchronized

Field Mapping

Magento FieldOmnium Field
emailId, CustomerNumber, Email
firstnameFirstName
lastnameLastName
addresses[0].telephonePhone
genderGender (0=Male, 1=Female)
addresses[0].*Address

External IDs

ProviderDescription
MagentoIdMagento customer entity ID

Customer Club Integration

The MagentoCustomerClubService synchronizes customer group memberships with Omnium customer clubs using the MagentoCustomerClubGroupId property.

Scheduled Tasks

Task NameGroupTypeDescription
MagentoOrderScheduledTaskPluginsDeltaImport orders from Magento
MagentoProductImporterScheduledTaskPluginsDeltaImport changed products
MagentoFullProductImporterScheduledTaskPluginsFullFull catalog import
MagentoInventoryExporterScheduledTaskPluginsDeltaExport inventory to Magento
MagentoCustomersScheduledTaskPluginsDeltaImport customers from Magento

External IDs and Properties

External ID Providers

ProviderEntityDescription
MagentoEntityIdOrder, ProductMagento entity ID
MagentoIdCustomerMagento customer ID
MagentoSourceCodeStoreMagento MSI source code
MagentoExternalOrderIdOrderExternal order ID
FrontSystemsIdProductFrontSystems product ID

Order Properties

PropertyDescription
MagentoEntityIdMagento order entity ID
MagentoStatusOriginal Magento status
MagentoInvoiceExportInvoice export completed
MagentoShipOrderExportShipment export completed
IngridTosIdIngrid session ID

Product Properties

PropertyDescription
IsExportedToMagentoProduct has been exported
ImportTagTag from import batch

Payment Provider Integration

Klarna

  • Transaction ID extracted from status history
  • Klarna reference stored in KlarnaReference property
  • Delivery details read from extension attributes

Svea (Swish/Trustly)

  • Payment type determined from svea_payment_method extension
  • Direct capture automatically added for Swish and Trustly payments

Vipps

  • Transaction ID can use order increment ID (IsVippsTransactionOrderId=true)

Gift Cards

  • FrontSystems gift cards: Enable via IsFrontSystemGiftCardEnabled
  • AW Gift Cards: Automatically detected from extension attributes

Workflow Integration

Order Import Workflow

Orders from Magento automatically enter the configured order workflow. The PaymentReview status marks orders as read-only until payment is confirmed.

Order Export Workflow Step

Add a workflow step using the Magento connector to trigger exports:

{
  "Name": "ExportToMagento",
  "Connector": "Magento",
  "Active": true
}

Error Handling

  • Order sync continues even if individual orders fail
  • Product import logs missing parent products for variants

Troubleshooting

Common Issues

IssuePossible CauseSolution
Orders not importingAPI token expiredRegenerate access token in Magento
Products missing variantsVisibility not set correctlyCheck VariantIdentifierCustomAttribute config
Inventory not updatingSource code mismatchVerify MagentoSourceCode external ID on store
Prices not syncing per marketMarket not configuredAdd magentoStoreCode property to market

Debugging Tips

  1. Check scheduled task logs for sync errors
  2. Verify connector options are correctly configured
  3. Test API connectivity with Magento admin
  4. Check order events for export status
  5. Verify market/store mappings for multi-store setups

API Endpoints Used

OperationEndpoint
Get OrdersGET /V1/orders
Get ProductsGET /V1/products
Get Product by IDGET /V1/products/{id}
Update ProductPUT /V1/products/{sku}
Get StockGET /V1/stockItems/{productSku}
Update StockPUT /V1/products/{sku}/stockItems/{itemId}
Post Source ItemsPOST /V1/inventory/source-items
Invoice OrderPOST /V1/order/{id}/invoice
Ship OrderPOST /V1/order/{id}/ship
Get CustomersGET /V1/customers/search
Get CategoriesGET /V1/categories
Get ShipmentsGET /V1/shipments
Get Product AttributesGET /V1/products/attributes/{attributeCode}