Backend Integration
The Avalara plugin for Elastic Path Commerce is an implementation of the Tax Calculator Extension Point. Therefore this plugin is compatible with Elastic Path Commerce 8.4.0 and later.
Plugin Integration
Open the
ext-plugin-config
module in yourep-commerce
source code repository.Open
pom.xml
and add the following within the<dependencies>
section:<dependency> <groupId>com.elasticpath.xpf</groupId> <artifactId>ep-tax-avalara-plugin</artifactId> <version>1.0.1</version> </dependency>
Open
plugins.json
and add the following entry to theplugins
array:{ "identifier": { "pluginId": "elasticpath-avalarataxcalculatorplugin-*" }, "settings": [ { "key": "AVALARA_URL", "dataType": "SHORT_TEXT", "collectionType": "SINGLE", "values": [ { "value": "${avalara.url}" } ] }, { "key": "AVALARA_ACCOUNT", "dataType": "SHORT_TEXT", "collectionType": "SINGLE", "values": [ { "value": "${avalara.account}" } ] }, { "key": "AVALARA_LICENSE", "dataType": "SHORT_TEXT", "collectionType": "SINGLE", "values": [ { "value": "${avalara.license}" } ] }, { "key": "AVALARA_COMPANY_CODE", "dataType": "SHORT_TEXT", "collectionType": "SINGLE", "values": [ { "value": "${avalara.company.code}" } ] }, { "key": "HASH_ITEM_CODE", "dataType": "BOOLEAN", "collectionType": "SINGLE", "values": [ { "value": false } ] }, { "key": "TAX_CODE_MAP", "dataType": "SHORT_TEXT", "collectionType": "MAP", "values": [ { "key": "GOODS", "value": "PP198874" }, { "key": "DIGITAL", "value": "DC010500" }, { "key": "SERVICE", "value": "SS020000" } ] } ] }
Update the
TAX_CODE_MAP
andHASH_ITEM_CODE
values in theplugins.json
file. See Configuring for more details about these settings.Open
ep.properties
in each of the following folders and set theavalara.url
,avalara.account
,avalara.license
, andavalara.company.code
properties as appropriate for each environment:extensions/database/ext-data/src/main/resources/environments/local/files/conf
: The settings for local developers.extensions/database/ext-data/src/main/resources/environments/qa/files/conf
: The settings for your QA environment.extensions/database/ext-data/src/main/resources/environments/stage-author/files/conf
: The settings for your staging author environment.extensions/database/ext-data/src/main/resources/environments/stage-live/files/conf
: The settings for your staging live environment.extensions/database/ext-data/src/main/resources/environments/prod-author/files/conf
: The settings for your production author environment.extensions/database/ext-data/src/main/resources/environments/prod-live/files/conf
: The settings for your production live environment.
See configuring for more details about these settings.
Commit your changes and deploy Elastic Path Commerce as usual.