Skip to main content

Add/Update OroCommerce Customer Group From iPaaS.com

Map iPaaS.com Customer Categories data to OroCommerce Customer Groups

Updated this week

Overview

This integration transfers iPaaS Customer Categories to OroCommerce as Customer Groups. The mapping ensures that organizational structure and financial terms (tax codes and payment terms) are correctly associated with the customer segment to maintain consistent pricing and taxation logic

ID Format

When manually transferring a customer category from iPaaS.com, you need to enter the valid iPaaS customer category ID (internal ID) into the iPaaS.com input field on the iPaaS.com Manual Sync page. For example, use: 145146.

  • External ID Format: OroCommerce Customer Group will be saved as the external Id. Example: 25

Custom Field Support

This integration supports custom fields. To map data from iPaaS into a custom field in OroCommerce, follow these steps.

NOTE: For Customer Category Collection, the custom field module must be CustomerGroup.

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 ( Customer Group).

  3. Click Create Field and create a custom field.

  4. Type a unique Field Name and select a Storage Type.

NOTE: This Field Name will also be used when you create an iPaaS.com custom field, below.

Storage Type Notes

Storage Type

Schema Update required?

Notes

Table Column

Yes (Mandatory)

After creating a custom field, click the red Update Schema button to apply the changes. The custom field is not available until the schema update completes.

Caution: Contact your OroCommerce administrator before changing an entity schema to prevent unexpected service downtime.

Serialized Field

No (automatic)

Recommended. The custom field is automatically added to the schema.

Important! We recommend selecting Serialized Field as the Storage Type to avoid manual schema updates.

  1. Set the field Type to String.

  2. Click Continue.

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

Creating Custom Fields in iPaaS.com

  1. In iPaaS.com, click Data Management -> Custom Fields -> Add Custom Field.
    iPaaS.com displays the Add New Custom Field dialog box.

  2. Enter the following information:

    • A unique Name (this name must exactly match the OroCommerce custom field name created above).

    • Enter a Description.

    • Select Customer Category from the Module drop-down

    • Select String from the Data Type.

  3. Click Save.

The custom field has been created, and its value can now be set up.

Set Up the Custom Field Values in iPaaS.com

  1. In iPaaS.com, to set a custom field value, navigate to Customer Categories. iPaaS.com displays the list of Customer Categories.

  2. Find the desired customer category and click Edit

  3. Click Add under the Custom Fields section.

  4. Select the custom field you created in Creating Custom Fields in iPaaS.com, above. Enter the value in the Value field.

  5. Click Apply.

Map the Custom Field Values in iPaaS.com

  1. Open your OroCommerce subscription and click the Manage Mappings icon.

  2. In Add/Update OroCommerce Customer Group FROM iPaaS.com mapping collection, map the custom field by selecting the Custom Field type. A list of your created custom fields will appear

  3. Choose the appropriate custom field from the Destination (OroCommerce) dropdown.

  4. Map the custom field using a dynamic formula, a static value, or any other mapping method provided in iPaaS.com. Ensure the destination custom field name exactly matches the corresponding OroCommerce custom field name.

  5. Click Apply or Apply and Close.

Mapping Collection Status

  • Mapping Status: Enabled.

  • Trigger Events: Create, Update

Duplicate or Conflicting Mappings

This mapping applies only to Customer Groups (Customer Categories) from iPaaS. Ensure no other mappings target the same OroCommerce Customer Group entity to prevent data from being overwritten.

System Caveats

OroCommerce Caveats

  • Name: Required for identifying the group in OroCommerce.

  • Organization ID: Required to link the group to the correct business unit.

  • Type, Relationships_Org_Type, Relationship_Owner_Type, Relationship_PaymentTerm_Type, and Relationship_TaxCode_Type values must be provided

iPaaS Caveats

  • The Name field is required; without it, the customer category will not be created in iPaaS

Setup Requirements

OroCommerceConfiguration

  • Make sure to supply all the required fields via mappings.

iPaaS Configuration

  • Name: Unique identifier in iPaaS.

Authentication & Security

OroCommerce uses OAuth 2.0 authentication to generate an access token, which is then used to authorize all OroCommerce API requests in transfer operations.

Integration Flow

  1. The integration is triggered when a customer category is created or updated in iPaaS.

  2. Category details are mapped and validated against OroCommerce requirements.

  3. Dynamic formulas resolve Organization ID, Owner ID, Payment Term ID, and Tax Code ID.

  4. The customer group record is created or updated in OroCommerce.

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

Support Child Collection

  • This flow does not support any child collection

Mappings

Parent Collection: Add/Update OroCommerce Customer Group from iPaaS

Description

This mapping collection transfers customer category data from iPaaS to OroCommerce as Customer Groups.

Mapping Type

Source Field (iPaaS)

Destination Field (OroCommerce)

Description

Dynamic Formula

var value = GetCustomFieldValue(CustomFields, "CustomField11"); if (string.IsNullOrEmpty(value)){return null;} else {return value;}

CustomField11

Retrieves the value of the custom field “CustomField11” from the available custom fields. If the value is empty or null, it returns null; otherwise, it returns the retrieved value.

Static

customergroups

Type

Sets the OroCommerce Type to the static value customergroups. This is a required field. This value is case-sensitive. This field is required to create a customer category. The type must be "customergroups". NOTE: This value is case-sensitive

Field

Name

Attributes_Name

Maps the iPaaS Name to the OroCommerce Attributes_Name. This is a required field.

Dynamic Formula

var id = await GetOrganizationIdByNameAsync("iPaaS.com"); return id;

LastName Relationship_Org_Id

Retrieves the OroCommerce organization ID by looking up the organization name. This ID links the customer group to the correct business unit. This dynamic formula accepts an organization name as a string input and returns the corresponding organization ID, which is used for creating and updating the customer category.

Static

organizations

Relationships_Org_Type

Sets the OroCommerce Relationships_Org_Type to the static value organizations. This is a required field. This is a required field that contains the static relationship organization type "organizations", which is used to map the organization to the customer category during creation and update of the customer category.

Dynamic Formula

var id = await GetUserIdByUsernameAsync("admin"); return id;

Relationship_Owner_Id

Retrieves the OroCommerce user ID by looking up the username. This ID assigns ownership of the customer group. This dynamic formula expects a string user name as input and returns the user Id.

Static

users

Relationship_Owner_Type

Sets the OroCommerce Relationship_Owner_Type to the static value users. This is a required field. This is a required field that contains a static relationship owner/user type "users", which is required to map the user to the customer category.

Dynamic Formula

var id = await GetPaymentTermIdByPaymentTermAsync ("net"); return id;

Relationship_PaymentTerm_Id

Sets the OroCommerce Relationship_Owner_Type to the static value users. This is a required field. This dynamic formula expects a string payment name as an input and returns the payment Id that will be used in creating and updating the customer group.

Static

paymentterms

Relationship_PaymentTerm_Type

Sets the OroCommerce Relationship_PaymentTerm_Type to the static value paymentterms. This is required to map payment terms to customer groups. The CreatedAt field is mapped to the custom field CreatedAt in iPaaS when the data is created in Square Up.

Dynamic Formula

var id = await GetCustomerTaxCodeIdByTaxCodeAsync ("STATE_GOVERNMENT"); return id;

Relationship_TaxCode_Id

Retrieves the OroCommerce tax code ID by looking up the tax code name. This ID associates tax codes with the customer group for taxation logic.

Static

customertaxcodes

Relationship_TaxCode_Type

Sets the OroCommerce Relationship_TaxCode_Type to the static value customertaxcodes. This is required to map tax codes to customer groups. This is the required field that contains a static relationship tax code type "customertaxcodes", which is required to map tax code to customer category while creating and updating customer category.

Error Handling

Unable to create/update Customer Group in OroCommerce from iPaaS

  • Description: This error may occur when the system rejects the creation or update of a customer group from the iPaaS.

  • Resolution: Ensure all the required fields are populated.

Cannot update Customer Group: Id is missing

  • Description: This error may occur when the system rejects the update of a customer group from the iPaaS because of a missing ID

  • Resolution: Ensure that the ID is saved as the external ID or handle this through prerequisites, or synchronize the record using the create operation rather than update.

Validation Rules & Testing

Validation Checklist

  • Customer Group Name is present and not empty

  • Organization ID is successfully resolved via a dynamic formula

  • Owner (User) ID is successfully resolved

  • Payment Term ID (if provided) is resolved correctly

  • Tax Code ID (if provided) is resolved correctly

  • External ID is stored in iPaaS after successful creation in OroCommerce

Test Scenarios

Create Customer Group

  • Sync a new Customer Category from iPaaS.

  • Verify that the Customer Group is created in OroCommerce.

  • Confirm that the OroCommerce Customer Group ID is saved as the External ID in iPaaS.

Update Existing Customer Group

  • Update an existing Customer Category in iPaaS.

  • Ensure changes are reflected in OroCommerce without creating duplicates.

Additional Notes

  • Ensure dynamic formulas return valid references for all dependent entities.

Did this answer your question?