Skip to main content

Company FROM iPaaS.com Mapping Documentation

Updated this week

Summary

When a Company is created or updated in iPaaS.com, the corresponding Company record is created or updated in AvaTax. If certificate-related data is provided, a Company Certificate is provisioned, created, or updated accordingly. The mapping ensures accurate synchronization of Company, Certificate, and Customer data between iPaaS.com and AvaTax.

ID Format

When manually transferring a Company from iPaaS.com, enter the valid iPaaS.com Company ID (internal ID) into the “IPAAS.COM” input field on the iPaaS.com manual sync page.

Example: 197689

External ID Format

The Avalara AvaTax Company ID will be saved as the external ID.

Company only: CompanyId

Example: 12345

The Avalara AvaTax Company ID with Certificate ID will be saved as the external ID.

Company with Certificate: CompanyId|CertificateId

Example: 12345|67890

Deleted Record Support

Outbound delete support is not implemented for the Company entity. The Delete method in the Company model throws a NotImplementedException. Delete mappings are not included in the default mapping templates. If a Company record is deleted in iPaaS.com, the deletion will not be propagated to Avalara AvaTax.

Custom Field Support

This integration uses the GetCustomFieldValue function to retrieve custom field values from iPaaS.com Company records. Custom fields are accessed by their field ID within dynamic formulas.

Example:

return GetCustomFieldValue(CustomFields, “CompanyCurrencyCode”);

Mapping Collection Status

  • Mapping Status: Enabled.

  • Trigger Events: Create, Update

Duplicate or Conflicting Mappings

This mapping applies only to AvaTax Companies. Ensure that no other mappings target the same Company entity to prevent data overwrite. Collision handling must be enabled before matching on CompanyCode will occur. To enable it, configure the Collision Handling Method to Update and Link in the Subscription Settings of the mapping collection. When enabled, the system detects duplicate CompanyCodes: the existing Company ID (along with first or default certificateID if available) is fetched as externalID, and append the external id to the payload and update the company.

System Caveats

AvaTax Caveats

  • CompanyCode must be unique

  • Certificate provisioning must complete before creating or updating a certificate.

  • Only one certificate can be created or updated per Company from iPaaS.com at a time.

Certificate creation requires these fields:

  • Certificate_SignedDate

  • Certificate_FileName

  • Certificate_ExpirationDate

  • Certificate_ExemptionReason_Name

  • Certificate_ExposureZone_Name

If certificate fields are missing, certificate creation will be skipped, and the company ExternalId will still be created.

If ExemptionReason or ExposureZone is invalid or not found, an error will be thrown.

Customer assignment requires complete customer fields:

  • Certificate_Customer_CustomerCode

  • Certificate_Customer_Name

  • Certificate_Customer_Line

  • Certificate_Customer_City

  • Certificate_Customer_PostalCode

  • Certificate_Customer_Country

  • Certificate_Customer_Region

  • Certificate_Customer_ExposureZone_Name

If customer fields are incomplete, the certificate will still be created without customer assignment.

If Customer Exposure Zone is invalid an error will be thrown.

iPaaS.com Caveats

  • Company must have a valid CompanyCode.

  • Certificate fields must be provided for provisioning.

Integration Flow

  1. Company Creation / Update: A new or existing Company record is processed from iPaaS.com.

  2. Certificate Provisioning: If certificate fields are provided, the certificate is provisioned using AvaTax API.

  3. Certificate Creation / Update: Certificate is created or updated, linked to the Company via ExternalId.

  4. Customer Assignment: Customer is assigned to the certificate if all required fields are provided.

  5. External ID Update:
    Company only: ExternalId = CompanyId
    Company and Certificate: ExternalId = CompanyId|CertificateId

Mappings

Avalara Avatax Company From iPaaS.com

Mapping Filter: None.

Description: This mapping collection creates and updates AvaTax Companies from iPaaS.com data.

It applies only to companies with a valid CompanyCode and provisions certificates when all required certificate fields are provided. The mapping ensures company data, certificate details, customer assignments, and related financial attributes remain synchronized between iPaaS.com and AvaTax.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Avalara AvaTax)

Description

Dynamic Formula

return !string.IsNullOrWhiteSpace(AccountNumber) ? AccountNumber : Name;

CompanyCode

This is a required field in Avalara.

Checks if AccountNumber is not empty or whitespace:

If valid → returns AccountNumber

Otherwise → returns Name

Field

Name

Name

This is a required field in Avalara.

Static

false

IsDefault

This field is set to false.

Static

true

IsActive

This field is set to true.

Field

TaxIdNumber

TaxpayerIdNumber

Optional field.

Maximum length: 11 characters.

Must not contain alphabetic characters

Field

Description

Description

This is Optional field in Avalara.

Static

true

HasProfile

Statically set to true for HasProfile.

Dynamic Formula

string country = FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Country");

return string.IsNullOrWhiteSpace(country) ? "US" : country;

DefaultCountry

Avalara requires a 2-character country code.

Retrieves the Country from the first address where IsPrimaryBilling == true.

Stores the result in the country variable.

Returns "US" if the value is null/empty; otherwise returns the actual country.

Dynamic Formula

string currencyCode = GetCustomFieldValue(CustomFields, "CompanyCurrencyCode"); if(!string.IsNullOrWhiteSpace(currencyCode)) return currencyCode; else return "USD";

BaseCurrencyCode

Maximum length: 3 characters.

Static

Line

RoundingLevelId

This field is set to Line.

Static

false

IsTest

This field is set to false.

Static

Document

TaxDependencyLevelId

This field is set to Document.

Static

false

IsDeleted

This field is set to false

Static

false

IsAdvSave

This field is set to false.

Field

CompanyCertificateFileName

Certificate_FileName

This field is required in Avalara to create a certificate.

Example: “Avalara AVATAX certificate”

Field

CompanyCertificateSignedDate

Certificate_SignedDate

This field is required in Avalara to create a certificate.

Example: “2016-03-05”

Field

CompanyCertificateExpirationDate

Certificate_ExpirationDate

This field is required in Avalara to create a certificate.

Example: “2026-03-05”

Dynamic Formula

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExemptionReasonName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string reasonName = await GetCertificateExemptionReasonNameAsync(value);

if (string.IsNullOrWhiteSpace(reasonName))

{

return null;

}

return reasonName;

Certificate_ExemptionReason_Name

Mapping Note – Certificate Exposure Reason

The Certificate Exposure Reason Name is mapped using a dynamic formula that reads the value from the CompanyCertificateExemptionReasonName custom field. If the field is empty or null, the mapping returns null. Otherwise, the system attempts to resolve the corresponding Exposure Zone in Avalara using the custom function GetCertificateExemptionReasonNameAsync.

Two configurable behaviors are supported via dynamic mapping:

1. Strict Validation (Exception Mode)

In this mode, the system enforces strict validation. If the provided Exposure Reason does not exist in Avalara, an exception is thrown and the certificate creation process is stopped. Since Exposure Reason is required for certificate creation, this ensures that both the certificate and company are only created when a valid value is provided.

Dynamic Formula (Exception Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExemptionReasonName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExemptionReasonNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

throw new InvalidOperationException($"Invalid exempt reason: '{value}'. Provide valid exempt reason available in Avalara");

}

return zoneName;

2. Flexible Validation (Null Mode)

In this mode, the system allows more flexibility. If the Exposure Reason is not found in Avalara, the mapping returns null instead of throwing an exception. This allows the company to be created even if the exposure reason is invalid or missing, while certificate creation can be skipped or handled separately.

Dynamic Formula (Null Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExemptionReasonName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExemptionReasonNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

return null;

}

return zoneName;

Note

A valid Exposure Reason is required for certificate creation in Avalara.

  • Strict Validation ensures complete data accuracy by blocking invalid values.

  • Flexible Validation allows partial processing and prevents failure of company creation due to missing or incorrect exposure reason.

Dynamic Formula

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExposureZoneName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

return null;

}

return zoneName;

Certificate_ExposureZone_Name

Mapping Note – Certificate Exposure Zone

The Certificate Exposure Zone Name is mapped using a dynamic formula that reads the value from the CompanyCertificateExposureZoneName custom field. If the field is empty or null, the mapping returns null. Otherwise, the system attempts to resolve the corresponding Exposure Zone in Avalara using the custom function GetCertificateExposureZoneNameAsync.

Two configurable behaviors are supported via dynamic mapping:

1. Strict Validation (Exception Mode)

In this mode, the system enforces strict validation. If the provided Exposure Zone does not exist in Avalara, an exception is thrown and the certificate creation process is stopped. Since Exposure Zone is required for certificate creation, this ensures that both the certificate and company are only created when a valid value is provided.

Dynamic Formula (Exception Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExposureZoneName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

throw new Exception("The Exposure Zone with name '" + value + "' was not found in Avalara");

}

return zoneName;

2. Flexible Validation (Null Mode)

In this mode, the system allows more flexibility. If the Exposure Zone is not found in Avalara, the mapping returns null instead of throwing an exception. This allows the company to be created even if the exposure zone is invalid or missing, while certificate creation can be skipped or handled separately.

Dynamic Formula (Null Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateExposureZoneName");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

return null;

}

return zoneName;

Note

A valid Exposure Zone is required for certificate creation in Avalara.

  • Strict Validation ensures complete data accuracy by blocking invalid values.

  • Flexible Validation allows partial processing and prevents failure of company creation due to missing or incorrect exposure zone.

Field

CompanyCertificateCustomerCustomerCode

Certificate_Customer_CustomerCode

This field is required in Avalara to create a certificate with customer.

Example: “CUST001”

Field

CompanyCertificateCustomerName

Certificate_Customer_Name

This field is required in Avalara to create a certificate with customer.

Example: “Acme Corporation”

Field

CompanyCertificateCustomerLine

Certificate_Customer_Line

This field is required in Avalara to create a certificate with customer.

Example: “123 Industrial Road”

Field

CompanyCertificateCustomerCity

Certificate_Customer_City

This field is required in Avalara to create a certificate with customer.

Example: “Karachi”

Field

CompanyCertificateCustomerPostalCode

Certificate_Customer_PostalCode

This field is required in Avalara to create a certificate with customer.

Example: “74200”

Field

CompanyCertificateCustomerCountry

Certificate_Customer_Country

This field is required in Avalara to create a certificate with customer.

Example: “Pakistan”

Field

CompanyCertificateCustomerRegion

Certificate_Customer_Region

This field is required in Avalara to create a certificate with customer.

Example: “CA”

Dynamic Formula

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateCustomerExposureZone_Name");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

return null;

}

return zoneName;

Certificate_Customer_ExposureZone_Name

Mapping Note – Certificate Customer Exposure Zone

The Certificate Customer Exposure Zone Name is mapped using a dynamic formula that reads the value from the CompanyCertificateCustomerExposureZoneName custom field. If the field is empty or null, the mapping returns null. Otherwise, the system attempts to resolve the corresponding Exposure Zone in Avalara using the custom function GetCertificateExposureZoneNameAsync.

Two configurable behaviors are supported via dynamic mapping:

1. Strict Validation (Exception Mode)

In this mode, the system enforces strict validation. If the provided Exposure Zone does not exist in Avalara, an exception is thrown and the certificate creation process is stopped. Since Exposure Zone is required for certificate customer creation, this ensures that the certificate (and its associated customer) and company are only created when a valid value is provided.

Dynamic Formula (Exception Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateCustomerExposureZone_Name");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

throw new Exception("The Exposure Zone with name '" + value + "' was not found in Avalara");

}

return zoneName;

2. Flexible Validation (Null Mode)

In this mode, the system allows more flexibility. If the Exposure Zone is not found in Avalara, the mapping returns null instead of throwing an exception. This allows the company to be created even if the exposure zone is invalid or missing, while certificate (and its associated customer) creation can be skipped or handled separately.

Dynamic Formula (Null Mode):

string value = GetCustomFieldValue(CustomFields, "CompanyCertificateCustomerExposureZone_Name");

if (string.IsNullOrWhiteSpace(value))

{

return null;

}

string zoneName = await GetCertificateExposureZoneNameAsync(value);

if (string.IsNullOrWhiteSpace(zoneName))

{

return null;

}

return zoneName;

Note

A valid Exposure Zone is required for certificate customer creation in Avalara.

  • Strict Validation ensures complete data accuracy by blocking invalid values.

  • Flexible Validation allows partial processing and prevents failure of company creation due to missing or incorrect exposure zone.

Error Handling

Collection: Company / Certificate

  • Error: Missing required fields

  • Description: This error occurs when Company or Certificate creation/update fails due to missing data.

  • Resolution: Ensure all mandatory Company, Certificate, and Customer fields are populated.

Duplicate CompanyCode

  • Description: This error occurs when trying to create a company in Avalara AvaTax with an existing CompanyCode.

  • Resolution: Enable collision handling in the mapping collection by configuring the Collision Handling Method to Update and Link in the Subscription Settings.

Validation Rules & Testing

Validation Checklist

  • CompanyCode is present and unique

  • Certificate required fields (SignedDate, FileName, ExpirationDate, ExemptionReason_Name, ExposureZone_Name) are populated

  • Customer fields complete if certificate customer assignment is needed

  • ExternalId is correctly formatted: CompanyId or CompanyId|CertificateId

Test Scenarios

Create Company/Certificate

  • Sync a new Company with certificate from iPaaS.com

  • Verify Company and Certificate are created in AvaTax

  • Confirm ExternalId is saved in iPaaS.com

Update Company/Certificate

  • Update an existing Company or Certificate in iPaaS.com

  • Ensure changes are reflected in AvaTax without duplicates

  • Confirm ExternalId remains consistent

Customer Assignment

  • Provide complete customer fields

  • Ensure customer is linked to the certificate

Required Field Validation

  • Attempt to sync a Company without a CompanyCode and verify an appropriate error is returned

  • Attempt certificate creation with missing required fields (SignedDate, FileName, ExpirationDate) and verify certificate creation is skipped

ID Format Verification

  • Manually sync using the documented iPaaS.com Company ID format and verify success

  • Verify ExternalId is saved as CompanyId for company-only sync and CompanyId|CertificateId for company with certificate

Collision Handling

  • Sync a Company with a CompanyCode that already exists in AvaTax and verify collision handling updates the existing record

Invalid Exemption Reason / Exposure Zone

  • With Strict Validation enabled, provide an invalid Exemption Reason and verify the expected error is returned

  • With Flexible Validation enabled, provide an invalid Exposure Zone and verify the Company is still created with a null value

Additional Notes

  • Dynamic formulas in iPaaS.com must return valid outputs for Company, Certificate, and Customer fields.

Did this answer your question?