Skip to main content

Magento Product from iPaaS

Transfer iPaaS products to Magento products

Updated over 2 weeks ago

Overview

Magento Product can be transferred from iPaaS.com using an Add/Update sync method. This mapping supports the automated synchronization of Product records from iPaaS into Magento via the Product API.

Mapping Collection Status

  • Mapping Status: Enabled.

  • Trigger Events: The sync is triggered by the creation or update of products in Magento.

  • ID Format: When manually syncing, the Product ID from iPaaS is used.

  • Conflicting Mappings: This mapping applies only to Product. Ensure no other mappings target the same Magento entity to prevent data from being overwritten.

Custom Field Support

Description

Custom fields from the source system can be mapped or retrieved in iPaaS.com flows if additional information (such as external identifiers or attributes) is required during the sync.

To transfer custom field data to iPaaS.com, use the following formula:
return GetValueFromCustomField(AdditionalProperties, "[CustomFieldId]");

This function retrieves the value of a custom field using its ID in the From iPaaS.com flow.

Supported Child Collections

The integration supports the synchronization of the parent Product and its related child collections:

  • Product Address: Maps billing and shipping addresses.

  • Product Payment: Maps payment details.

  • Product Line: Maps individual product line items.

  • Product Tax: Maps tax details applied to the order.

System Caveats

Magento Caveats

  • Configurable products must be linked to at least one valid attribute (e.g., Color, Size).

  • Stock data for configurables does not control child availability; variant-level stock determines visibility.

  • AttributeSetId = 4 must exist in the Magento system (default set).

iPaaS.com Caveats

  • Only products marked with TrackingMethod == "Variant" will sync.

  • Missing Sku or Name fields will skip product creation.

  • Variant data must be available before configurable creation to ensure association.

Setup Requirements

Magento Configuration

  • AttributeSetId = 4 must correspond to the Default product attribute set.

  • Integration user must have write permissions for Products, Inventory, and Attributes.

iPaaS.com Configuration

  • Ensure each product family includes valid Sku, Name, and TrackingMethod values.

  • Variant (child) items must have matching configurable parent identifiers.

Authentication & Security

  • Magento2 API UserName: Used to access iPaaS API for fetching Company and related data.

  • Magento2 API Key: Used to access iPaaS API for fetching Company and related data.

Integration Flow

  1. Filter: Retrieve iPaaS products where TrackingMethod == "Variant".

  2. Transform: Apply dynamic and lookup mappings (status, tax class, price).

  3. Create Parent: Generate configurable product in Magento.

  4. Add Inventory: Create inventory records for configurable.

  5. Add Options & Values: Create attributes and possible option values.

  6. Add Units: Define product unit pricing and conversions.

  7. Create Variants: Generate simple products linked to the configurable.

  8. Add Variant Inventories and Options: Populate child stock and attribute relationships.

Mappings

Parent Collection: Magento Product From iPaaS

Mapping Filter:

TrackingMethod=="Variant"

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Description

Field

Sku

Sku

Field

Name

Name

Static

4

AttributeSetId

Dynamic Formula

CoalesceToDecimal(DefaultPrice,SalePrice)

Price

It returns the first value that is not null between DefaultPrice and SalePrice, converting it to a decimal. If DefaultPrice is not null, it returns that; otherwise, it returns SalePrice as a decimal.

Lookup Translation

Status

This mapping translation converts the iPaaS Product Status to Magento Product Status.

Static

4

Visibility

Static

configurable

TypeId

Dynamic Formula

CurrentDateTime()

CreatedAt

Dynamic Formula

Coalesce(Weight, "1")

Weight

Coalesce(Weight, "1") returns the value of Weight if it is not null; otherwise, it returns the string "1" as a default value.

Dynamic Formula

var result = await SumInventoryForProductAsync(ConvertToLong(Id)); (GetCustomFieldValue(CustomFields, "Parent Item") == "True" ? return 9999; : return result;)

StockItemQty

This code gets the total inventory for a product asynchronously, then returns 9999 if the "Parent Item" custom field is "True", otherwise it returns the calculated inventory.

Dynamic Formula

var result = await SumInventoryForProductAsync(ConvertToLong(Id)); (GetCustomFieldValue(CustomFields, "Parent Item") == "True" ? return true; : (result <= 0 ? return false; : return true;))

StockItemIsInStock

It returns true if the item is marked as a parent or if sum of the inventory is greater than zero; otherwise, it returns false.

Field

Parent Always In Stock (custom field)

AlwaysInStockOverride

Field

Parent URL Key Method (custom field)

UrlKeyMethodOverride

Lookup Translation

TaxClassId

Field

GetCustomFieldValue(CustomFields, "Parent Last Cost")

Cost

Dynamic Formula

(SalePrice < DefaultPrice && SalePrice > 0) ? SalePrice : null

SpecialPrice

It returns the sale price if it’s positive and lower than the default price; otherwise, it returns null.

Dynamic Formula

var keepExisting = new List<int> { -1 }; var exCategories = await ConvertCategoriesToMagentoIdsAsync(Categories); (GetCustomFieldValue(CustomFields, "Parent Item") == "True" ? return keepExisting; : return exCategories;)

CategoryIds

It sets a default list keepExisting, then asynchronously converts categories to Magento IDs. If the custom field "Parent Item" is "True", it returns the default list; otherwise, it returns the converted category IDs.

M2 Configurable Product Inventory Add iPaaS (Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Description

Lookup Translation

M2 Product Inventory Source Code From iPaaS

SourceCode

This mapping translations convert the iPaaS Location to Magento Source.

Dynamic Formula

Floor(QtyAvailable.Value)

Quantity

Floor(QtyAvailable.Value) rounds down the value of QtyAvailable to the nearest whole number (integer) less than or equal to it.

Dynamic Formula

(Floor(QtyAvailable.Value) <= 0 ? 0 : 1)

Status

It returns 0 if the available quantity is zero or less; otherwise, it returns 1.

M2 Configurable Product Options From iPaaS (Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Dynamic Formula

string trimmedName = OptionName.Trim(); return trimmedName.Replace(' ','_');

AttributeCode

Static

select

FrontendInput

Field

OptionName

DefaultFrontendLabel

M2 Configurable Product Option Values From iPaaS (Option’s Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Field

Value

Label

Field

Order

SortOrder

M2 Configurable Product Units From iPaaS (Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Description

Field

Name

UnitName

Field

Conversion

UnitConversion

Field

DefaultPrice

UnitPrice

Field

Child Alternate Unit Include (custom field)

UnitIncludeChildOverride

Field

Child Alternate Unit Denominator (custom field)

UnitConversionDenominatorChildOverride

Field

Child Alternate Unit Numerator (custom field)

UnitConversionNumeratorChildOverride

Field

Child Alternate Unit Name (custom field)

UnitNameChildOverride

Field

Child Alternate Unit Sale Price (custom field)

UnitSpecialPriceChildOverride

Field

Child Alternate Unit Default Price (custom field)

UnitPriceChildOverride

Dynamic Formula

var customOverride = GetCustomFieldValue(CustomFields, "Child Alternate Unit Barcode"); if (customOverride != null && customOverride != "" && Parent.TrackingMethod == "Variant") { return ChildBarcodeOverrideField("upc_code",customOverride); } else { return null; }

UnitBarcodeChildOverride

It returns a custom barcode override when a specific barcode exists and tracking is by variant; if not, it returns nothing.

M2 Simple Associated Product Variant From iPaaS (Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Field

Magento PriceTier_FormattedData (custom field)

Pricing_6

Field

Sku

Sku

Dynamic Formula

!IsEmpty(GetCustomFieldValue(CustomFields, "Child Name")) ? GetCustomFieldValue(CustomFields, "Child Name") : Parent.Name

Name

Static

4

AttributeSetId

Dynamic Formula

var origPrice = (IsEmpty(DefaultPrice) ? Parent.DefaultPrice : DefaultPrice) ; var salePrice = (IsEmpty(SalePrice) ? Parent.SalePrice : SalePrice) ; return CoalesceToDecimal(origPrice,salePrice);

Price

Lookup Translation

M2 Product Variant Status From iPaaS

Status

Static

1

Visibility

Static

simple

TypeId

Dynamic Formula

CurrentDateTime()

CreatedAt

Dynamic Formula

Coalesce(Weight, "1")

Weight

Dynamic Formula

var result = await SumInventoryForVariantAsync(ConvertToLong(Id)); return Floor(result);

StockItemQty

Dynamic Formula

var result = await SumInventoryForVariantAsync(ConvertToLong(Id)); var result2 = Floor(result); (result2 <= 0 ? return false; : return true;)

StockItemIsInStock

Field

Child Always In Stock (custom field)

AlwaysInStockOverride

Field

Child URL Key Method (custom field)

UrlKeyMethodOverride

Lookup Translation

M2 Product Variant Tax Class From iPaaS

TaxClassId

Dynamic Formula

GetCustomFieldValue(CustomFields, "Child Last Cost")

Cost

Dynamic Formula

var origPrice = (IsEmpty(DefaultPrice) ? Parent.DefaultPrice : DefaultPrice) ; var salePrice = (IsEmpty(SalePrice) ? Parent.SalePrice : SalePrice) ; (salePrice < origPrice && salePrice > 0) ? return salePrice : return null

SpecialPrice

M2 Simple Associated Product Variant Inventory From iPaaS (Variant’s Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Description

Lookup Translation

SourceCode

This mapping translation converts iPaaS product location to Magento Source.

Dynamic Formula

Floor(QtyAvailable.Value)

Quantity

Floor(QtyAvailable.Value) rounds down the value of QtyAvailable to the nearest whole number (integer).

Dynamic Formula

(Floor(QtyAvailable.Value) <= 0 ? 0 : 1)

Status

It converts the available quantity into a stock flag: 0 for no stock, 1 for available stock.

M2 Simple Associated Product Variant Option From iPaaS (Variant’s Child Collection)

Mapping Type

Source (iPaaS.com)

Destination (Magento)

Dynamic Formula

string trimmedName = OptionName.Trim(); return trimmedName.Replace(' ','_');

AttributeCode

Dynamic Formula

Value

Value

Lookup Translation

M2 Product Status From iPaaS

Source (iPaaS.com)

Destination (Magento)

Preorder

1

Active

1

Disabled

2

M2 Product Tax Class From iPaaS

M2 Product Inventory Source Code From iPaaS

Source (iPaaS.com)

Destination (Magento)

LocationId==LocationIdFromName("MAIN").Value

MAIN

LocationId==LocationIdFromName("EAST").Value

EAST

LocationId==LocationIdFromName("STORAGE").Value

STORAGE

Error Handling

Missing SKU

SKU field missing.

  • Description: A product without SKU cannot be created in Magento.

  • Resolution: Ensure each iPaaS product record includes a valid SKU.

Missing AttributeSetId

AttributeSetId not found in Magento.

  • Description: The default AttributeSet (ID 4) must exist.

  • Resolution: Validate that AttributeSet ID 4 exists and is active in Magento.

Invalid Variant Association

Variant not linked to configurable.

  • Description: Configurable product has no matching variant association.

  • Resolution: Verify variant mapping keys in iPaaS before sync.

Category or Attribute Missing

Category or option attribute not found.

  • Description: Magento requires valid attributes for configurable setup.

  • Resolution: Ensure all option attributes exist in Magento or are created prior to sync.

Validation Rules & Testing

Validation Checklist

  • Verify all configurable products appear in Magento with correct variants.

  • Check parent–child associations and attribute configurations.

  • Confirm that pricing, stock, and visibility match expected values.

  • Validate special pricing and category associations.

Test Scenarios

  1. New Configurable Product: Sync a new family with variants and confirm full structure.

  2. Missing Variant: Attempt to sync a parent without children (should be skipped).

  3. Stock Validation: Ensure stock statuses reflect correctly per variant.

  4. Unit Validation: Check conversion and pricing across unit levels.

Additional Notes

  • Parent Product validation must pass before any child collections can be synchronized.

Did this answer your question?