Overview
The OroCommerce integration provides ready-made functions you can call when building mappings. They handle common lookups and conversions against your OroCommerce store and your iPaaS.com data, such as resolving organizations, products, customers, price lists, and units to their OroCommerce IDs by name or code, validating variant options and SKUs, and reading custom fields, so you do not have to write that logic yourself.
Where you can use these functions
These functions are available anywhere you write a formula for the OroCommerce integration:
Dynamic Formula mappings: where a destination field's value is produced by a formula rather than mapped directly from a source field.
Mapping collection filters: where a formula decides whether a record should be processed.
Error filters: a mapping collection's error filter, which sits alongside its collection filter. When the error filter's formula resolves to true, the transfer raises an error that is held in the Error Logs for review and is not retried automatically.
Translation collections: where a translation entry uses a formula as its source value.
How to use them
Call a function by name and pass the values it needs in parentheses, for example:
await GetProductIdBySkuAsync(sku).Each function's signature shows its name, the parameters it accepts (with their types), and the type of value it returns. Use it as the reference for exactly how to call the function.
Function names and formula syntax are case-sensitive, so type each name exactly as shown. Whether the values a function matches are treated as case-sensitive varies by function, and is called out in the relevant parameter's description.
Nearly all of these functions are asynchronous (their signature returns a
Task) and must be called withawait; one (GetValueFromCustomField) is synchronous and is called directly. Each function's How to call it example shows the correct form.Optional parameters are marked in the parameter table, along with the value used when you omit them.
Each function runs at sync time, against the data in your connected OroCommerce store and your iPaaS.com subscription.
The functions are grouped below by the area of the integration they support.
Organization and administration
GetOrganizationIdByNameAsync
What it does: Returns the OroCommerce organization ID for a given organization name.
Signature: Task<string> GetOrganizationIdByNameAsync(string organizationName)
How to call it: await GetOrganizationIdByNameAsync(organizationName)
Parameter | Type | Required | Default | Description |
organizationName |
| Yes | N/A | The OroCommerce organization name to search for. |
Returns: string. The OroCommerce organization ID, or null when no organization matches or the input is blank.
When to use it: Use it to resolve an OroCommerce organization ID from its name.
GetUserIdByUsernameAsync
What it does: Returns the OroCommerce user ID for a given username, matched exactly.
Signature: Task<string> GetUserIdByUsernameAsync(string username)
How to call it: await GetUserIdByUsernameAsync(username)
Parameter | Type | Required | Default | Description |
username |
| Yes | N/A | The OroCommerce username to search for. |
Returns: string. The OroCommerce user ID, or null when no user matches or the input is blank.
When to use it: Use it to resolve an OroCommerce user ID from a username.
GetBusinessUnitIdByNameAsync
What it does: Returns the OroCommerce business unit ID for a given business unit name.
Signature: Task<string> GetBusinessUnitIdByNameAsync(string businessUnitName)
How to call it: await GetBusinessUnitIdByNameAsync(businessUnitName)
Parameter | Type | Required | Default | Description |
businessUnitName |
| Yes | N/A | The OroCommerce business unit name to search for. |
Returns: string. The OroCommerce business unit ID, or null when no business unit matches or the input is blank.
When to use it: Use it to resolve an OroCommerce business unit ID from its name.
GetWebsiteIdByNameAsync
What it does: Returns the OroCommerce website ID for a given website name, matched exactly.
Signature: Task<string> GetWebsiteIdByNameAsync(string websiteName)
How to call it: await GetWebsiteIdByNameAsync(websiteName)
Parameter | Type | Required | Default | Description |
websiteName |
| Yes | N/A | The OroCommerce website name to search for. |
Returns: string. The OroCommerce website ID, or null when no website matches or the input is blank.
When to use it: Use it to resolve an OroCommerce website ID from its name.
Products
GetProductIdBySkuAsync
What it does: Returns the OroCommerce product ID for a given product SKU.
Signature: Task<string> GetProductIdBySkuAsync(string sku)
How to call it: await GetProductIdBySkuAsync(sku)
Parameter | Type | Required | Default | Description |
sku |
| Yes | N/A | The product SKU that identifies the product in OroCommerce. |
Returns: string. The OroCommerce product ID, or null when no product matches or the input is blank.
When to use it: Use it to resolve an OroCommerce product ID from a SKU.
GetProductBrandIdByNameAsync
What it does: Returns the OroCommerce product brand ID for a given brand name, using an exact, case-insensitive name match.
Signature: Task<string> GetProductBrandIdByNameAsync(string productBrandName)
How to call it: await GetProductBrandIdByNameAsync(productBrandName)
Parameter | Type | Required | Default | Description |
productBrandName |
| Yes | N/A | The OroCommerce product brand name to search for. Matching is case-insensitive. |
Returns: string. The OroCommerce product brand ID, or null when no brand matches or the input is blank.
When to use it: Use it to resolve an OroCommerce product brand ID from its name.
GetAttributeFamilyIdByCodeAsync
What it does: Returns the OroCommerce attribute family ID for a given attribute family code.
Signature: Task<string> GetAttributeFamilyIdByCodeAsync(string attributeFamilyCode)
How to call it: await GetAttributeFamilyIdByCodeAsync(attributeFamilyCode)
Parameter | Type | Required | Default | Description |
attributeFamilyCode |
| Yes | N/A | The OroCommerce attribute family code to search for (for example |
Returns: string. The OroCommerce attribute family ID, or null when no attribute family matches or the input is blank.
When to use it: Use it to resolve an OroCommerce attribute family ID from its code.
GetProductTaxCodeIdByTaxCodeAsync
What it does: Returns the OroCommerce product tax code ID for a given tax code.
Signature: Task<string> GetProductTaxCodeIdByTaxCodeAsync(string taxCode)
How to call it: await GetProductTaxCodeIdByTaxCodeAsync(taxCode)
Parameter | Type | Required | Default | Description |
taxCode |
| Yes | N/A | The OroCommerce product tax code to search for (for example |
Returns: string. The OroCommerce product tax code ID, or null when no tax code matches or the input is blank.
When to use it: Use it to resolve an OroCommerce product tax code ID from a tax code.
GetProductUnitIdByLabelAsync
What it does: Returns the OroCommerce product unit ID for a given product unit label.
Signature: Task<string> GetProductUnitIdByLabelAsync(string productUnitLabel)
How to call it: await GetProductUnitIdByLabelAsync(productUnitLabel)
Parameter | Type | Required | Default | Description |
productUnitLabel |
| Yes | N/A | The OroCommerce product unit label to search for (for example |
Returns: string. The OroCommerce product unit ID, or null when no unit matches or the input is blank.
When to use it: Use it to resolve an OroCommerce product unit ID from its label.
GetLengthUnitIdByShortCodeAsync
What it does: Returns the OroCommerce length unit ID for a given short code. Length units are identified by their short code, which is also used as the ID.
Signature: Task<string> GetLengthUnitIdByShortCodeAsync(string lengthUnitShortCode)
How to call it: await GetLengthUnitIdByShortCodeAsync(lengthUnitShortCode)
Parameter | Type | Required | Default | Description |
lengthUnitShortCode |
| Yes | N/A | The short code of the length unit to search for (for example |
Returns: string. The OroCommerce length unit ID, or null when no unit matches or the input is blank.
When to use it: Use it to resolve an OroCommerce length unit ID from its short code.
GetWeightUnitIdByShortCodeAsync
What it does: Returns the OroCommerce weight unit ID for a given short code. Weight units are identified by their short code, which is also used as the ID.
Signature: Task<string> GetWeightUnitIdByShortCodeAsync(string weightUnitShortCode)
How to call it: await GetWeightUnitIdByShortCodeAsync(weightUnitShortCode)
Parameter | Type | Required | Default | Description |
weightUnitShortCode |
| Yes | N/A | The short code of the weight unit to search for (for example |
Returns: string. The OroCommerce weight unit ID, or null when no unit matches or the input is blank.
When to use it: Use it to resolve an OroCommerce weight unit ID from its short code.
GetCatalogCategoryIdByTitleAsync
What it does: Returns the OroCommerce catalog category ID for a given category title, using an exact, case-insensitive title match.
Signature: Task<string> GetCatalogCategoryIdByTitleAsync(string catalogCategoryTitle)
How to call it: await GetCatalogCategoryIdByTitleAsync(catalogCategoryTitle)
Parameter | Type | Required | Default | Description |
catalogCategoryTitle |
| Yes | N/A | The OroCommerce catalog category title to search for. Matching is case-insensitive. |
Returns: string. The OroCommerce catalog category ID, or null when no category matches or the input is blank.
When to use it: Use it to resolve an OroCommerce catalog category ID from its title.
GetOroCommerceProductUnitIdByProductIdAsync
What it does: Returns the OroCommerce product unit ID for a given OroCommerce product ID.
Signature: Task<string> GetOroCommerceProductUnitIdByProductIdAsync(string productId)
How to call it: await GetOroCommerceProductUnitIdByProductIdAsync(productId)
Parameter | Type | Required | Default | Description |
productId |
| Yes | N/A | The OroCommerce product ID whose unit you want. |
Returns: string. The OroCommerce product unit ID, or null when the product is not found or the input is blank.
When to use it: Use it to get a product's unit, for example when creating bulk-pricing records that need a product unit reference.
GetOroCommerceProductOrVariantIdAsync
What it does: Returns the OroCommerce product or product variant ID for an iPaaS.com internal ID, using the table ID to decide whether the ID is a product or a variant. The value comes from the iPaaS.com mapping between the two systems.
Signature: Task<string> GetOroCommerceProductOrVariantIdAsync(string id, object tableId)
How to call it: await GetOroCommerceProductOrVariantIdAsync(id, tableId)
Parameter | Type | Required | Default | Description |
id |
| Yes | N/A | The iPaaS.com internal product or product variant ID to resolve. |
tableId |
| Yes | N/A | The table ID that indicates whether the ID is a product or a product variant. |
Returns: string. The OroCommerce product or variant ID from the mapping, or null when no mapping exists.
When to use it: Use it during product and variant flows, such as bulk-pricing transfers, to find the OroCommerce record for an iPaaS.com product or variant.
GetProductRelationshipsDataAsync
What it does: Returns the collection of relationship records for a product and a plural relationship name (for example unit precisions or names). You can optionally filter the results to a single record ID.
Signature: Task<List<GenericFilterData>> GetProductRelationshipsDataAsync(string relationshipName, string productId, string recordId = null)
How to call it: await GetProductRelationshipsDataAsync(relationshipName, productId)
Parameter | Type | Required | Default | Description |
relationshipName |
| Yes | N/A | The relationship name, in plural form (for example |
productId |
| Yes | N/A | The OroCommerce product ID whose relationship records you want. |
recordId |
| No |
| A specific relationship item ID to filter the results to. When omitted, all records are returned. |
Returns: List<GenericFilterData>. The matching relationship records, or null when the relationship name or product ID is blank.
When to use it: Use it to read a product's multi-record relationships. It raises an error if the relationship name is not in plural form.
GetProductRelationshipDataAsync
What it does: Returns the single relationship record for a product and a singular relationship name (for example the primary unit precision or the back-order setting). You can optionally validate the result against a specific record ID.
Signature: Task<GenericFilterData> GetProductRelationshipDataAsync(string relationshipName, string productId, string recordId = null)
How to call it: await GetProductRelationshipDataAsync(relationshipName, productId)
Parameter | Type | Required | Default | Description |
relationshipName |
| Yes | N/A | The relationship name, in singular form (for example |
productId |
| Yes | N/A | The OroCommerce product ID whose relationship record you want. |
recordId |
| No |
| A specific relationship item ID to validate the returned record against. When it does not match, null is returned. |
Returns: GenericFilterData. The relationship record, or null when it is not found or the relationship name or product ID is blank.
When to use it: Use it to read a product's single-record relationships. It raises an error if the relationship name is in plural form.
ValidateVariantOptionValue
What it does: Returns whether a given option value exists for a product attribute (option) in OroCommerce. Validation applies to select-type attributes backed by an external product attribute.
Signature: Task<bool> ValidateVariantOptionValue(string optionName, string optionValue)
How to call it: await ValidateVariantOptionValue(optionName, optionValue)
Parameter | Type | Required | Default | Description |
optionName |
| Yes | N/A | The product attribute label (for example |
optionValue |
| Yes | N/A | The option value to check against the attribute's options (for example |
Returns: bool. True when the option value exists for the attribute; otherwise false.
When to use it: Use it during configurable-product or variant validation to confirm a variant's option value is valid before creating the product or variant.
ValidateAndUpdateProductSku
What it does: Cleans a product SKU to meet OroCommerce SKU requirements: whitespace is replaced with underscores, other special characters (except underscores and hyphens) are removed, and consecutive underscores are collapsed to one.
Signature: Task<string> ValidateAndUpdateProductSku(object sku)
How to call it: await ValidateAndUpdateProductSku(sku)
Parameter | Type | Required | Default | Description |
sku |
| Yes | N/A | The product SKU to validate and clean. |
Returns: string. The cleaned SKU, or null when the input is null or becomes empty after cleaning.
Example: PROD 001 returns PROD_001; PROD@001#ABC returns PROD001ABC.
When to use it: Use it to normalize a SKU to OroCommerce's allowed characters before creating or updating a product.
Customers and users
GetCustomerIdByNameAsync
What it does: Returns the OroCommerce customer ID for a given company name.
Signature: Task<string> GetCustomerIdByNameAsync(string customerName)
How to call it: await GetCustomerIdByNameAsync(customerName)
Parameter | Type | Required | Default | Description |
customerName |
| Yes | N/A | The company name to match to an OroCommerce customer. |
Returns: string. The OroCommerce customer ID, or null when no customer matches or the input is blank.
When to use it: Use it to resolve an OroCommerce customer ID from a company name.
GetCustomerNameByCustomerIdAsync
What it does: Returns the OroCommerce customer name for a given OroCommerce customer ID.
Signature: Task<string> GetCustomerNameByCustomerIdAsync(string customerId)
How to call it: await GetCustomerNameByCustomerIdAsync(customerId)
Parameter | Type | Required | Default | Description |
customerId |
| Yes | N/A | The OroCommerce customer ID whose name you want. |
Returns: string. The OroCommerce customer name, or null when the customer is not found or the input is blank.
When to use it: Use it to read a customer's name when you only have its OroCommerce ID.
GetCustomerTaxCodeIdByTaxCodeAsync
What it does: Returns the OroCommerce customer tax code ID for a given tax code.
Signature: Task<string> GetCustomerTaxCodeIdByTaxCodeAsync(string taxCode)
How to call it: await GetCustomerTaxCodeIdByTaxCodeAsync(taxCode)
Parameter | Type | Required | Default | Description |
taxCode |
| Yes | N/A | The OroCommerce customer tax code to search for (for example |
Returns: string. The OroCommerce customer tax code ID, or null when no tax code matches or the input is blank.
When to use it: Use it to resolve an OroCommerce customer tax code ID from a tax code.
GetCustomerRoleIdByNameAsync
What it does: Returns the OroCommerce customer user role ID for a given role name, matched on the role label.
Signature: Task<string> GetCustomerRoleIdByNameAsync(string roleName)
How to call it: await GetCustomerRoleIdByNameAsync(roleName)
Parameter | Type | Required | Default | Description |
roleName |
| Yes | N/A | The OroCommerce customer user role name (label) to search for (for example |
Returns: string. The OroCommerce customer user role ID, or null when no role matches or the input is blank.
When to use it: Use it to resolve an OroCommerce customer user role ID from its name.
ConvertiPaaSCategoriesToOroCommerceCustomerGroupAsync
What it does: Converts iPaaS.com customer categories into an OroCommerce customer group ID. For each category it first checks for an existing external-ID mapping, and if none exists, looks up the customer group by the category name. It returns the last resolved customer group ID.
Signature: Task<string> ConvertiPaaSCategoriesToOroCommerceCustomerGroupAsync(object categories)
How to call it: await ConvertiPaaSCategoriesToOroCommerceCustomerGroupAsync(categories)
Parameter | Type | Required | Default | Description |
categories |
| Yes | N/A | The iPaaS.com customer categories to convert, each carrying a category ID and name. |
Returns: string. The OroCommerce customer group ID, or null when the input is null or no group matches.
When to use it: Use it in company or customer flows to map iPaaS.com customer categories to an OroCommerce customer group.
GetCustomerUserIdByEmailAsync
What it does: Returns the OroCommerce customer user ID for a given email address, matched exactly.
Signature: Task<string> GetCustomerUserIdByEmailAsync(string Email)
How to call it: await GetCustomerUserIdByEmailAsync(Email)
Parameter | Type | Required | Default | Description |
| Yes | N/A | The email address to search for in OroCommerce. |
Returns: string. The OroCommerce customer user ID, or null when no customer user matches or the input is blank.
When to use it: Use it to resolve an OroCommerce customer user ID from an email address.
GetCustomerUserEmailByCustomerUserIdAsync
What it does: Returns the email address of an OroCommerce customer user for a given customer user ID.
Signature: Task<string> GetCustomerUserEmailByCustomerUserIdAsync(string customerUserId)
How to call it: await GetCustomerUserEmailByCustomerUserIdAsync(customerUserId)
Parameter | Type | Required | Default | Description |
customerUserId |
| Yes | N/A | The OroCommerce customer user ID whose email you want. |
Returns: string. The OroCommerce customer user email, or null when the customer user is not found or the input is blank.
When to use it: Use it to read a customer user's email when you only have its OroCommerce ID.
GetCustomerUserNameByCustomerUserIdAsync
What it does: Returns an OroCommerce customer user's full name for a given customer user ID, combining the first, middle, and last name (skipping any that are empty).
Signature: Task<string> GetCustomerUserNameByCustomerUserIdAsync(string customerUserId)
How to call it: await GetCustomerUserNameByCustomerUserIdAsync(customerUserId)
Parameter | Type | Required | Default | Description |
customerUserId |
| Yes | N/A | The OroCommerce customer user ID whose name you want. |
Returns: string. The combined customer user name, or null when the customer user is not found or has no name.
When to use it: Use it to build a customer user's display name when you only have its OroCommerce ID.
GetCompanyEmailByiPaaSCompanyIdAsync
What it does: Returns the email address of an iPaaS.com customer company for a given iPaaS.com company ID.
Signature: Task<string> GetCompanyEmailByiPaaSCompanyIdAsync(long iPaaSCompanyId)
How to call it: await GetCompanyEmailByiPaaSCompanyIdAsync(iPaaSCompanyId)
Parameter | Type | Required | Default | Description |
iPaaSCompanyId |
| Yes | N/A | The iPaaS.com company ID whose email you want. |
Returns: string. The iPaaS.com company's email address, or null when the company is not found.
When to use it: Use it to read a company's email from iPaaS.com, for example when populating an email address on a transaction.
GetiPaaSCustomerIdByEmailAsync
What it does: Searches iPaaS.com for a customer matching an email address and returns that customer's iPaaS.com ID (the first match). This is an iPaaS.com-side ID, not an OroCommerce ID.
Signature: Task<string> GetiPaaSCustomerIdByEmailAsync(string Email)
How to call it: await GetiPaaSCustomerIdByEmailAsync(Email)
Parameter | Type | Required | Default | Description |
| Yes | N/A | The email address to search for in iPaaS.com. |
Returns: string. The iPaaS.com customer ID of the first match, or null when none is found or the input is blank.
When to use it: Use it to resolve an iPaaS.com customer ID from an email address.
Pricing and payments
GetPaymentTermIdByPaymentTermAsync
What it does: Returns the OroCommerce payment term ID for a given payment term.
Signature: Task<string> GetPaymentTermIdByPaymentTermAsync(string paymentTerm)
How to call it: await GetPaymentTermIdByPaymentTermAsync(paymentTerm)
Parameter | Type | Required | Default | Description |
paymentTerm |
| Yes | N/A | The OroCommerce payment term to search for (for example |
Returns: string. The OroCommerce payment term ID, or null when no payment term matches or the input is blank.
When to use it: Use it to resolve an OroCommerce payment term ID from a payment term.
GetPriceListIdByNameAsync
What it does: Returns the OroCommerce price list ID for a given price list name, matched exactly.
Signature: Task<string> GetPriceListIdByNameAsync(string priceListName)
How to call it: await GetPriceListIdByNameAsync(priceListName)
Parameter | Type | Required | Default | Description |
priceListName |
| Yes | N/A | The OroCommerce price list name to search for (for example |
Returns: string. The OroCommerce price list ID, or null when no price list matches or the input is blank.
When to use it: Use it to resolve an OroCommerce price list ID from its name, for example during product price creation or updates.
GetiPaaSCurrencyNameByIdAsync
What it does: Returns the iPaaS.com currency name (its description, for example USD) for a given iPaaS.com currency ID.
Signature: Task<string> GetiPaaSCurrencyNameByIdAsync(object currencyId)
How to call it: await GetiPaaSCurrencyNameByIdAsync(currencyId)
Parameter | Type | Required | Default | Description |
currencyId |
| Yes | N/A | The iPaaS.com currency ID to look up. |
Returns: string. The currency name (for example USD), or null when the currency is not found or the input is null.
When to use it: Use it to resolve an iPaaS.com currency ID to its currency code, for example when building bulk-pricing records.
Locations
GetCountryIdByNameAsync
What it does: Returns the OroCommerce country ID for a given country name, matched exactly.
Signature: Task<string> GetCountryIdByNameAsync(string countryName)
How to call it: await GetCountryIdByNameAsync(countryName)
Parameter | Type | Required | Default | Description |
countryName |
| Yes | N/A | The OroCommerce country name to search for (for example |
Returns: string. The OroCommerce country ID, or null when no country matches or the input is blank.
When to use it: Use it to resolve an OroCommerce country ID from its name.
GetRegionIdByNameAsync
What it does: Returns the OroCommerce region ID for a given region name, matched exactly.
Signature: Task<string> GetRegionIdByNameAsync(string region)
How to call it: await GetRegionIdByNameAsync(region)
Parameter | Type | Required | Default | Description |
region |
| Yes | N/A | The OroCommerce region name to search for (for example |
Returns: string. The OroCommerce region ID, or null when no region matches or the input is blank.
When to use it: Use it to resolve an OroCommerce region ID from its name.
Custom fields
GetValueFromCustomField
What it does: Returns the value of a named custom field from a custom fields object, keeping the value's original type. It returns null when the field is not present.
Signature: object GetValueFromCustomField(object customFieldObj, object textFieldName)
How to call it: GetValueFromCustomField(customFieldObj, textFieldName)
Parameter | Type | Required | Default | Description |
customFieldObj |
| Yes | N/A | The object containing the custom fields (for example an additional-properties structure). |
textFieldName |
| Yes | N/A | The name of the custom field to read. |
Returns: object. The custom field's value in its original type (a string, number, and so on), or null when the field is not found.
Example: reading customerNotes returns its value (for example Please, contact sales).
When to use it: Use it to pull a single custom field value into a destination field.
