Skip to main content

Avalara AvaTax Company From iPaaS.com Mapping Documentation

How iPaaS.com companies are created and updated in Avalara AvaTax, including exemption-certificate provisioning, collision handling, and field mappings.

Summary

This mapping collection creates and updates companies in Avalara AvaTax from iPaaS.com data. When the certificate fields are supplied, it also provisions an exemption certificate for the company and, when the certificate-customer fields are supplied, attaches a customer to that certificate. It keeps company details, tax-configuration flags, certificate details, and the certificate's customer assignment synchronized between iPaaS.com and Avalara AvaTax.

ID Format

Manual Sync ID Format

This is a FROM iPaaS.com collection, so the value entered on the iPaaS.com Manual Sync page is the iPaaS.com-side record id: the numeric company id shown on the company's record in iPaaS.com. Example: 197689.

External ID Format

After a successful transfer, iPaaS.com records the external id on a dedicated external-id record so later updates route to the same company:

  • Company only: the Avalara AvaTax company id (for example, 12345).

  • Company with certificate: the company id and the certificate id combined (for example, 12345|67890).

Deleted Record Support

Outbound delete is not supported. The Delete method is not implemented for the company entity, delete mappings are not included in the default template, and deleting a company in iPaaS.com does not remove the corresponding company in Avalara AvaTax.

Custom Field Support

This mapping collection reads values from named iPaaS.com custom fields on the company using the GetCustomFieldValue function inside dynamic formulas. The custom fields must exist on the iPaaS.com company and be populated for the corresponding Avalara AvaTax values to be set. Example:

GetCustomFieldValue(CustomFields, "CompanyCurrencyCode")

The custom fields this collection reads are CompanyCurrencyCode, CompanyCertificateExposureZoneName, CompanyCertificateExemptionReasonName, and CompanyCertificateCustomerExposureZone_Name.

Mapping Collection Status

  • Status: Enabled

  • Trigger Events: Create, Update

Duplicate or Conflicting Mappings

This mapping collection is the only one that writes companies to Avalara AvaTax. Ensure no other mapping targets the same company entity to prevent unintended overwrites.

Collision Handling

When a company with the same company code already exists in Avalara AvaTax, the create attempt returns a duplicate-company-code response. How the integration reacts is controlled by the mapping collection's Collision Handling Method setting, whose options are Error, Remap and Link, Update and Link, and Update and No Link. Set it to Update and Link so the integration looks up the existing company by its company code and links to it — reusing the existing certificate when one is already present — instead of failing. Keep the CompanyCode value stable for each company so this matching works consistently.

Supported Child Collections

None. The company's exemption certificate and the certificate's customer are provisioned inline as part of the company transfer (see Integration Flow below); there are no separate child mapping collections to configure.

System Caveats

Avalara AvaTax Caveats

  • Unique company code: the company code must be unique within your Avalara AvaTax account.

  • Certificate provisioning: the certificate store must be provisioned before a certificate can be created; the integration provisions it and waits for Avalara AvaTax to report it complete, so a company transfer that includes certificate data takes longer than a company-only transfer.

  • One certificate per transfer: one certificate is created or updated per company transfer.

  • Certificate required fields: a certificate is created only when all of these are supplied — Certificate_SignedDate, Certificate_FileName, Certificate_ExpirationDate, Certificate_ExemptionReason_Name, Certificate_ExposureZone_Name. If any is missing, certificate creation is skipped and only the company is saved.

  • Certificate-customer required fields: a customer is attached to the certificate only when all of these are supplied — 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 any is missing, the certificate is still created but without the customer.

  • Invalid exposure zone / exemption reason: these values are resolved against the valid values in your Avalara AvaTax account (matched by name, case-insensitive). If a value does not match, it is left unset — the company still saves, but the certificate portion that depends on it is skipped.

  • Rate limiting: Avalara AvaTax limits how many requests it accepts from the same source in a short period and returns a request-limit error when exceeded. This integration does not automatically reschedule a transfer that hits the limit; the affected transfer fails and appears in Dashboard / Integration Monitoring / Error Logs, and can be retried. Because a company-plus-certificate transfer makes several calls, stagger large manual sync jobs.

iPaaS.com Caveats

  • Valid company code: provide a stable, unique company code so companies match correctly on updates.

  • Required custom fields: create and populate the custom fields listed under Custom Field Support so the currency, exposure zone, exemption reason, and certificate-customer exposure zone are set.

  • Default country source: the company's default country is read from the first address flagged as the primary billing address; when empty, US is used.

Setup Requirements

iPaaS.com Configuration

To transfer companies automatically, enable the iPaaS.com Company outbound triggers in the subscription's Outbound Data Flows section — subscribe to customer/company/created and customer/company/updated. No automatic transfers occur until those triggers are enabled. Manual Sync is always available from the iPaaS.com Manual Sync page.

Avalara AvaTax Configuration

The connection uses the Avalara AvaTax API Url, API User, API Password, and API Client Id subscription settings.

Integration Flow

  1. Company create or update: a new or existing company is processed from iPaaS.com and created or updated in Avalara AvaTax.

  2. Certificate provisioning: if all required certificate fields are present, the integration provisions the company's certificate store and waits for Avalara AvaTax to finish provisioning it.

  3. Certificate create or update: the exemption certificate is created (or updated on a subsequent transfer) and linked to the company through the external id.

  4. Customer assignment: if all certificate-customer fields are present, the customer is attached to the certificate.

  5. External id: the external id is saved as the company id (company only) or the company id and certificate id combined (company with certificate).

Mappings

Add/Update Avalara AvaTax Company FROM iPaaS.com

This mapping collection does not have a mapping filter applied; all records are processed.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Avalara AvaTax)

Description

Dynamic Formula

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

CompanyCode

Recommended. The code that references the company in Avalara AvaTax; uses AccountNumber when present, otherwise the company Name. Keep it stable so the company matches on updates.

Field

Name

Name

Required. The company name as shown to customers.

Dynamic Formula

string country = FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Country"); return string.IsNullOrWhiteSpace(country) ? "US" : country;

DefaultCountry

Required. Two-character ISO 3166 country code, taken from the primary billing address; defaults to US when empty.

Field

TaxIdNumber

TaxpayerIdNumber

Optional. For United States companies, the nine-digit Employer Identification Number (EIN); digits only.

Field

Description

Description

Optional. Free-text company description.

Dynamic Formula

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

BaseCurrencyCode

Optional. Three-character ISO 4217 currency code from the CompanyCurrencyCode custom field; defaults to USD.

Static

"true"

IsActive

Set to true by design: permits the company to process tax activity.

Static

"false"

IsDefault

Set to false by design: not the account's default company.

Static

"false"

IsTest

Set to false by design: a live (non-test) company.

Static

"true"

HasProfile

Set to true by design: the company has its own tax profile.

Static

"false"

IsAdvSave

Set to false by design.

Static

"false"

IsDeleted

Set to false by design.

Static

"Line"

RoundingLevelId

Set to Line by design (Avalara AvaTax accepts Line or Document): rounds tax at the line level.

Static

"Document"

TaxDependencyLevelId

Set to Document by design (Avalara AvaTax accepts Document, State, TaxRegion, or Address).

Field

CompanyCertificateSignedDate

Certificate_SignedDate

Required to create a certificate. The date the certificate was signed. Example: 2016-03-05.

Field

CompanyCertificateFileName

Certificate_FileName

Required to create a certificate. The file name Avalara AvaTax tracks for the certificate image. Example: Avalara AvaTax certificate.

Field

CompanyCertificateExpirationDate

Certificate_ExpirationDate

Required to create a certificate. The date the certificate expires. Example: 2026-03-05.

Dynamic Formula

CompanyCertificateExemptionReasonName custom field

Certificate_ExemptionReason_Name

Required to create a certificate. Resolves the custom-field value to a valid Avalara AvaTax exemption reason (matched by name, case-insensitive); left unset if it does not match. Full formula under Dynamic Formula Details below.

Dynamic Formula

CompanyCertificateExposureZoneName custom field

Certificate_ExposureZone_Name

Required to create a certificate. Resolves the custom-field value to a valid Avalara AvaTax exposure zone (matched by name or region, case-insensitive); left unset if it does not match. Full formula under Dynamic Formula Details below.

Field

CompanyCertificateCustomerCustomerCode

Certificate_Customer_CustomerCode

Required to attach a customer. Example: CUST001.

Field

CompanyCertificateCustomerName

Certificate_Customer_Name

Required to attach a customer. Example: Acme Corporation.

Field

CompanyCertificateCustomerLine

Certificate_Customer_Line

Required to attach a customer. Example: 123 Industrial Road.

Field

CompanyCertificateCustomerCity

Certificate_Customer_City

Required to attach a customer. Example: Karachi.

Field

CompanyCertificateCustomerPostalCode

Certificate_Customer_PostalCode

Required to attach a customer. Example: 74200.

Field

CompanyCertificateCustomerRegion

Certificate_Customer_Region

Required to attach a customer. ISO 3166 region code. Example: CA.

Field

CompanyCertificateCustomerCountry

Certificate_Customer_Country

Required to attach a customer. Example: US.

Dynamic Formula

CompanyCertificateCustomerExposureZone_Name custom field

Certificate_Customer_ExposureZone_Name

Required to attach a customer. Resolves the custom-field value to a valid Avalara AvaTax exposure zone (matched by name or region, case-insensitive); left unset if it does not match. Full formula under Dynamic Formula Details below.

Dynamic Formula Details

The exposure-zone and exemption-reason mappings use the following formulas verbatim. Each reads a custom-field value, resolves it against the valid values in your Avalara AvaTax account, and returns empty when there is no match (so the company still saves and only the dependent certificate portion is skipped). Subscribers or their MiSP who prefer the whole record to be rejected on an invalid value can edit these formulas in the iPaaS.com mapping editor.

// Certificate_ExemptionReason_Name
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_ExposureZone_Name
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_Customer_ExposureZone_Name
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;

Error Handling

  • Missing required certificate fields: If any required certificate field is missing, certificate creation is skipped and only the company is saved. Populate all required certificate fields to create a certificate.

  • Missing certificate-customer fields: If any certificate-customer field is missing, the certificate is created without the customer. Populate all certificate-customer fields to attach a customer.

  • Duplicate company code: If a company with the same company code already exists in Avalara AvaTax, set the mapping collection's Collision Handling Method to Update and Link so the existing company is matched and updated instead of failing.

  • Invalid exposure zone or exemption reason: If the supplied value does not match a valid Avalara AvaTax value, that value is left unset and the dependent certificate portion is skipped while the company still saves.

Testing & Validation

Test Scenarios

  1. Sync a new company with a complete set of certificate fields and verify the company and certificate are created in Avalara AvaTax and the external id is saved as company id and certificate id.

  2. Update an existing company or certificate and verify changes are reflected without creating a duplicate.

  3. Provide complete certificate-customer fields and verify the customer is attached to the certificate.

  4. Sync a company without a company code (or with a duplicate one) and verify collision handling links to the existing company when the method is Update and Link.

  5. Provide an invalid exposure zone or exemption reason and verify the company still saves with that value unset.

Validation Checklist

  • Company code is present and unique.

  • Certificate required fields (SignedDate, FileName, ExpirationDate, ExemptionReason_Name, ExposureZone_Name) are populated when a certificate is needed.

  • Certificate-customer fields are complete when a customer assignment is needed.

  • External id is formatted as the company id, or company id and certificate id combined.

Additional Notes

The required custom fields (CompanyCurrencyCode, CompanyCertificateExposureZoneName, CompanyCertificateExemptionReasonName, CompanyCertificateCustomerExposureZone_Name) must exist on the iPaaS.com company for the related Avalara AvaTax values to be populated.

Related Documents

Did this answer your question?