Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.alumio.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Magento 2 Order Restructure is a configuration-based transformer that restructures the raw order payload received from Magento 2 into a format suitable for further processing or delivery to a target system. It replaces the prototype-based magento2-order-restructure previously used in the Legacy Magento 2 Connector.
This component has been migrated from a prototype-based implementation to a configuration-based setup as part of the Legacy Magento 2 Connector replacement project.

Prototype vs Configuration-based

This is an important behavioral difference to understand before setting up this component.
Prototype-basedConfiguration-based
ReusabilityCan be reused across different flows by changing a few fieldsNot reusable across different purposes or payloads
FlexibilityOne prototype can serve multiple use cases(Not always) Each use case requires its own dedicated configuration
How to reuseModify fields directlyDuplicate the configuration and adjust as needed
If you need to transform a different payload structure or serve a different use case, you must duplicate this transformer and adjust the configuration accordingly. Do not modify an existing configuration as another Route already uses it.

Type

Transformer

Purpose

This transformer takes the raw order data from Magento 2 and restructures it into a normalized format. This typically includes flattening nested structures, renaming fields, mapping values, and preparing the payload for the target system.

Configuration

ParameterDescriptionRequired
stateSet the field for state (state/status/both)Yes
mutation-storageThe storage to set the mutation dateYes

Usage

  1. Navigate to Transformers in your Alumio environment.
  2. Search for or create a new Magento 2 Order Restructure transformer.
  3. Configure the field mappings and optional parameters as described above.
  4. Add this transformer to the relevant route in the transformation step.

Deprecated VS New

An example of the deprecated configuration:
Image
An example of the new configuration:
Image

Notes

  • Replaces the prototype: magento2-order-restructure
  • Unlike the prototype-based implementation, this configuration-based transformer is not reusable across different purposes or payloads. If you need to transform a different payload structure or serve a different use case, you must duplicate this transformer and adjust the configuration accordingly.
  • Field mapping should be reviewed carefully to ensure it matches the target system’s expected payload structure.