Broadleaf Microservices
  • v1.0.0-latest-prod

Avalara Tax Module

Environment Setup

Include the Broadleaf Avalara dependency in your CartOperationServices component:

<dependency>
  <groupId>com.broadleafcommerce.microservices</groupId>
  <artifactId>broadleaf-avalara-tax</artifactId>
</dependency>

Configuring Your Integration

  • broadleaf.tax.provider.avatax.environment

    • The AvaTax environment. Accepted values are "Sandbox" or "Production". Defaults to "Sandbox". Ignores case.

  • broadleaf.tax.provider.avatax.username

    • The AvaTax username.

  • broadelaf.tax.provider.avatax.password

    • The AvaTax password.

Optional Configuration

  • broadleaf.tax.provider.avatax.appName

    • The application name passed to AvaTax. Defaults to "Broadleaf Commerce"

  • broadleaf.tax.provider.avatax.appVersion

    • The application version. Defaults to "app-version-not-set"

  • broadleaf.tax.provider.avatax.machineName

    • The machine name. Defaults to "machine-name-not-set"

Register the AvalaraTaxProvider Bean & Configuration Properties Class

@Configuration
@EnableConfigurationProperties(AvaTaxProperties.class)
public static class AvalaraTaxAutoConfiguration {

    @Bean
    public TaxProvider<TaxRequest, TaxResponse> avaTaxProvider(AvaTaxProperties avaTaxProperties,
            TypeFactory typeFactory,
            ObjectMapper objectMapper) {
        return new AvalaraTaxProvider<>(avaTaxProperties, typeFactory, objectMapper);
    }
}

Configuration for Post-Checkout Tax Interactions

Tax commits, adjustments, voids, and refunds are disabled by default. To enable these interactions, see the order operations docs on post-checkout tax operations.

To enable the ability to commit, adjust, refund, and void transaction via Avalara, you must ensure that the AvalaraTaxProvider bean mentioned above is also accessible within the OrderOperationService. Depending on the organization of your flex packages, this may already be accomplished, or you may need to register the same dependency & configuration in an additional context to make it accessible to the OrderOperationService

Release Notes

2.0.1-GA

Important Updates

Spring Boot Upgrade

  • As of Broadleaf Release Train 2.1.3-GA, all microservices have been upgraded to Spring Boot 3.3

1.1.6-M1 (GA in development)

  • Updated AvalaraTaxProvider to correctly declare TaxInfo#isVat & TaxDetail#isVat based on whether taxes are included in the item prices. Note: These fields are misnomers & this change causes the values to align with the intention of the fields.

  • Updated AvaTaxProperties#environment to use a default value of "Sandbox".