@spree/docs 0.1.73 → 0.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "3rd party integrations"
3
3
  sidebarTitle: "All Integrations"
4
- description: "Learn how to connect your Spree application to third-party services and platforms."
4
+ description: "Browse Spree's third-party integrations for payments, shipping, tax, search, analytics, marketing, and AI to extend your storefront."
5
5
  ---
6
6
 
7
7
  ## Payments
@@ -13,6 +13,12 @@ description: "Learn how to connect your Spree application to third-party service
13
13
  - [RazorPay](payments/razorpay.md) — Razorpay is a secure payment gateway that enables businesses to accept online payments via cards, UPI, net banking, and wallets. It also supports international transactions across multiple currencies.
14
14
 
15
15
 
16
+ ## Tax
17
+
18
+
19
+ - [Avalara](marketing/klaviyo.md) — Automated real-time tax calculation for sales tax, VAT, and indirect taxes — with exemption management, transaction reporting, and US/Canada address validation.
20
+
21
+
16
22
  ## Search
17
23
 
18
24
 
@@ -0,0 +1,111 @@
1
+ ---
2
+ title: "Connect Avalara AvaTax to Spree Commerce"
3
+ sidebarTitle: Avalara AvaTax
4
+ description: "Set up Spree's native Avalara AvaTax integration to automate sales tax, VAT, exemptions, and address validation on every checkout."
5
+ ---
6
+
7
+ Avalara AvaTax is an automated tax compliance platform that calculates accurate sales tax, VAT, and other indirect taxes in real time. Spree's native integration connects your store to AvaTax for transaction-level tax calculation on both products and shipping, handles tax exemptions for eligible customers, commits transactions to Avalara after order placement, and validates US and Canadian addresses at checkout.
8
+
9
+ > **INFO:** You must have an existing Avalara account to connect this integration. A sandbox account can be used for testing before going live.
10
+
11
+ ## Installation
12
+
13
+ Before you can enable Avalara AvaTax, it must be installed. To do so, run the following command:
14
+
15
+ ```bash
16
+ bundle add spree_avatax_official && bundle exec rails g spree_avatax_official:install
17
+ ```
18
+
19
+ After that, make sure to restart the server.
20
+
21
+ ## Connect Avalara
22
+
23
+ Sign in to your Spree admin dashboard and navigate to the **Integrations** tab.
24
+
25
+ ![The Integrations tab in the Spree admin showing the Avalara tile](/docs/images/integrations/avalara/1-integrations-tab.png)
26
+
27
+ Locate the Avalara tile and click **Connect Avalara** to open the setup form.
28
+
29
+ ![The Avalara connection form in Spree](/docs/images/integrations/avalara/2-connection-form.png)
30
+
31
+ You'll need to enter the following credentials, which can be found in your Avalara account (or sandbox account for testing):
32
+
33
+ - **Account Number** — Your unique Avalara account identifier.
34
+ - **License Key** — The private key used to authenticate API requests.
35
+ - **Company Code** — The code identifying the specific company in your Avalara account that transactions will be committed under.
36
+ - **Environment** — Select **Sandbox** for testing or **Production** for your live store. Make sure this matches the account credentials you're using.
37
+
38
+ Click **Create** to connect the integration.
39
+
40
+ ### Additional Settings
41
+
42
+ The following optional settings can be enabled on the Avalara integration page in the **Integrations** tab.
43
+
44
+ ![Additional settings on the Avalara integration page](/docs/images/integrations/avalara/7-additional-settings.png)
45
+
46
+ - **Enable Address Validation** — When enabled, US and Canadian addresses entered at checkout are verified against Avalara's address database before an order is placed. This reduces failed deliveries and improves the accuracy of origin-based tax calculation.
47
+ - **Show Rate in Adjustment Label** — When enabled, the calculated tax rate is displayed in the tax adjustment label on the order, giving customers and admins visibility into the rate being applied.
48
+ - **Commit Transactions to Avalara** — Controls whether completed orders are committed as transactions in Avalara. This is enabled by default and should remain on in production so that transactions appear in your Avalara reports and are available for returns and voids.
49
+
50
+ ## How Tax Calculation Works
51
+
52
+ Once connected, AvaTax calculates tax on both **line items** and **shipping charges** for each order. For US transactions in particular, the tax rate depends on both the origin and destination of the shipment.
53
+
54
+ The origin address for each shipment is automatically set to the address of the **stock location** it ships from. Orders that ship from multiple stock locations will generate multiple origin addresses — one per shipment — ensuring accurate origin-based tax calculation across your entire fulfillment network.
55
+
56
+ > **NOTE:** Stock location addresses can be configured at **Settings → Locations**.
57
+
58
+ ### Tax Codes
59
+
60
+ To ensure products and shipping charges are taxed correctly, Spree sends an Avalara tax code with each line item. Tax codes tell Avalara what type of product or service is being sold, which affects the applicable rate.
61
+
62
+ Tax codes can be assigned in the admin at **Settings → Tax → Tax Categories**. Set the appropriate Avalara tax code on each tax category for your products.
63
+
64
+ ![Setting an Avalara tax code on a tax category in Spree](/docs/images/integrations/avalara/3-tax-code.png)
65
+
66
+ For shipping charges, use tax codes listed under the **Freight** label in the Avalara tax code directory.
67
+
68
+ > **NOTE:** You can browse all available Avalara tax codes at [taxcode.avatax.avalara.com](https://taxcode.avatax.avalara.com/).
69
+
70
+ ## Tax Exemptions
71
+
72
+ Spree's Avalara integration supports several exemption methods for customers who qualify for full or partial tax exemption.
73
+
74
+ ### Entity Use Codes
75
+
76
+ Entity use codes identify the reason a customer is exempt from tax — for example, a reseller, a government entity, or a non-profit organisation. Avalara uses these codes to apply the correct exemption treatment per jurisdiction automatically.
77
+
78
+ To view the available codes, navigate to **Settings → Avalara Entity Use Codes** in the admin dashboard.
79
+
80
+ ![The Avalara Entity Use Codes list in Spree admin settings](/docs/images/integrations/avalara/4-entity-use-codes.png)
81
+
82
+ To assign a code to a customer, open the customer's profile, click the dropdown, and select **Avalara Tax Settings**.
83
+
84
+ ![The Avalara Tax Settings dropdown on a customer profile in Spree](/docs/images/integrations/avalara/5-customer-tax-settings.png)
85
+
86
+ From here you can assign:
87
+
88
+ - **Entity Use Code** — Applies a standard Avalara exemption reason to all transactions for this customer.
89
+ - **VAT (Business) Identification Number** — Used for B2B transactions in VAT-registered regions. Supplying a valid VAT number allows Avalara to apply the correct zero-rated or reverse-charge treatment.
90
+ - **Exemption Number** — A customer-specific exemption certificate number for jurisdictions that require documented exemption credentials.
91
+
92
+ > **NOTE:** Learn more about each exemption method in the Avalara developer docs: [Entity Use Codes](https://developer.avalara.com/ecommerce-integration-guide/sales-tax-badge/transactions/exemptions/entity-use-codes/) · [Exemption Numbers](https://developer.avalara.com/avatax/handling-tax-exempt-customers/) · [VAT Business Identification](https://developer.avalara.com/vat-erp/transactions/certification-requirements/business-identification-number/)
93
+
94
+ ## Transactions
95
+
96
+ After an order is placed, Spree commits a **sales invoice** transaction to Avalara. These transactions can be viewed in your Avalara account under **Transactions** and will appear in your Avalara reports.
97
+
98
+ > **NOTE:** Transactions are only committed if **Commit Transactions to Avalara** is enabled on the integration settings page.
99
+
100
+ Subsequent order events are also committed automatically:
101
+
102
+ - **Refund (full or partial)** — commits a return invoice transaction to Avalara.
103
+ - **Order cancellation** — voids the original sales invoice transaction.
104
+
105
+ ![Transactions listed as sales invoices in the Avalara dashboard](/docs/images/integrations/avalara/6-transactions.png)
106
+
107
+ ## Managing Your Integration
108
+
109
+ You can revisit the Avalara integration settings at any time from the **Integrations** tab to update your credentials, adjust additional settings, or remove the integration entirely.
110
+
111
+ > **WARNING:** Removing the integration will stop tax calculation for new orders. Transactions already committed to Avalara will not be affected.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.73",
3
+ "version": "0.1.74",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",