Skip to main content

iPaaS.com to Adobe Commerce/Magento 2 Order Mapping Documentation

How changes recorded in iPaaS.com are written back onto an existing Adobe Commerce/Magento 2 order, covering status, revised lines, comments and shipment tracking.

Summary

Changes recorded against an iPaaS.com Transaction are written back onto the Adobe Commerce/Magento 2 sales order it came from. This family updates existing Magento orders only — it never creates one. Orders originate in Magento and reach iPaaS.com through the inbound order family; this is the return path that carries status changes, revised line values, comments, and shipment tracking back to the store.

Two child collections run beneath the order update: one writes revised line values onto the order's line items, and one creates a shipment with tracking against the order.

ID Format

Manual Sync ID Format

Enter the iPaaS.com Transaction record identifier — the internal numeric identifier of the transaction in iPaaS.com, for example 90412.

The Magento order number is not accepted as a Manual Sync value; the Magento order is resolved from the transaction's stored link.

External ID Format

This family updates an order that has already been linked to Adobe Commerce/Magento 2, so it does not mint a new external-ID record. The external-ID record created when the order first transferred into iPaaS.com is what identifies which Magento order an update targets, and a transaction with no such link cannot be updated.

Deleted Record Support

Outbound delete is not supported. This family only updates orders that already exist in Adobe Commerce/Magento 2, and delete mappings are not included in the default templates.

Cancelling an order is expressed as a status change rather than a deletion — see the status mapping below.

Custom Field Support

This family reads several iPaaS.com custom fields, which must exist by these exact names for the behavior they control to work.

On the Transaction, read by the order update:

  • Order Status Comment: the text of a comment added to the Magento order's status history.

  • Order Comment Is Visible: whether that comment is shown on the storefront.

On the Transaction Line, read by the line child:

  • SellingUnit: appended to the SKU when present, so a unit-qualified line resolves to the right Magento line item.

On the Transaction Tracking record, read by the shipment track child:

  • Shipment Items: required — the shipment cannot be created without it.

  • Source To Ship From, Comment Value, Comment Is Visible On Front, Notify, Order Comment Value, Order Comment Is Visible, Order Comment Is Notified, Order Comment Status: optional controls over the shipment's source location, its comments, and customer notification.

Mapping Collection Status

Status: Enabled. All three collections ship enabled.

Trigger Events: Update of a Transaction record in iPaaS.com, plus Manual Sync on demand.

Automatic outbound transfers are enabled on the subscription's Outbound Data Flows page. Until that flow is enabled, no order updates are sent automatically. Manual Sync is always available regardless.

Duplicate or Conflicting Mappings

  • Add/Update Adobe Commerce/Magento 2 Order TO iPaaS.com and its nine children move order data in the opposite direction, from Magento into iPaaS.com. That family is the source of the orders this one updates. Enabling both is the normal configuration — an order arrives from Magento, is worked in iPaaS.com, and its changes are written back — but it does mean the same order is written from both sides, so decide which system is master for each field.

  • Add/Update Adobe Commerce/Magento 2 Standalone Shipment Track FROM iPaaS.com creates shipments with tracking against a Magento order without an order update above it. It and the shipment track child here do the same job by different routes; enabling both risks creating a shipment twice for the same tracking record.

  • Add/Update Adobe Commerce/Magento 2 Invoice FROM iPaaS.com writes invoices against the same Magento orders.

Duplicate matching

This integration implements no selectable collision-handling methods, and the behavior is not configurable on these collections. The order this update targets is resolved from the external-ID record created when the order first transferred into iPaaS.com.

Unmapped field overwrite risk

Mapped fields that carry a value overwrite the matching values on the Magento order each time the transaction transfers. The fields at risk are DiscountAmount, EntityId, Status, TaxAmount, Comment_Value and Comment_Is_Visible_On_Front on the order; DiscountAmount, DiscountPercent, OriginalPrice, QtyOrdered, RowTotal, Sku, TaxAmount, TaxPercent and Weight on each line; and the tracking and comment fields written by the shipment track child.

The integration provides no guarantee that unmapped or blank fields are preserved on an order update. Subscribers or their MiSP should validate in a staging environment which fields are affected on their own store before relying on manual edits to any order this family touches.

The mitigation is a DestinationValue. Where a Magento field must hold a specific value that iPaaS.com does not supply, set a DestinationValue on that mapping so the integration writes the value chosen there instead of taking it from the source.

Supported Child Collections

The parent collection is Update Adobe Commerce/Magento 2 Order FROM iPaaS.com. It is the parent of two child collections, neither of which transfers independently of it:

  • Update Adobe Commerce/Magento 2 Order Transaction Line FROM iPaaS.com: writes revised values onto the order's existing line items.

  • Update Adobe Commerce/Magento 2 Order Shipment Track FROM iPaaS.com: creates a shipment against the order and attaches the tracking number.

System Caveats

Adobe Commerce/Magento 2 Caveats

  • The order must already exist in Magento. This family updates; it never creates. An order that originated in iPaaS.com rather than Magento has nothing to update.

  • Magento constrains which state changes are legal. An order that is already fully invoiced cannot be invoiced again, one that is already fully shipped cannot be shipped again, and an order cannot be cancelled once it has been invoiced or shipped. Attempting any of these produces an error.

  • Line items are matched by SKU. The line child updates existing line items rather than adding them; a SKU that does not match a line on the order has nothing to update.

  • Shipment source codes are case-sensitive. The source the shipment ships from must match a Magento inventory source code exactly.

  • Order updates are subject to Magento's API limits. Stagger large manual catch-up runs rather than issuing them concurrently.

iPaaS.com Caveats

  • The transaction must be linked to a Magento order. The update targets the order named by the external-ID record; a transaction with no link is skipped by the filter.

  • Only transactions of type Order are processed. The filter admits nothing else.

  • The shipment track child requires Shipment Items. Without that custom field the shipment cannot be built, and the transfer stops with an explicit message.

  • Status values are translated by formula, not by a Lookup Translation. The formula ships as an example covering three iPaaS.com statuses, and is edited in the mapping interface to match the store's workflow.

Integration-Specific Caveats

  • The status mapping is an example to adapt. It ships recognising Pending, Complete and Cancelled, and returning Magento's pending status for anything else. Stores map iPaaS.com statuses to their own order workflow, so subscribers or their MiSP are expected to edit this formula to match the statuses their process uses and the Magento statuses they should produce.

  • The shipment track child and the standalone shipment track collection overlap. Enabling both can create a shipment twice for the same tracking record.

  • The two shipment paths ship with different example values. The child here uses an order comment of "Shipment Created" and a notify fallback of true; the standalone collection uses different examples. Both are configurable, so set each to the store's notification policy rather than assuming the two behave alike.

Setup Requirements

Adobe Commerce/Magento 2 Configuration

  • Confirm the inventory source codes shipments will ship from, exactly as spelled and cased in Magento.

  • Confirm the order statuses the store uses, so the status formula can be extended to match.

iPaaS.com Configuration

  • Confirm the inbound order family is enabled and orders are transferring, since this family can only update orders that already arrived from Magento.

  • Create the custom fields listed under Custom Field Support above, and populate Shipment Items on any tracking record that should create a shipment.

  • Edit the status formula so it covers the iPaaS.com statuses the workflow uses and produces the Magento statuses the store's process expects.

  • Decide whether shipments are created through this family's child or through the standalone shipment track collection, and enable only one.

  • Enable the outbound flow for Adobe Commerce/Magento 2 orders on the subscription's Outbound Data Flows page.

Full step-by-step setup instructions are in the Adobe Commerce/Magento 2 Installation Instructions article.

Integration Flow

  1. A Transaction is updated in iPaaS.com, or a Manual Sync is run against one.

  2. The transaction is evaluated against the parent collection's filter, which admits only transactions of type Order that are linked to a Magento order.

  3. The Magento order is resolved from the external-ID record, and the order-level values — status, tax, discount, and any status-history comment — are written to it.

  4. The line child runs against the transaction's lines, resolving each to a Magento line item by SKU and writing the revised line values.

  5. The shipment track child runs against the transaction's tracking records. For each one carrying Shipment Items, it resolves the Magento order and the line items being shipped, creates a shipment against the order, and attaches the tracking number and comments.

Mappings

Update Adobe Commerce/Magento 2 Order FROM iPaaS.com (Parent)

iPaaS.com data type: Transaction

Mapping Filter

var orderType = Type == "Order" ? true : false;
var hasOrder = true;
var transactionExternalId = await GetExternalIdAsync(Id, "Transaction", SpaceportSystemId);
if(transactionExternalId != null){
   hasOrder = true;
}
if(orderType && hasOrder) {
    return true;
}
else {return false; }

This filter admits a transaction only when its type is Order. It also looks up the external-ID record linking the transaction to a Magento order. Records that do not pass are skipped without error.

Note that the external-ID lookup does not currently affect the outcome: the hasOrder value is set to true before the lookup runs and is not changed by it, so the type check alone decides whether a record passes. A transaction of type Order that has never been linked to a Magento order therefore passes the filter and fails later, when the order cannot be resolved, rather than being skipped here. Subscribers or their MiSP who want unlinked transactions filtered out cleanly should set hasOrder from the lookup result.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Adobe Commerce/Magento 2)

Description

Dynamic Formula

var transactionExternalId = await GetExternalIdAsync(Id, "Transaction", SpaceportSystemId); return transactionExternalId;

EntityId

Required. Resolves which Magento sales order this update targets, from the record linking the iPaaS.com Transaction to the Magento order. Without it, the update has no target.

Dynamic Formula

var orderStatus = "pending"; if(Status == "Pending") { orderStatus = "processing"; } if(Status == "Complete") { orderStatus = "complete"; } if(Status == "Cancelled") { orderStatus = "canceled"; } return orderStatus;

Status

Recommended. Example mapping — adapt to your order process. As shipped it maps Pending to processing, Complete to complete and Cancelled to canceled, returning pending for any other value. Edit the formula to cover the iPaaS.com statuses your workflow uses and the Magento statuses they should produce.

Field

TaxAmount

TaxAmount

Optional. Carries the order-level tax total toward the Magento order.

Field

DiscountAmount

DiscountAmount

Optional. Carries the order-level discount total toward the Magento order.

Dynamic Formula

var orderStatusComment = GetCustomFieldValue(CustomFields, "Order Status Comment"); if(orderStatusComment != null){ return orderStatusComment; } return null;

Comment_Value

Optional. Adds a comment to the Magento order's status history, from the Order Status Comment custom field. No comment is added when the field is empty.

Dynamic Formula

var orderCommentIsVisible = GetCustomFieldValue(CustomFields, "Order Comment Is Visible"); if(orderCommentIsVisible != null){ return orderCommentIsVisible; } return null;

Comment_Is_Visible_On_Front

Optional. Controls whether that comment is shown on the storefront, from the Order Comment Is Visible custom field.

Update Adobe Commerce/Magento 2 Order Transaction Line FROM iPaaS.com (Child)

iPaaS.com data type: Transaction Line

This collection carries no mapping filter. Every line on the transferring transaction is processed. It updates line items that already exist on the Magento order; it does not add lines.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Adobe Commerce/Magento 2)

Description

Dynamic Formula

var unit = GetCustomFieldValue(CustomFields, "SellingUnit"); if(unit != null) { return Sku+"^"+unit; } return Sku;

Sku

Required. Identifies which line item on the Magento order to update. Where the line carries a SellingUnit custom field, the unit is appended to the SKU after a caret so a unit-qualified line resolves correctly. A SKU that matches no line on the order has nothing to update.

Field

Qty

QtyOrdered

Recommended. The revised ordered quantity for the line.

Field

ExtendedPrice

RowTotal

Optional. The revised extended line amount.

Field

OriginalUnitPrice

OriginalPrice

Optional. The revised original unit price.

Field

DiscountAmount

DiscountAmount

Optional. The revised line discount amount.

Field

DiscountPercent

DiscountPercent

Optional. The revised line discount percentage.

Field

EstimatedTaxAmount

TaxAmount

Optional. The revised line tax amount.

Field

TaxPercent

TaxPercent

Optional. The revised line tax rate.

Field

Weight

Weight

Optional. The revised line weight.

Update Adobe Commerce/Magento 2 Order Shipment Track FROM iPaaS.com (Child)

iPaaS.com data type: Transaction Tracking Number

Mapping Filter

var shipmentItems = GetCustomFieldValue(CustomFields, "Shipment Items");if(shipmentItems != null){
    return true;
}
else{    throw new Exception("Shipment Items are not provided");
    return false;
}

This filter passes when the tracking record carries a Shipment Items custom field. When it does not, the filter stops the transfer with an error rather than skipping the record silently:

"Shipment Items are not provided"

Search the Error Logs for that text to find affected tracking records. The remedy is to populate the Shipment Items custom field on the iPaaS.com tracking record with the items being shipped, then re-transfer.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Adobe Commerce/Magento 2)

Description

Dynamic Formula

return await GetOrderIdByOrderNumber(Parent.TransactionNumber);

OrderId

Required. Resolves the Magento order the shipment is created against, by the parent transaction's number.

Dynamic Formula

Shipment line resolution — see the shipment items note below

ShipmentItems

Required. Resolves the Magento line items being shipped, from the Shipment Items custom field. Without a resolved order and items, no shipment is created.

Field

TrackingNumber

TrackNumber

Required. The tracking number attached to the shipment.

Field

ShippingMethodDescription

Title

Recommended. The shipment title shown in Magento, from the shipping method description.

Dynamic Formula

return ShippingMethod.ToLower();

CarrierCode

Recommended. The Magento carrier code, lower-cased from the iPaaS.com shipping method. The result must match a carrier code configured in Magento.

Dynamic Formula

var sourceToShipFrom = GetCustomFieldValue(CustomFields, "Source To Ship From"); if(sourceToShipFrom != null) { return sourceToShipFrom; } return "MAIN";

Atrributes_SourceCode

Optional. The Magento inventory source the shipment ships from. Placeholder value — replace during implementation: the fallback source code MAIN is an example. Replace it with the store's own default source code, matching Magento's spelling and casing exactly.

Dynamic Formula

var notify = GetCustomFieldValue(CustomFields, "Notify"); if(notify != null) { return notify; } return true;

Notify

Optional. Whether Magento emails the customer about the shipment, from the Notify custom field. The shipped fallback is an example value — set it, or the custom field, to match the store's notification policy.

Dynamic Formula

var commentValue = GetCustomFieldValue(CustomFields, "Comment Value"); if(commentValue != null) { return commentValue; } return null;

Comment_Value

Optional. A comment attached to the shipment itself.

Dynamic Formula

var isVisible = GetCustomFieldValue(CustomFields, "Comment Is Visible On Front"); if(isVisible != null) { return isVisible; } return 1;

Comment_Is_Visible_On_Front

Optional. Whether the shipment comment is shown on the storefront. Defaults to visible.

Dynamic Formula

var commentValue = GetCustomFieldValue(CustomFields, "Order Comment Value"); if(commentValue != null) { return commentValue; } return "Shipment Created";

Order_Comment_Value

Optional. A comment added to the order's status history when the shipment is created. Defaults to Shipment Created.

Dynamic Formula

var commentIsVisible = GetCustomFieldValue(CustomFields, "Order Comment Is Visible"); if(commentIsVisible != null) { return commentIsVisible; } return 1;

Order_Comment_Is_Visible_On_Front

Optional. Whether that order comment is shown on the storefront. Defaults to visible.

Dynamic Formula

var commentIsNotified = GetCustomFieldValue(CustomFields, "Order Comment Is Notified"); if(commentIsNotified != null) { return commentIsNotified; } return null;

Order_Comment_Is_Customer_Notified

Optional. Whether the customer is recorded as notified of that order comment.

Dynamic Formula

var commentStatus = GetCustomFieldValue(CustomFields, "Order Comment Status"); if(commentStatus != null) { return commentStatus; } return null;

Order_Comment_Status

Optional. The status recorded alongside that order comment.

Shipment items resolution

The ShipmentItems mapping resolves which Magento line items the shipment covers. It first resolves the Magento order — by the parent transaction's number, falling back to the transaction's external-ID record — then passes the Shipment Items custom field to a line-item lookup that matches each entry to a line on that order, taking account of the selling unit. If either the order or the shipment items cannot be resolved, it returns nothing and no shipment is created.

var orderId = await GetOrderIdByOrderNumber(Parent.TransactionNumber);if(orderId == null) {
    orderId = await GetExternalIdAsync(Parent.Id, "Transaction", SpaceportSystemId);
}var shipmentItems = GetCustomFieldValue(CustomFields, "Shipment Items");
if(shipmentItems != null && orderId != null) {return await GetLineItemIdByOrderSku(orderId,shipmentItems,Parent.Id.ToString(),"SellingUnit");
}return null;

The format of the Shipment Items value is controlled by the Shipment Items Field Separator and Shipment Items Record Delimiter presets on the subscription. Those are documented in the Magento 2 Connection and Settings article.

Error Handling

The full catalog of messages this integration produces, with causes and resolutions, is in the Adobe Commerce/Magento 2 Error Messages article. The conditions most often seen on this transfer are:

  • Error message: Shipment Items are not provided. The tracking record carries no Shipment Items custom field. Resolution: populate it with the items being shipped, then re-transfer.

  • The order cannot be cancelled because everything is shipped and invoiced. Magento does not permit cancelling at that point. Resolution: use a credit memo in Magento instead.

  • The order cannot be cancelled because of previously invoiced items. Resolution: handle the reversal through a credit memo in Magento.

  • The order has already been fully shipped. A shipment was requested for an order with nothing left to ship. Resolution: confirm the tracking record is not a duplicate.

  • Not all shipment products were found on the original order. The shipment items name SKUs that are not on the order. Resolution: correct the shipment items to match the order's lines.

  • Insufficient inventory at the shipment location. The source being shipped from does not hold enough stock. Resolution: correct the source, or adjust stock in Magento.

Errors are reported under Dashboard / Integration Monitoring / Error Logs.

Testing & Validation

Test Scenarios

  1. Transfer an order from Magento into iPaaS.com, change its status to Complete, and confirm the Magento order moves to complete.

  2. Manually sync using the iPaaS.com Transaction record identifier and confirm it resolves; confirm the Magento order number does not.

  3. Set the transaction status to Cancelled on an order that has not been invoiced or shipped, and confirm the Magento order is cancelled.

  4. Attempt the same on an order that has been invoiced, and confirm the documented error is raised.

  5. Set a status the shipped example formula does not cover — Shipped, for example — and confirm the resulting Magento status, then adapt the formula to the store's workflow and re-test.

  6. Populate Order Status Comment and confirm the comment appears in the Magento order's status history with the expected storefront visibility.

  7. Change a line quantity in iPaaS.com and confirm the matching Magento line item is updated.

  8. Change a line whose SKU carries a selling unit and confirm it resolves to the correct Magento line.

  9. Create a tracking record with Shipment Items populated and confirm a shipment is created against the order with the tracking number attached.

  10. Create a tracking record without Shipment Items and confirm the transfer stops with the documented message.

  11. Confirm the shipment ships from the intended inventory source, and that the fallback source code has been replaced.

  12. Confirm the shipment notification behavior matches the store's policy, adjusting the Notify custom field or its fallback as needed.

Validation Checklist

  • The inbound order family is enabled and orders are transferring, so there are orders to update.

  • Every custom field listed under Custom Field Support exists in the iPaaS.com environment.

  • The status formula has been adapted to the store's own order workflow.

  • The fallback inventory source code has been replaced with the store's own, matching Magento's casing.

  • The shipment items separator and delimiter presets match the format of the Shipment Items values.

  • Only one of this family's shipment track child and the standalone shipment track collection is enabled.

Additional Notes

  • This family updates orders and never creates them. An order that does not exist in Magento cannot be written by it.

  • The status formula is an example mapping. Editing it to match the store's own order workflow is a normal implementation step, not a workaround.

  • The parent filter's external-ID lookup does not currently influence whether a record passes; unlinked transactions fail downstream rather than being filtered out.

  • Validate the status mapping, the shipment source code, and the notification defaults in a staging environment before enabling automatic transfers in production.

Related Documents

Did this answer your question?