Skip to main content

OroCommerce Add/Update Price Lists FROM iPaaS.com

Add or Update iPaaS.com bulk pricing records in OroCommerce

Updated over a week ago

Overview

This integration transfers iPaaS bulk pricing records to OroCommerce as Price Lists. When a bulk pricing record with an Applies To association is created or updated in iPaaS, the corresponding Price List and Product Prices are synchronized to OroCommerce, along with the associated customer group assignments.

ID Format

When manually transferring a bulk pricing from iPaaS, enter the valid iPaaS bulk pricing ID (internal ID) into the iPaaS input field on the manual sync page. For example, use: 145146.

External ID Format: Bulk Pricing (Parent)

The iPaaS Bulk Pricing External ID consists of the OroCommerce Price List ID, Product Price ID, and Price List Customer Group IDs, all stored together as a single External ID. For example, 36|77159a94-a283-4988-91cc-fa843561d1a3-36|57|58|59
where:

  • 36: Price List ID

  • 77159a94-a283-4988-91cc-fa843561d1a3-36: Product Price ID

  • 57 | 58 | 59: Associated Price List Customer Group IDs

Deleted Record Support

This integration supports the removal of Product Prices when deleting Bulk Pricing from iPaaS, ensuring that stale prices don’t remain.

NOTE: Bulk Pricing delete mappings to iPaaS.com are included in the templates by default. Remove this mapping if you want to disable this functionality.

Custom Field Support

This integration supports custom fields for both the OroCommerce Price Lists and Product Prices.

NOTE: For Price Lists, the custom field module must be Price List. For Product Price, the custom field module must be Product Price.

Creating Custom Fields in OroCommerce

  1. In OroCommerce, click System > Entities > Entity Management.

  2. Locate and select the module (entity) where you want to add the custom field (Price List or Product Price).

  3. Click Create Field and create a custom field.

  4. Enter a unique Field Name and select a Storage Type. We recommend selecting Serialized Field as the Storage Type to avoid manual schema updates.

    • Table Column: Requires a schema update. The custom field is not available until the schema update completes. Contact your OroCommerce administrator before changing an entity schema to prevent unexpected service downtime. After creating a table column field, a red Update Schema button will appear on the page. Click Update Schema to apply the changes.

    • Serialized Field: The custom field is added to the schema automatically.

  5. Set field type as String. Other simple data types, such as Number or Boolean, are supported when using compatible mappings.

  6. Click Continue.

  7. Edit the field information on the next page if necessary, then click Save and Close.

  8. After creating the field, click Update Schema (if required by Storage Type).

Creating Custom Fields in iPaaS.com

  1. In iPaaS.com, click Data Management > Custom Fields > Add Custom Field.

  2. Enter a unique Field Name exactly matching the OroCommerce custom field name.

  3. Select the Module (Price List or Product Price), and set the Data Type to String.

  4. Add a Description.

  5. Click Save.

Set up the Custom Field values in iPaaS.com

  1. In iPaaS.com, to set a custom field value, navigate to Bulk Pricing for the module where you want to set the custom field.

  2. For example, go to Bulk Pricing, click Edit, then click Add under the Custom Fields section.

  3. Select an existing custom field in iPaaS.com, or create a new one if needed, and enter the value in the Value field.

  4. Click Apply.

Mapping Collection Status

  • Mapping Status: Enabled

  • Trigger Events: Create, Update

Duplicate or Conflicting Mappings

This mapping applies only to Bulk Pricing from iPaaS. Ensure no other mappings target the same OroCommerce Price List entity to prevent data from being overwritten.

System Caveats

OroCommerce Caveats

  • Price List names must be unique; OroCommerce does not allow duplicates

  • Product Prices must reference a Price List, unit, currency, product or variant, quantity, and value

  • Only a single unit is supported for pricing

  • Price List currencies must include at least one valid currency

  • Custom fields require entity schema configuration (Serialized Field storage type recommended)

  • Customer groups must exist before assignment to Price Lists

  • Customer groups must be removed from Price Lists manually due to the global nature of OroCommerce Price Lists

iPaaS Caveats

  • Bulk Pricing records must have valid Product external IDs, or AutoCreateProduct must be enabled

  • Customer Category external IDs must exist, or AutoCreateCustomerGroup must be enabled

  • Currency and unit data must have corresponding external identifiers in OroCommerce

Authentication and Security

OroCommerce uses OAuth 2.0 authentication to generate an access token. This token authorizes all OroCommerce API requests during transfer operations.

Integration Flow

The integration processes iPaaS bulk pricing as follows:

  1. The integration is triggered when a bulk pricing record is created or updated in iPaaS.

  2. Price List details are mapped and validated against OroCommerce requirements.

  3. If Customer categories (Applies To association) are assigned, the system verifies they have been transferred to OroCommerce.

  4. Products and customer groups are verified or auto-created if HandlePrerequisite is enabled.

  5. The Price List, along with its Product Prices and associated Customer Groups, is created or updated in OroCommerce.

  6. Associated customer group assignments are processed through the child collection.

  7. Upon successful transfer, the OroCommerce ID is saved as the External ID in iPaaS.

Supported Child Collections

This parent mapping collection supports the following child collection:

Mappings

Parent Collection: Add/Update OroCommerce Price Lists FROM iPaaS.com

Mapping Filter

TableId == 1 || TableId == 4

Description

This mapping filter controls when a Price List is allowed to be created or processed. It only allows the mapping to run for records related to products or product variants (TableId 1 or 4).
Records that do not belong to these table types are ignored by the mapping.

Mapping Type

Source Field (iPaaS)

Destination Field (OroCommerce)

Description

Dynamic Formula

return await GetExternalIdAsync(Id, "Bulk Price", SpaceportSystemId);

Id

Retrieves the external ID of the Bulk Price from iPaaS. Required.

Static

pricelists

PriceLists_Type

Sets the OroCommerce PriceLists_Type to the static value pricelists. Required.

Static

productprices

ProductPrices_Type

Sets the OroCommerce ProductPrices_Type to the static value productprices. Required.

Static

organizations

PriceLists_Relationships_Organization_Type

Sets the OroCommerce organization relationship type to organizations. Recommended.

Static

true

PriceLists_Attributes_Active

Sets the OroCommerce Price List Active attribute to true. Recommended.

Dynamic Formula

if(BulkPrice < 10000) { return "Price List Less Than 10000"; } else if (BulkPrice >= 10000 && BulkPrice < 20000) { return "Price List Less Than 20000 and Greater than 10000"; }

PriceLists_Attributes_Name

Assigns a Price List name dynamically based on the BulkPrice value. Required.

Dynamic Formula

return new List<string> { "USD", "EUR" };

PriceLists_Attributes_PriceListCurrencies

Sets the Price List currencies to USD and EUR. Required.

Static

1

Pricelists_Relationships_Organization_Id

Sets the organization ID for the Price List relationship. Recommended.

Field

Quantity

ProductPrices_Attributes_Quantity

Maps the iPaaS Quantity to the OroCommerce Product Price Quantity. Required.

Dynamic Formula

return await GetiPaaSCurrencyNameByIdAsync(CurrencyId);

ProductPrices_Attributes_Currency

Retrieves the currency name from iPaaS by ID and maps it to the Product Price currency. Required.

Field

BulkPrice

ProductPrices_Attributes_Value

Maps the iPaaS BulkPrice to the OroCommerce Product Price value. Required.

Dynamic Formula

return await GetOroCommerceProductOrVariantIdAsync(InternalId, 1);

ProductPrices_Relationships_Product_Id

Retrieves the OroCommerce Product or Variant ID for the given InternalId. Required.

Dynamic Formula

object oroCommerceId = await GetExternalIdAsync(InternalId, "Product", SpaceportSystemId); if(oroCommerceId == null) { oroCommerceId = await GetExternalIdAsync(InternalId, "Product Variant", SpaceportSystemId); } if(oroCommerceId != null) { return await GetOroCommerceProductUnitIdByProductIdAsync(oroCommerceId.ToString()); } return null;

ProductPrices_Relationships_Unit_Id

Retrieves the Product Unit ID from OroCommerce for the given Product or Product Variant. Returns null if no mapping exists. Required.

Child Collection: Add/Update OroCommerce Price Lists Customer Groups FROM iPaaS.com

Mapping Filter

TableId == 39

Description

This mapping filter ensures that the Applies To association contains only valid Customer Category associations.

Mapping Type

Source Field (iPaaS)

Destination Field (OroCommerce)

Description

Static

pricelisttocustomergroups

Type

Sets the OroCommerce Type to pricelisttocustomergroups. Required.

Static

1

Attributes_SortOrder

Sets the OroCommerce SortOrder attribute to 1. Recommended.

Static

false

Attributes_MergeAllowed

Sets the OroCommerce MergeAllowed attribute to false. Recommended.

Static

customergroups

Relationships_CustomerGroup_Type

Sets the OroCommerce Customer Group relationship type to customergroups. Required.

Dynamic Formula

return await GetExternalIdAsync(InternalId, "Customer Category", SpaceportSystemId);

Relationships_CustomerGroup_Id

Retrieves the external ID of the Customer Category from iPaaS. Required.

Error Handling

Missing Required Field

Required field is missing.

  • Description: This error occurs when OroCommerce rejects a Bulk Pricing, Price List, or Product Price create/update request due to missing required fields.

  • Resolution: Ensure all required fields are populated:

    • Price List Name

    • Product Price Value

    • Quantity

    • Currency

    • Product ID

    • AppliesTo Customer Groups (if applicable)

Invalid Product, Unit, or Currency

Mapping not found.

  • Description: OroCommerce cannot create or update the Product Price because the Product, Unit, or Currency mapping does not exist or is invalid.

  • Resolution: Verify that:

    • Product external ID exists in iPaaS → OroCommerce.

    • Product Unit mapping exists in OroCommerce.

    • Currency mapping exists and is valid.

Category Not Found

Customer group not found.

  • Description: The AppliesTo customer category assigned to the Price List has not been transferred to OroCommerce.

  • Resolution: Transfer the Customer Category to OroCommerce before syncing the Price List.

Duplicate Price List Name

Price List name already exists.

  • Description: OroCommerce does not allow duplicate Price List names. The integration attempted to create a Price List with a name that already exists.

  • Resolution: Ensure Price List names are unique in iPaaS before syncing, or update the Bulk Pricing dynamic formula to generate a unique name.

Bulk Pricing External ID Missing

External ID not found.

  • Description: The Bulk Pricing record cannot be mapped because the external ID is missing or invalid in iPaaS → OroCommerce.

  • Resolution: Ensure the Bulk Pricing has a valid iPaaS External ID, or enable AutoCreateProduct to automatically create missing products before transfer.

AppliesTo Mapping Failure

Customer Group mapping failed.

  • Description: The integration could not map one or more AppliesTo categories due to missing or invalid external IDs.

  • Resolution: Ensure all customer categories referenced in AppliesTo exist in OroCommerce, and external ID mappings are correct. AutoCreateCustomerGroup to automatically create missing categories before transfer.

Validation & Testing

Before deploying this integration, verify the following configuration items and run the test scenarios to confirm proper operation.

Validation Checklist

Bulk Pricing (Parent) Requirements

  1. Bulk Pricing ID exists in iPaaS.

  2. Price List name is unique.

  3. Product exists, or auto-create is enabled.

  4. Currency and Unit mappings exist.

  5. Product Prices Quantity is present.

  6. Product Prices Value is set.

  7. Product Prices Currency mapping exists.

  8. Product Prices Product mapping exists.

Price Lists Customer Groups (Child) Requirements

  1. Customer Group mapping exists

  2. Customer Category exists or auto-create is enabled.

Test Scenarios

Scenario 1: Create/Update Bulk Pricing

Create or update a Bulk Pricing record in iPaaS with Price List and Product Price values. Sync to OroCommerce. Verify that the Price List and Product Prices are created with the correct IDs. Confirm External IDs are saved in iPaaS. Verify changes are reflected without duplicates.

Scenario 2: Create/Update Bulk Pricing Customer Group Assignment

Update the Applies To association on a Bulk Pricing record in iPaaS. Sync to OroCommerce. Verify customer group assignments are reflected without duplicates.

Scenario 3: Missing Product External ID (Failure Case)

Create a Bulk Pricing record in iPaaS with a Product that has no external ID mapping in OroCommerce. Trigger the integration. If AutoCreateProduct is enabled, the Product is created in OroCommerce, and the transfer succeeds. If auto-create is disabled, the integration fails with a Missing Product External ID error.

Scenario 4: Missing Customer Category (Failure Case)

Create a Bulk Pricing record with an Applies To category that has no mapping in OroCommerce. Trigger the integration. If AutoCreateCustomerGroup is enabled, the category is created, and the transfer succeeds. If auto-create is disabled, the integration fails with a Category Not Found error.

Scenario 5: Invalid Currency or Unit Mapping (Failure Case)

Create or update Bulk Pricing with a Product Price referencing a currency or unit not mapped in OroCommerce. Trigger the integration. The integration fails with a Currency or Unit Mapping Error. No incomplete or inconsistent Product Prices are created.

Scenario 6: Custom Field Transfer

Create a custom field in OroCommerce (Price List or Product Price). Create a matching custom field in iPaaS with the same name and module. Assign a value in iPaaS Bulk Pricing. Trigger the integration. Verify custom field values are transferred correctly and stored using the appropriate storage type (Serialized or Table Column).

Additional Notes

  • Customer groups must be removed from Price Lists manually in OroCommerce.

  • Only a single unit is supported for pricing; iPaaS unit fields are ignored.

  • The integration supports deleted record removal for Product Prices when Bulk Pricing is deleted from iPaaS.

  • Custom fields require matching names between OroCommerce and iPaaS.

  • Serialized Field storage type is recommended for custom fields to avoid manual schema updates.

  • HandlePrerequisite ensures auto-creation of Products and Customer Groups if missing.

  • All exceptions are logged. Partial failures could leave Price Lists partially synced unless rollback/retry logic is implemented.

Did this answer your question?