java.lang.Object | |
↳ | org.mule.modules.avalara.AvalaraModule |
![]() |
![]() |
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.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
addressServiceEndpoint | Address Webservice endpoint | ||||||||||
apiClient | Avalara's application client. | ||||||||||
batchServiceEndpoint | Batch Webservice endpoint | ||||||||||
mom | |||||||||||
taxServiceEndpoint | Tax Webservice endpoint |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adjust Tax processor.
| |||||||||||
Cancel tax, indicating the document that should be canceled and the reason
for the operation.
| |||||||||||
Commit Tax processor
| |||||||||||
Connects to Avalara
| |||||||||||
Destroys the session
| |||||||||||
Batch Fetch processor.
| |||||||||||
Get Tax processor.
| |||||||||||
Get Tax History processor
| |||||||||||
Has the Batch Processing finished
Fetches a Batch result | |||||||||||
Ping Avalara to test connectivity and version of the service.
| |||||||||||
Ping Avalara to test connectivity and version of the service for a specific user.
| |||||||||||
Post Tax processor
| |||||||||||
Batch Save processor.
| |||||||||||
Sets the apiClient.
| |||||||||||
Validate Address processor.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Address Webservice endpoint
Avalara's application client. By default uses DefaultAvalaraClient class.
Batch Webservice endpoint
Tax Webservice endpoint
Adjust 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.
adjustmentReason | The reason for this tax adjustment. |
---|---|
adjustmentDescription | A description of a tax adjustment. |
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 | The internal reference code used by the client application. |
docDate | Date of invoice, purchase order, etc. |
salespersonCode | The client application salesperson reference code. |
customerCode | Client application customer reference code |
customerUsageType | 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). |
discount | The discount amount to apply to the document. The string represents a BigDecimal. |
purchaseOrderNo | Purchase order identifier. PurchaseOrderNo is required for single use exemption certificates to match the order and invoice with the certificate. |
exemptionNo | 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. |
baseAddresses | Collection of physical addresses that will be referred to as the destination or origination of 1 or more invoice line entries |
lines | Collection of invoice lines requiring tax calculation |
detailLevel | Specifies the level of tax detail to return |
referenceCode | For returns (see AvalaraDocumentType ), refers to the
AdjustTaxRequest of the original invoice. |
locationCode | 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 | Commit flag. If Commit is set to true, tax for the transaction is saved, posted and committed as tax document. |
batchCode | The batchCode value. |
taxOverride | Indicates to apply tax override to the document. |
currencyCode | It is 3 character ISO 4217 currency code. |
serviceMode | 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. |
AdjustTaxResult
AvalaraRuntimeException |
---|
Cancel tax, indicating the document that should be canceled and the reason for the operation.
docId | 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 | The internal reference code used by the client application. |
cancelCode | A code indicating the reason the document is getting canceled. |
CancelTaxResult
AvalaraRuntimeException |
---|
Commit Tax processor
docId | 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 | The internal reference code used by the client application. |
newDocCode | The new document code value. |
CommitTaxRequest
AvalaraRuntimeException |
---|
Connects to Avalara
account | Registered Avalara account |
---|---|
avalaraClient | Target client to which make the call |
license | The matching license for the account |
ConnectionException |
---|
Destroys the session
Batch Fetch processor.
Fetches a Batch result
batchId | The numerical identifier of the BatchFile. |
---|
AvalaraRuntimeException |
---|
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.
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 | The internal reference code used by the client application. |
docDate | Date of invoice, purchase order, etc. |
salespersonCode | The client application salesperson reference code. |
customerCode | Client application customer reference code |
customerUsageType | 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). |
discount | The discount amount to apply to the document. The string represents a BigDecimal. |
purchaseOrderNo | Purchase order identifier. PurchaseOrderNo is required for single use exemption certificates to match the order and invoice with the certificate. |
exemptionNo | 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. |
baseAddresses | Collection of physical addresses that will be referred to as the destination or origination of 1 or more invoice line entries |
lines | Collection of invoice lines requiring tax calculation |
detailLevel | Specifies the level of tax detail to return |
referenceCode | For returns (see AvalaraDocumentType ), refers to the
getDocCode() of the original invoice. |
locationCode | 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 | Commit flag. If Commit is set to true, tax for the transaction is saved, posted and committed as tax document. |
batchCode | The batchCode value. |
taxOverride | Indicates to apply tax override to the document. |
currencyCode | It is 3 character ISO 4217 currency code. |
serviceMode | 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. |
GetTaxResult
AvalaraRuntimeException |
---|
Get Tax History processor
docId | 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 | The internal reference code used by the client application. |
detailLevel | Specifies the level of detail to return. See DetailLevelType . |
AvalaraRuntimeException |
---|
Has the Batch Processing finished
Fetches a Batch result
batchId | The numerical identifier of the BatchFile. |
---|
AvalaraRuntimeException |
---|
Ping Avalara to test connectivity and version of the service.
message | Ping Message |
---|
PingResult
AvalaraRuntimeException |
---|
Ping Avalara to test connectivity and version of the service for a specific user. It is needed to specify the credentials for the user since this operation does not use the global connector configuration.
pingAccount | Avalara Account Number |
---|---|
pingAvalaraClient | Avalara Client |
pingLicense | Avalara License |
message | Ping Message |
PingResult
AvalaraRuntimeException |
---|
Post Tax processor
docId | 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 | 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 | 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 | The new document code value. |
PostTaxResult
AvalaraRuntimeException |
---|
Batch Save processor.
Saves a Batch. Note that you should pass-in your console credentials for this method, instead of the API ones
batchType | The kind of records to be imported. |
---|---|
companyId | The id of the company. (Need to be retrived from address bar in Avalara after hitting the Organization Tab) |
content | The content of this import, usually a csv file. |
batchName | The name of the batch. |
BatchSaveResult
AvalaraRuntimeException |
---|
addressServiceEndpoint |
---|
batchServiceEndpoint |
---|
Sets the apiClient.
apiClient | With the apiClient. |
---|
taxServiceEndpoint |
---|
Validate Address processor.
This operation validates the supplied address, returning canonical form and additional delivery details if successfully validated.
line1 | Address line 1 |
---|---|
line2 | Address line 2 |
line3 | Address line 3 |
city | City name. Required, when PostalCode is not specified. |
region | State or region name. Requirad, when PostalCode is not specified. |
country | Country code |
postalCode | Postal or ZIP code. Required, when City and Region are not specified |
addressCode | The address code. |
taxRegionId | The tax region id. |
latitude | Latitude. |
longitude | Longitude. |
textCase | The casing to apply to the validated address(es). |
coordinates | True, if you want in the result a not empty latitud and longitude. |
taxability | True, if you want the valid taxRegionId in the result. |
date | Date. |
ValidateResult
AvalaraRuntimeException |
---|