Import / Export Tax Rates
If you have nexuses in several states and ship a large volume of product, you might consider downloading a tax rate by ZIP code data set. The rates can then be imported into Magento. In the following example, we import a set of California tax rates that was downloaded from the Avalara website. Avalara provides tax rate tables that can be downloaded at no charge for every ZIP code in the United States. Avalara is a Magento Technology Partner.
1. | On the Admin menu, select Sales > Tax > Import / Export Tax Rates. |
2. | Click the Export Tax Rates button. When prompted, click Save. Then, open the exported file in OpenOffice Calc. |
3. | In a second instance of OpenOffice Calc, open the new tax rate data, so you can see both, side by side. The basic Magento tax rate data includes the following columns: |
- Code
- Country
- State
- Zip/Post Code
- Rate
4. | In the new tax rate data, take note of any additional tax rate data that you might need to set up in your store before the data is imported. For example, the tax rate data for California also includes: |
- TaxRegionName
- CombinedRate
- StateRate
- CountyRate
- CityRate
- SpecialRate
If you need to import additional tax zones and rates, you must first define them from the Admin of your store, and update the tax rules as needed. Then, export the data, and open the file in OpenOffice Calc, so it can be used for reference. However, to keep this example simple, we will import only the standard tax rate columns.
You now have two spreadsheets open, side by side. One with the Magento export file structure, and the other with the new tax rate data that you want to import.
1. | To create a place to work in the spreadsheet with the new data, insert as many blank columns at the far left as needed. Then, use cut and paste to rearrange the columns so they match the order of the Magento export data. |
2. | Rename the column headers to match the Magento export data. |
3. | Delete any columns that have no data. Otherwise, the structure of the import file should match the original Magento export data. |
4. | Before saving the file, scroll down and make sure that the tax rate columns contain only numeric data. Any text found in a tax rate column will prevent the data from being imported. |
5. | Save the prepared data as a .CSV file. When prompted, verify that a comma is used a Field delimiter, and double quotes as the Text delimiter. Then, click OK. |
Magento requires all text strings to be enclosed in double quotes. Because Microsoft Excel removes the double quotes, we recommend that you use OpenOffice Calc instead.
1. | On the Admin menu, select Sales > Tax > Import / Export Tax Rates. |
2. | Click the Browse button, and select the .CSV tax rate file that you prepared to import. Then, click the Import Tax Rates button. |
It might take several minutes to import the data. When the process is complete, the message, "The tax rate has been imported" appears. If you receive an error message, correct the problem in the data and try again.
3. | On the Admin menu, select Sales > Tax > Manage Tax Zones & Rates. The new data appears in the list. Use the page controls to view the new tax rates. |
4. | Run some text transactions in your store with customers from different ZIP codes to make sure that the new tax rates work correctly. |