Skip to main content

iPaaS.com to BigCommerce B2B Company and Customer Mapping Documentation

How iPaaS.com companies, addresses, hierarchy, and company users write out to BigCommerce B2B Edition — field mappings, administrator and customer-group resolution, and the parent-company hierarchy write.

Summary

iPaaS.com companies, company addresses, company hierarchy, and company users write out to BigCommerce B2B Edition. An iPaaS.com Company is written as a B2B company carrying its identity and B2B attributes; its addresses and its parent/subsidiary hierarchy are written alongside it. The individual buyers who belong to a company — Customer records flagged for B2B — are written as company users, and the company each user belongs to and its B2B role are resolved from the customer's primary company relationship. Transfers run automatically from subscribed iPaaS.com triggers or on demand from the iPaaS.com Manual Sync page.

This article is the field-level companion to BigCommerce B2B Edition Support, which covers the higher-level picture — what B2B Edition is, how to turn it on, and how automatic transfer is set up. B2B handling is off by default and only applies when B2B support is enabled on the subscription. Capturing BigCommerce companies and company users into iPaaS.com is covered by the companion BigCommerce to iPaaS.com B2B Company and Customer Mapping Documentation. Standard (non-B2B) customers are handled by a separate set of collections — see the Related Documents footer. Only one of the standard (B2C) or B2B mappings should apply to any given customer.

Contents

Data Types and Direction

This article documents the following mapping collections and the iPaaS.com data type each one operates on. Every collection here transfers iPaaS.com to BigCommerce.

Collection

iPaaS.com data type

Direction

BC B2B Company Add FROM iPaaS.com

Company

iPaaS.com to BigCommerce

BC B2B Company Update FROM iPaaS.com

Company

iPaaS.com to BigCommerce

BC B2B Company Address Add FROM iPaaS.com (child)

Company Address

iPaaS.com to BigCommerce

BC B2B Company Address Update FROM iPaaS.com (child)

Company Address

iPaaS.com to BigCommerce

BC B2B Parent Company Relationship Add FROM iPaaS.com (child)

Company Relationship

iPaaS.com to BigCommerce

BC B2B Parent Company Relationship Update FROM iPaaS.com (child)

Company Relationship

iPaaS.com to BigCommerce

BC B2B Customer FROM iPaaS.com

Customer

iPaaS.com to BigCommerce

BC B2B Customer Address FROM iPaaS.com (child)

Customer Address

iPaaS.com to BigCommerce

In BigCommerce B2B Edition, a company relates to other companies as departments or subsidiaries, and to its users. In iPaaS.com those ties are modeled as relationships: company-to-company links form the hierarchy (written outbound through the Parent Company Relationship child collections), and company-to-user links connect a company to its buyers. The company-to-user tie is a relationship between a Company and a Customer — not the Employee data type.

ID Format

Manual Sync IDs differ by collection because each collection acts on a different record. Addresses and relationships transferred as part of a company or a customer have no independent Manual Sync entry point; sync the parent and its children transfer together.

Manual Sync ID Format

  • Company: enter the iPaaS.com Company ID — the numeric identifier iPaaS.com assigns to the company. Example: 789.

  • Customer: enter the iPaaS.com Customer ID. Example: 123.

External ID Format

After a successful transfer, iPaaS.com records the BigCommerce identifier as the external ID on the iPaaS.com record:

  • For a company written to BigCommerce, the BigCommerce company ID is saved as the external ID on the iPaaS.com Company.

  • For a company user written to BigCommerce, the BigCommerce B2B user ID is saved as the external ID on the iPaaS.com Customer.

The external-ID record is the primary match that routes later transfers of the same record to an update rather than creating a duplicate.

Deleted Record Support

Outbound record delete is not supported for these collections. Deleting a company, address, or company user in iPaaS.com does not propagate a record deletion to BigCommerce; remove records manually in each system as needed.

Company hierarchy deletes are handled separately and are gated by the Allow iPaaS.com to delete company hierarchy subscription setting. When the setting is off, the integration adds and updates hierarchy links but never removes existing ones. Turn the setting on only when you intend to let iPaaS.com delete company hierarchy relationships.

Custom Field Support

BigCommerce does not expose custom fields for the company, company address, or customer data types. The integration reads several iPaaS.com custom fields outbound to carry B2B-specific values and to route records; none require manual creation for the default templates, and the ones that route records add no mapped data.

Values read from the iPaaS.com Company and its relationships:

  • B2B Company Status: read by the outbound filter and converted to the numeric status ID BigCommerce expects.

  • B2B BC Company Payment Terms Enabled, B2B BC Company Payment Terms: the company's BigCommerce payment-terms configuration.

  • Sales Staff Ids: BigCommerce sales staff assigned to the company.

  • B2B User First Name, B2B User Last Name, B2B User Phone Number, B2B User Email: read from the company's B2B Admin relationship to resolve the administrator contact.

Values read from the iPaaS.com Customer to identify and route a B2B user:

  • B2B_SendToB2B: read by the outbound customer filter to route the customer to the B2B path.

  • B2B_Deleted: read by the outbound customer filter; a customer flagged deleted is not written to BigCommerce.

  • B2B_UserIdFromB2B: the BigCommerce B2B user ID when already known, so the write updates the existing user rather than creating a duplicate.

Mapping Collection Status

All collections in this article ship Enabled. Trigger events:

  • Company and Customer: the iPaaS.com company and customer created and updated triggers.

Whether a given trigger drives an Add or an Update depends on whether the record is already linked to BigCommerce by an external ID. Automatic transfers do not run until the corresponding triggers are configured — see Setup Requirements.

Duplicate or Conflicting Mappings

Several collections operate on the same underlying records. Review their filters and Add/Update settings before enabling them, and decide which collection is the source of truth for each record.

  • Standard vs. B2B customers. The outbound customer filter splits customers between the standard collection and the B2B collection documented here. Only one of the standard or B2B mappings should apply to any given customer. Enabling both without coordinated filters can create duplicate or conflicting customers.

  • Add vs. Update (Company). The Company path is split into Add and Update collections. The external-ID link decides which one applies to a given trigger; coordinate the two so a given transfer is handled by exactly one of them.

Collision Handling

The integration decides whether an outgoing B2B record is new or one BigCommerce already knows about so updates land on the right record instead of creating duplicates:

  • Companies are matched by name.

  • Customers (company users) are matched by email address.

When a match is found, the record is treated as the same record and the configured collision method for that data type decides the outcome. The selectable methods are:

  • Remap and Link: link the incoming record to the matched record and remap it.

  • Update and Link: update the matched record and keep the link.

  • Update and No Link: update the matched record without establishing a persistent link.

  • Error: stop and raise an error instead of resolving the match automatically.

Review the collision method for the Company and Customer data types so records merge with, or stay separate from, existing records as your workflow expects. A company without a name, or a company user without an email, cannot be matched reliably.

Supported Child Collections

The Company and Customer collections drive their related records through child collections that transfer as part of the parent:

  • BC B2B Company Add FROM iPaaS.comBC B2B Company Address Add FROM iPaaS.com, BC B2B Parent Company Relationship Add FROM iPaaS.com

  • BC B2B Company Update FROM iPaaS.comBC B2B Company Address Update FROM iPaaS.com, BC B2B Parent Company Relationship Update FROM iPaaS.com

  • BC B2B Customer FROM iPaaS.comBC B2B Customer Address FROM iPaaS.com

The company-to-company hierarchy (parent/subsidiary) is written through the Parent Company Relationship child collections. The company each user belongs to and its B2B role are resolved from the customer's primary company relationship during the customer write.

System Caveats

BigCommerce Caveats

  • B2B Edition required. These collections apply only to BigCommerce B2B Edition. An active B2B Edition app must be installed and configured, and B2B support enabled on the iPaaS.com subscription, before B2B records transfer. See BigCommerce B2B Edition Support.

  • Administrator required for company creation. BigCommerce requires an administrator contact when a company is created. The administrator is resolved from the company's B2B Admin relationship. When the company has no B2B Admin relationship, the administrator fields are left unset and the company write may be rejected.

  • Company status values are fixed. A company's status is written as a numeric ID resolved from the status name; the name must exactly match one of BigCommerce's predefined B2B company statuses (Pending, Approved, Rejected, Inactive) or it is not recognized.

  • Payment-terms values are constrained. When payment terms are supplied, BigCommerce accepts only the values 0, 5, 15, 30, 45, or 60.

  • Rate limiting. When BigCommerce rate-limits requests, the transfer is automatically rescheduled to resume after the limit window resets. No subscriber action is required.

iPaaS.com Caveats

  • Company name required. A company must have a name. The name is required and is the key iPaaS.com uses to match companies.

  • Email required for customer matching. The email address is the key iPaaS.com uses to match and de-duplicate company users. A company user without an email cannot be matched reliably.

  • Customer group from categories. For outbound companies, the BigCommerce customer group is derived from the company's iPaaS.com categories. Review the category-to-group setup so companies land in the intended group. This mapping depends on Independent Company Behavior being enabled in BigCommerce.

  • Administrator and address dependencies. For an outbound company, the administrator contact comes from the company's B2B Admin relationship and the primary billing address comes from the company's addresses. Ensure both are present on the iPaaS.com Company.

  • Company relationship model. The company-to-user tie is a relationship between a Company and a Customer, carrying the user's B2B role (Super Admin, Admin, Senior Buyer, or Junior Buyer) — not the Employee data type.

Integration-Specific Caveats

  • Full-replace updates. Each outbound transfer writes the full record to BigCommerce; fields left unmapped can be overwritten on each transfer. Map every field you want preserved, or use a DestinationValue approach for fields you do not source from iPaaS.com.

  • Prerequisite auto-transfer. A company and its B2B users are transferred together: transferring a company auto-transfers its related users, and transferring a user auto-transfers its related company. Subscribers do not pre-sync either side. A failed prerequisite blocks the dependent transfer.

  • Duplicate addresses. The outbound company and customer address collections suppress duplicate addresses (see the address collections in the Mappings section).

Setup Requirements

Automatic transfers do not run until the corresponding triggers are configured. Enable the iPaaS.com company and customer triggers (created and updated) under Outbound Data Flows in the subscription configuration. See the BigCommerce Installation Instructions for the step-by-step screens.

Integration Flow

Company and its children:

  1. An iPaaS.com company created or updated trigger fires, or a company is manually synced by its iPaaS.com Company ID.

  2. The outbound filter processes companies with a recognized B2B status.

  3. The company is created or updated in BigCommerce, resolving the primary billing address, the administrator contact (from the B2B Admin relationship), and the customer group as part of the single company write.

  4. The company's addresses are written through the address child collection, and its parent-company hierarchy link is written through the parent company relationship child collection.

Company user and its address:

  1. An iPaaS.com customer created or updated trigger fires, or a customer is manually synced by its iPaaS.com Customer ID.

  2. The outbound filter processes the customer only when it is flagged for the B2B path and is not flagged deleted.

  3. The user is created or updated in BigCommerce, resolving the company it belongs to and its B2B role from the customer's primary company relationship.

  4. The user's addresses are written through the address child collection.

Mappings

Each collection below lists its Mapping Filter (when the collection has one), the iPaaS.com data type it operates on, and its field mapping table. Source and destination field names are shown as they appear in each system.

BC B2B Company Add FROM iPaaS.com

iPaaS.com data type: Company

Writes an iPaaS.com Company to BigCommerce B2B Edition, creating the company when it does not yet exist. The company write resolves the primary billing address, the administrator contact (from the company's B2B Admin relationship), and the customer group as part of a single write.

Mapping Filter

var allowed = new List<string> { "PENDING","APPROVED","REJECTED" };var value = GetCustomFieldValue(CustomFields, "B2B Company Status");if(value!= null && value!="" && allowed.Contains(value)){  return true;}return false;

Filter Description. The filter processes a company only when its B2B Company Status custom field is present and set to one of PENDING, APPROVED, or REJECTED. Companies without a recognized status are skipped. These are the recognized BigCommerce B2B company statuses rather than environment-specific values, so no placeholder substitution is required.

Mapping Type

Source Field (iPaaS.com Company)

Destination Field (BigCommerce)

Description

Field

Name

CompanyName

Required. BigCommerce requires a name on the company.

Field

EmailAddress

CompanyEmail

Required. The company email; BigCommerce uses it as the company contact.

Dynamic Formula

(see formula below)

CompanyStatus

Recommended. The company approval status, converted to the numeric status ID BigCommerce expects.

Dynamic Formula

PhoneNumber ?? null

CompanyPhone

Recommended. The company phone number; left unset when the company has no phone.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address1")

AddressLine1

Recommended. The company's street line, taken from the primary billing address.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address2")

AddressLine2

Recommended. The company's secondary street line from the primary billing address, where present.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "City")

City

Recommended. The company's city from the primary billing address.

Dynamic Formula

(see formula below)

State

Recommended. The company's state or region from the primary billing address, resolved to the full state name.

Dynamic Formula

(see formula below)

Country

Recommended. The company's country from the primary billing address, normalized to a country code and defaulting to US.

Dynamic Formula

(see formula below)

AdminFirstName

Required. The company administrator's first name, read from the company's B2B Admin relationship.

Dynamic Formula

(see formula below)

AdminLastName

Required. The company administrator's last name, read from the company's B2B Admin relationship.

Dynamic Formula

(see formula below)

AdminEmail

Required. The company administrator's email, read from the company's B2B Admin relationship; BigCommerce requires an administrator contact.

Dynamic Formula

(see formula below)

AdminPhoneNumber

Recommended. The company administrator's phone number, read from the company's B2B Admin relationship.

Dynamic Formula

(see formula below)

CustomerGroupId

Recommended. Assigns the company to a BigCommerce customer group derived from the company's iPaaS.com categories; returns 0 (no group) when none matches.

Field

Sales Staff Ids

SalesStaffIds

Optional. Assigns BigCommerce sales staff from the Sales Staff Ids custom field.

Field

B2B BC Company Payment Terms Enabled

PaymentTermIsEnabled

Optional. Whether payment terms are enabled, from the payment-terms-enabled custom field.

Field

B2B BC Company Payment Terms

PaymentTerms

Optional. The company's payment terms, from the payment-terms custom field.

CompanyStatus formula:

var valueCompanyStatus = GetCustomFieldValue(CustomFields, "B2B Company Status");if(!string.IsNullOrEmpty(valueCompanyStatus)) {   return ConvertB2BCompanyStatusToId(valueCompanyStatus);}return null;

State formula:

var state = FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Region");return StateName(state);

Country formula:

var country = FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Country");return CountryCodeWithDefault(country,"US");

Administrator formula (the same shape is used for first name, last name, email, and phone — only the custom-field name differs):

var relationships = Relationships;if(relationships != null){  foreach(var relationship in relationships){    //Check for expected B2B company admin    if (relationship.Type == "B2B Admin" ){      var value = GetCustomFieldValue(relationship.CustomFields, "B2B User First Name");      if (value != null && value != "")        return value;    }  }}return null;

CustomerGroupId formula:

var customerGroupId = await GetCustomerGroupIdByCategories(Categories);if(customerGroupId != null && customerGroupId.ToString() != ""){    return customerGroupId;}return 0;

Placeholder value — replace during implementation: the "US" country default assumes a US-centric customer base — adjust it if your companies are primarily elsewhere. The customer-group mapping depends on Independent Company Behavior being enabled in BigCommerce; confirm it is enabled before relying on the group assignment.

BC B2B Company Update FROM iPaaS.com

iPaaS.com data type: Company

Writes changes to an existing iPaaS.com Company to BigCommerce B2B Edition. It shares the same filter as the Add collection and maps a subset of the same fields; it does not remap the administrator contact.

Mapping Filter

var allowed = new List<string> { "PENDING","APPROVED","REJECTED" };var value = GetCustomFieldValue(CustomFields, "B2B Company Status");if(value!= null && value!="" && allowed.Contains(value)){  return true;}return false;

Filter Description. Same as the Add collection — a company is processed only when its B2B Company Status custom field is PENDING, APPROVED, or REJECTED; other companies are skipped. No placeholder substitution is required.

Mapping Type

Source Field (iPaaS.com Company)

Destination Field (BigCommerce)

Description

Field

Name

CompanyName

Required. BigCommerce requires a name on the company.

Field

EmailAddress

CompanyEmail

Required. The company email; BigCommerce uses it as the company contact.

Dynamic Formula

(see Add — CompanyStatus formula)

CompanyStatus

Recommended. The company approval status, converted to the numeric status ID BigCommerce expects.

Dynamic Formula

PhoneNumber ?? null

CompanyPhone

Recommended. The company phone number; left unset when the company has no phone.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address1")

AddressLine1

Recommended. The company's street line from the primary billing address.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address2")

AddressLine2

Recommended. The company's secondary street line from the primary billing address, where present.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "City")

City

Recommended. The company's city from the primary billing address.

Dynamic Formula

(see Add — State formula)

State

Recommended. The company's state or region, resolved to the full state name.

Dynamic Formula

(see Add — Country formula)

Country

Recommended. The company's country, normalized to a country code and defaulting to US.

Dynamic Formula

(see Add — CustomerGroupId formula)

CustomerGroupId

Recommended. Assigns the company to a BigCommerce customer group derived from the company's iPaaS.com categories.

Field

Sales Staff Ids

SalesStaffIds

Optional. Assigns BigCommerce sales staff from the Sales Staff Ids custom field.

Static

"cheque,true\|bigcommerce_store_credit,false"

B2BPaymentMethods

Optional. The company's enabled payment methods, as code,enabled pairs joined with \|. Include only codes that exist as BigCommerce payment-method codes.

Placeholder value — replace during implementation: the B2BPaymentMethods static value cheque,true|bigcommerce_store_credit,false is an example pairing. Replace it with your store's actual BigCommerce payment-method codes and enabled states (format code,enabled|code,enabled) before enabling this collection. Payment-method codes that do not exist in your BigCommerce store are not applied.

BC B2B Company Address Add FROM iPaaS.com (child) / BC B2B Company Address Update FROM iPaaS.com (child)

iPaaS.com data type: Company Address

These are child collections of the company transfer. Each address is written to BigCommerce and linked to its parent company; there is no independent sync. Neither collection has a mapping filter. The Add and Update field tables are identical.

Mapping Type

Source Field (iPaaS.com Company Address)

Destination Field (BigCommerce)

Description

Field

FirstName

FirstName

Recommended. The address contact's first name.

Field

LastName

LastName

Recommended. The address contact's last name.

Field

PhoneNumber

PhoneNumber

Recommended. The address contact's phone number.

Field

PostalCode

ZipCode

Recommended. The postal or ZIP code.

Field

Address1

AddressLine1

Recommended. The primary street line.

Field

Address2

AddressLine2

Recommended. The secondary street line where present.

Field

City

City

Recommended. The city.

Dynamic Formula

return StateName(Region);

StateName

Recommended. The full state or region name resolved from the iPaaS.com region.

Dynamic Formula

return CountryCodeWithDefault(Country,"US");

CountryName

Recommended. The country normalized to a country code, defaulting to US when the country is empty or cannot be resolved.

Dynamic Formula

return CountryCodeWithDefault(Country,"US");

CountryCode

Recommended. The country code, defaulting to US when the country is empty or cannot be resolved.

Field

IsPrimaryBilling

IsBilling

Recommended. Whether the address is the company's billing address.

Field

IsPrimaryShipping

IsShipping

Recommended. Whether the address is the company's shipping address.

Dynamic Formula

true

PreventDuplicate

Recommended (control flag). Enables duplicate-address prevention: before adding, iPaaS.com searches BigCommerce for an address that exactly matches every mapped field, and adds no duplicate when a match is found. This governs behavior rather than carrying address data.

Placeholder value — replace during implementation: the "US" country default assumes a US-centric customer base — adjust the country formulas if your companies are primarily elsewhere.

BC B2B Parent Company Relationship Add FROM iPaaS.com (child) / BC B2B Parent Company Relationship Update FROM iPaaS.com (child)

iPaaS.com data type: Company Relationship

These are child collections of the company transfer. They write the company's parent-company hierarchy link — nesting a company under its parent (department/subsidiary) in BigCommerce. Each collection maps a single field. The Add and Update collections are identical.

Mapping Filter

if(Type.ToLower() == "parent") {var hasIPaaSCompany = await GetiPaaSCompany(RelatedToId);var companyRelationshipId = await GetExternalIdAsync(RelatedToId, "Company", SpaceportSystemId);if(hasIPaaSCompany == true && !string.IsNullOrWhiteSpace(companyRelationshipId)) {    return true;}else {    throw new Exception("The parent company either does not exist in iPaaS or is not correctly linked to the corresponding BigCommerce company, as its external ID could not be found in iPaaS.");    return false;}}return false;

Filter Description. The filter processes a relationship only when its Type is parent and the related parent company both exists in iPaaS.com and is linked to its BigCommerce company by an external ID. Non-parent relationships are skipped (return false). When a parent relationship is present but the parent company is missing or unlinked, the transfer stops and raises the error "The parent company either does not exist in iPaaS or is not correctly linked to the corresponding BigCommerce company, as its external ID could not be found in iPaaS." — transfer the parent company first so it exists in iPaaS.com and is linked to BigCommerce. This filter references data relationships rather than an environment-specific value, so no placeholder substitution is required.

Mapping Type

Source Field (iPaaS.com Company Relationship)

Destination Field (BigCommerce)

Description

Dynamic Formula

return await GetExternalIdAsync(RelatedToId, "Company", SpaceportSystemId);

ParentCompanyId

Required. Sets the company's parent in BigCommerce by resolving the parent company's BigCommerce ID from its external-ID link, using the related iPaaS.com Company.

BC B2B Customer FROM iPaaS.com

iPaaS.com data type: Customer

Writes an iPaaS.com Customer (a B2B user) to BigCommerce B2B Edition as a company user, creating the user when it does not yet exist and updating it when it does. The company the user belongs to and the user's B2B role are resolved from the customer's primary company relationship.

Mapping Filter

var result = GetCustomFieldValue(CustomFields, "B2B_SendToB2B");var B2B_Deleted = GetCustomFieldValue(CustomFields, "B2B_Deleted");if (result != null && (B2B_Deleted==null || B2B_Deleted.ToString().ToLower() == "false")) {   if (result.ToLower() == "y" || result.ToLower() == "true")    return true;  }return false;

Filter Description. The filter reads two iPaaS.com custom fields. A customer is processed only when its B2B_SendToB2B field is y or true and its B2B_Deleted field is null or false. A customer not flagged for the B2B path is skipped (return false) and handled by the standard Customer collection; a customer flagged for B2B but marked deleted is also skipped. The filter references custom-field names rather than an environment-specific value, so no placeholder substitution is required.

Mapping Type

Source Field (iPaaS.com Customer)

Destination Field (BigCommerce)

Description

Field

EmailAddress

B2B_Email

Required. The user's email; the key BigCommerce uses to de-duplicate the user.

Dynamic Formula

(see formula below)

B2B_CompanyId

Required. The BigCommerce company the user belongs to, resolved from the customer's primary B2B company relationship via external-ID lookup.

Dynamic Formula

(IsEmpty(FirstName) ? (IsEmpty(Company) ? "N/A" : Company) : FirstName)

B2B_FirstName

Recommended. The user's first name; falls back to the company name, then N/A, when empty.

Dynamic Formula

(IsEmpty(LastName) ? "N/A" : LastName)

B2B_LastName

Recommended. The user's last name; falls back to N/A when empty.

Dynamic Formula

(see formula below)

B2B_Role

Recommended. The user's B2B role ID, resolved from the primary relationship — B2B Admin 0, B2B Senior Buyer 1, B2B Junior Buyer 2.

Dynamic Formula

(see formula below)

B2B_SendToB2B

Recommended. Passes through the B2B_SendToB2B custom-field value that flags the customer for the B2B path.

Dynamic Formula

(see formula below)

B2B_UserIdFromB2B

Recommended. The BigCommerce B2B user ID when already known, so the write updates the existing user rather than creating a duplicate.

Dynamic Formula

Id

B2B_UserIdFromIpaas

Recommended. The iPaaS.com customer ID, carried so BigCommerce can associate the user back to the iPaaS.com record.

B2B_CompanyId formula:

var relationships = Relationships;if(relationships != null){  foreach(var relationship in relationships){    //Check for expected B2B company relationship    if (relationship.IsPrimary && ( relationship.Type == "B2B Admin" || relationship.Type == "B2B Senior Buyer" || relationship.Type == "B2B Junior Buyer")){      //Check for external company Id      var external = await GetExternalIdAsync(relationship.RelatedToId, "Company", SpaceportSystemId);      if(external != null && external != "")          return external;    }  }}return null;

B2B_Role formula:

var relationships = Relationships;if(relationships != null){  foreach(var relationship in relationships){    //Check for expected B2B company relationship    if (relationship.IsPrimary && ( relationship.Type == "B2B Admin" || relationship.Type == "B2B Senior Buyer" || relationship.Type == "B2B Junior Buyer")){      if (relationship.Type == "B2B Admin")        return "0";      if (relationship.Type == "B2B Senior Buyer")        return "1";      if (relationship.Type == "B2B Junior Buyer")        return "2";    }  }}return null;

B2B_SendToB2B and B2B_UserIdFromB2B formulas (each passes through its custom field, returning null when empty):

var result = GetCustomFieldValue(CustomFields, "B2B_SendToB2B");if (result == "" || result == null) { return null;}return result;

BC B2B Customer Address FROM iPaaS.com (child)

iPaaS.com data type: Customer Address

Writes an iPaaS.com Customer Address to BigCommerce for the B2B user. This is a child collection of BC B2B Customer FROM iPaaS.com and transfers as part of the customer; it is not synced on its own.

Mapping Filter

!(IsEmpty(Address1)) && !(IsEmpty(Region))

Filter Description. An address is written only when both the Address1 street line and the Region are present. Addresses missing either value are skipped. This filter contains no environment-specific value, so no placeholder substitution is required.

Mapping Type

Source Field (iPaaS.com Customer Address)

Destination Field (BigCommerce)

Description

Dynamic Formula

(see formula below)

Id

Recommended. Resolves the BigCommerce address ID for an existing address from its external-ID link so an update writes to the correct address rather than adding a new one. When no external ID exists yet, the address is created.

Dynamic Formula

(IsEmpty(FirstName) ? (IsEmpty(Company) ? "N/A" : Company) : FirstName)

FirstName

Recommended. The contact first name; falls back to the company name, then N/A, when empty.

Dynamic Formula

(IsEmpty(LastName) ? "N/A" : LastName)

LastName

Recommended. The contact last name; falls back to N/A when empty.

Field

Company

Company

Recommended. The company name on the address.

Field

Address1

Address1

Recommended. The primary street line; the collection's filter skips any address without a street line.

Field

Address2

Address2

Optional. The secondary street line where present.

Field

City

City

Recommended. The city.

Dynamic Formula

StateName(Region)

State

Recommended. The full state name resolved from the iPaaS.com region.

Field

PostalCode

PostalCode

Recommended. The postal or ZIP code.

Dynamic Formula

CountryCodeWithDefault(Country, "US")

CountryCode

Recommended. The country normalized to a country code, defaulting to US when the country is empty or cannot be resolved.

Dynamic Formula

Coalesce(PhoneNumber, "000")

Phone

Recommended. The contact phone; falls back to 000 when no phone is available so the write has a value.

Id formula:

var external = await GetExternalIdAsync(Id, "Address", SpaceportSystemId);return SubstringAfterLastMatch(external, "\\");

Placeholder value — replace during implementation: the "000" phone fallback is a filler value used when the customer has no phone number. Replace it, or remove the fallback, if your business needs a real phone value on BigCommerce addresses. The "US" country default likewise assumes a US-centric customer base — adjust it if your customers are primarily elsewhere.

Testing and Validation

Test Scenarios

  1. Company write. Manually sync an iPaaS.com Company (with a recognized B2B status, a B2B Admin relationship, and a primary billing address) by its Company ID and confirm the company is created or updated in BigCommerce with the administrator, address, customer group, and payment methods; confirm a company without a recognized status is skipped.

  2. Parent hierarchy. Confirm that transferring a company whose parent exists and is linked writes the parent-company relationship, and that transferring one whose parent is missing or unlinked stops with the parent-company error.

  3. Company user. Flag an iPaaS.com Customer for the B2B path and confirm it is written to BigCommerce as a company user with the resolved company and B2B role; confirm a customer marked deleted, or not flagged for B2B, is skipped.

  4. Address deduplication. Transfer a company or user whose address exactly matches an existing BigCommerce address and confirm no duplicate address is created.

  5. Email matching. Write a company user whose email matches an existing BigCommerce user and confirm the existing record is updated rather than a duplicate created, per the configured collision-handling method.

Validation Checklist

  • B2B support is enabled on the subscription, and the required triggers are configured before expecting automatic transfers.

  • Only one of the standard or B2B customer mappings applies to any given customer.

  • Each outbound company has a recognized B2B status, a B2B Admin relationship, and a primary billing address so the administrator and address land on the BigCommerce company.

  • The B2BPaymentMethods example value, the US country defaults, and the 000 phone fallback have been reviewed and replaced with store-appropriate values before enabling automatic transfers.

  • Referenced BigCommerce customer groups and payment-method codes exist, and Independent Company Behavior is enabled where the customer-group mapping is used.

  • The Allow iPaaS.com to delete company hierarchy setting reflects whether you want iPaaS.com to remove hierarchy links.

  • The correct collision-handling method is selected for the Company and Customer data types.

Additional Notes

  • Delete these collections if you are not using B2B Edition. The B2B company, company address, parent company relationship, and B2B customer collections apply only to BigCommerce B2B Edition and can be removed on a standard store.

  • B2B quote writes are not active. B2B quotes transfer to iPaaS.com but are not written back to BigCommerce from iPaaS.com at this time. Quotes are out of scope for this article; see BigCommerce B2B Edition Support.

  • Inbound direction. Capturing BigCommerce companies and company users into iPaaS.com is documented separately in the companion BigCommerce to iPaaS.com B2B Company and Customer Mapping Documentation.

  • Full-replace updates. Outbound transfers write the full record on each run; map every field you want preserved or use a DestinationValue approach for fields not sourced from iPaaS.com.

Related Documents

Did this answer your question?