org.mule.modules

mule-module-avalara

2.0-ALPHA-1
Namespacehttp://www.mulesoft.org/schema/mule/avalara
Schema Locationhttp://www.mulesoft.org/schema/mule/avalara/2.0/mule-avalara.xsd
Version2.0
Minimum Mule Version3.2

Module Overview

Avalara provides automated sales tax solutions to streamline cumbersome, error-prone tax compliance processes and reduce the risk of loss or penalty in case of an audit. Their automated solutions automatically perform address validation, jurisdiction research and rate calculation and allow you to manage even the most complicated tax issues, such as situs, nexus, tax tiers, tax holidays, exemptions, certificate management and product taxability rules.

Summary

Message Processors
<avalara:cancel-tax>
Cancel tax, indicating the document that should be cancelled and the reason for the operation.
<avalara:commit-tax>
Commit Tax processor
<avalara:get-tax>
Get Tax processor.
<avalara:get-tax-history>
Get Tax History processor
<avalara:post-tax>
Post Tax processor
<avalara:validate-address>
Validate Address processor.

Message Processors

<avalara:cancel-tax>

Cancel tax, indicating the document that should be cancelled and the reason for the operation.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
docId Optional. The original document's type, such as Sales Invoice or Purchase Invoice.
companyCode Client application company reference code. If docId is specified, this is not needed.
docType The document type specifies the category of the document and affects how the document is treated after a tax calculation; see AvalaraDocumentType for more information about the specific document types.
docCode Optional. The internal reference code used by the client application.
cancelCode A code indicating the reason the document is getting canceled.
Child Elements
Return Payload
Exception Payload
AvalaraRuntimeException

<avalara:commit-tax>

Commit Tax processor

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
docId Optional. The original document's type, such as Sales Invoice or Purchase Invoice.
companyCode Client application company reference code. If docId is specified, this is not needed.
docType The document type specifies the category of the document and affects how the document is treated after a tax calculation; see AvalaraDocumentType for more information about the specific document types.
docCode Optional. The internal reference code used by the client application.
newDocCode Optional. The new document code value.
Child Elements
Return Payload
Exception Payload
AvalaraRuntimeException

<avalara:get-tax>

Get Tax processor.

The Get Tax operation calculates tax for one or more invoiced items and displays details describing the calculation of tax for each line item.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
companyCode Client application company reference code
docType The document type specifies the category of the document and affects how the document is treated after a tax calculation; see AvalaraDocumentType for more information about the specific document types.
docCode Optional. The internal reference code used by the client application.
docDate Date of invoice, purchase order, etc.
salespersonCode Optional. The client application salesperson reference code.
customerCode Client application customer reference code
customerUsageType Optional. Client application customer or usage type. CustomerUsageType determines the exempt status of the transaction based on the exemption tax rules for the jurisdictions involved. CustomerUsageType may also be set at the line item level.

The standard values for the CustomerUsageType (A-L).
A Federal Government
B State/Local Govt.
C Tribal Government
D Foreign Diplomat
E Charitable Organization
F Religious/Education
G Resale
H Agricultural Production
I Industrial Prod/Mfg.
J Direct Pay Permit
K Direct Mail
L - Other

discount The discount amount to apply to the document. The string represents a BigDecimal.
purchaseOrderNo Optional. Purchase order identifier. PurchaseOrderNo is required for single use exemption certificates to match the order and invoice with the certificate.
exemptionNo Optional. Exemption number used for this transaction
originCode Code that refers one of the address of the baseAddress collection. It has to be the same code of one of the address's addressCode. It represents the origin address.
destinationCode Code that refers one of the address of the baseAddress collection. It has to be the same code of one of the address's addressCode. It represents the destination address.
detailLevel Specifies the level of tax detail to return
referenceCode Optional. For returns (see AvalaraDocumentType), refers to the getDocCode() of the original invoice.
locationCode Optional. Location Code value. It is Also referred to as a Store Location, Outlet Id, or Outlet code is a number assigned by the State which identifies a Store location. Some state returns require taxes are broken out separately for Store Locations.
commit Optional. Commit flag. If Commit is set to true, tax for the transaction is saved, posted and committed as tax document.
batchCode Optional. The batchCode value.
currencyCode Optional. It is 3 character ISO 4217 currency code.
serviceMode Optional. This is only supported by AvaLocal servers. It provides the ability to controls whether tax is calculated locally or remotely when using an AvaLocal server. The default is Automatic which calculates locally unless remote is necessary for non-local addresses.
paymentDate The date on which payment was made.
exchangeRate The exchange rate value. The string represents a BigDecimal
exchangeRateEffDate The exchange rate effective date value.
Child Elements
<avalara:baseAddresses>
Collection of physical addresses that will be referred to as the destination or origination of 1 or more invoice line entries
<avalara:lines>
Collection of invoice lines requiring tax calculation
<avalara:taxOverride>
Optional. Indicates to apply tax override to the document.
Return Payload
Exception Payload
AvalaraRuntimeException

<avalara:get-tax-history>

Get Tax History processor

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
docId Optional. The original document's type, such as Sales Invoice or Purchase Invoice.
companyCode Client application company reference code. If docId is specified, this is not needed.
docType The document type specifies the category of the document and affects how the document is treated after a tax calculation; see AvalaraDocumentType for more information about the specific document types.
docCode Optional. The internal reference code used by the client application.
detailLevel Specifies the level of detail to return. See DetailLevelType.
Child Elements
Return Payload
Exception Payload
AvalaraRuntimeException

<avalara:post-tax>

Post Tax processor

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
docId Optional. The original document's type, such as Sales Invoice or Purchase Invoice.
companyCode Client application company reference code. If docId is specified, this is not needed.
docType The document type specifies the category of the document and affects how the document is treated after a tax calculation; see AvalaraDocumentType for more information about the specific document types.
docCode Optional. The internal reference code used by the client application.
docDate The date on the invoice, purchase order, etc
totalAmount The total amount (not including tax) for the document. This is used for verification and reconciliation. This should be the TotalAmount returned by GetTaxResult when tax was calculated for this document; otherwise the web service will return an error. The string represents a BigDecimal
totalTax The total tax for the document. This is used for verification and reconciliation. This should be the TotalTax returned by GetTaxResult when tax was calculated for this document; otherwise the web service will return an error. The string represents a BigDecimal
commit Optional. The commit value. This has been defaulted to false. If this has been set to true AvaTax will commit the document on this call. Seller's system who wants to Post and Commit the document on one call should use this flag.
newDocCode Optional. The new document code value.
Child Elements
Return Payload
Exception Payload
AvalaraRuntimeException

<avalara:validate-address>

Validate Address processor.

This operation validates the supplied address, returning canonical form and additional delivery details if successfully validated.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
account Avalara's account
license Avalara's license
avalaraClient Avalara's client
line1 Address line 1
line2 Optional. Address line 2
line3 Optional. Address line 3
city Optional. City name. Required, when PostalCode is not specified.
region Optional. State or region name. Requirad, when PostalCode is not specified.
country Optional. Country code
postalCode Optional. Postal or ZIP code. Required, when City and Region are not specified
addressCode Optional. The address code.
taxRegionId Optional. The tax region id.
latitude Optional. Latitude.
longitude Optional. Longitude.
textCase Optional. The casing to apply to the validated address(es).
coordinates Optional. True, if you want in the result a not empty latitud and longitude.
taxability Optional. True, if you want the valid taxRegionId in the result.
date Date.
Child Elements
Return Payload
Exception Payload
AvalaraRuntimeException