Avalara Tax Plugin - Tax Exemption?

9 months ago
Hello,

I have customers that have "IsTaxExempt" set to true. But the Shopping Cart and OPC Checkout page all show tax for some of these customers.

In one of the situations, I noticed that the customer is in Wisconsin, which is a Streamlined Sales Tax (SST) State. But I'm not sure if that is significant.

What else does the NopCommerce Avalara plugin need in order to correctly calculate $0 tax for these Tax Exempt customers? I am currently using NopCommerce 4.40

Thank you.
9 months ago
I cannot reproduce this. If a customer is marked as "Is tax exempt", then his tax in the cart and during checkout is 0.
Try to clear cache after you enable this field for a customer.
9 months ago
RomanovM wrote:
I cannot reproduce this. If a customer is marked as "Is tax exempt", then his tax in the cart and during checkout is 0.
Try to clear cache after you enable this field for a customer.


Thank you for the quick reply!
Unfortunately, it does not seem to be a cache issue.

I am getting reports from customers, from other support personnel, and I can see it when I reproduce locally. This is not a field that I am enabling or disabling for a customer. These are customers that have "Is tax exempt" as true for many years now.

It happens also when I impersonate the customer and try to checkout products.

UPDATE:
Also, I inspected the request data that is being sent to /api/v2/transactions/create (via the AvaTax plugin) and I do see that it sends the "exemptionNo" property properly.
9 months ago
RomanovM wrote:
I cannot reproduce this. If a customer is marked as "Is tax exempt", then his tax in the cart and during checkout is 0.
Try to clear cache after you enable this field for a customer.


I also followed point number 1 here in the documentation and assigned the customer different Entity Codes that would be tax-exempt in their state, cleared cache, and was still receiving tax.
9 months ago
cleyva wrote:
... This is not a field that I am enabling or disabling for a customer. These are customers that have "Is tax exempt" as true for many years now...

Would you clarify:  Was this working before, and just recently started showing tax for exempt customers?

(FYI, this may interest you
https://www.nopcommerce.com/en/boards/topic/94157/plugin-avalara-tax-provider
9 months ago
New York wrote:
... This is not a field that I am enabling or disabling for a customer. These are customers that have "Is tax exempt" as true for many years now...
Would you clarify:  Was this working before, and just recently started showing tax for exempt customers?

(FYI, this may interest you
https://www.nopcommerce.com/en/boards/topic/94157/plugin-avalara-tax-provider


I can't be sure exactly when this started but some of these customers previously had 0 tax returned and now are being charged tax, even though the "Is tax exempt" property is set to true (and has been for a long time).

Also, thank you for the link. I did see that post but that doesn't seem to solve this issue as far as I understand.
9 months ago
RomanovM wrote:
I cannot reproduce this. If a customer is marked as "Is tax exempt", then his tax in the cart and during checkout is 0.
Try to clear cache after you enable this field for a customer.


I'm sorry, this is still an issue I'm dealing with.
I've tested several things:

I've edited the Customer so that "Is tax exempt?" is true.
I have also assigned "Entity Use Code" to several options that would be tax-exempt.
I have also assigned the Customer Role to include "Tax Exemption".
I followed point #1 in the documentation.

With all of these things, I still get back tax for this tax-exempt customer.

I am running version 4.40 and it's not possible for us to upgrade at the moment.
9 months ago
cleyva wrote:
I've edited the Customer so that "Is tax exempt?" is true.
I have also assigned "Entity Use Code" to several options that would be tax-exempt.
I have also assigned the Customer Role to include "Tax Exemption".

Any of these points should have resulted in tax exemption.

Could you enable logging in plugin settings, place a test order, and then post the request and response text from the logs (on the plugin configuration page)? Don't forget to remove sensitive data in messages.
9 months ago
RomanovM wrote:
I've edited the Customer so that "Is tax exempt?" is true.
I have also assigned "Entity Use Code" to several options that would be tax-exempt.
I have also assigned the Customer Role to include "Tax Exemption".

Any of these points should have resulted in tax exemption.

Could you enable logging in plugin settings, place a test order, and then post the request and response text from the logs (on the plugin configuration page)? Don't forget to remove sensitive data in messages.


Sure, here you go. Here's an example where the entity use code is type "A - Federal Government". But most of our customers do not have an entity use code set (it is usually null).

Request:

{
  "lines": [
    {
      "quantity": 2.0,
      "amount": 118.14,
      "itemCode": "11521",
      "exemptionCode": "",
      "discounted": false,
      "description": "Test T-Shirt"
    }
  ],
  "type": "SalesOrder",
  "companyCode": "GFC",
  "date": "2023-09-13T18:42:52.3590787Z",
  "customerCode": "10182079",
  "customerUsageType": "A",
  "discount": 0.0,
  "exemptionNo": "Exempt-customer-#10182079",
  "addresses": {
    "shipFrom": {
      "line1": "PO Box 123",
      "city": "Mequon",
      "region": "WI",
      "country": "US",
      "postalCode": "53097"
    },
    "shipTo": {
      "line1": "123 Main St",
      "city": "BUFFALO",
      "region": "WY",
      "country": "US",
      "postalCode": "82831-1234"
    }
  },
  "email": "<REDACTED>"
}


Response:

{
  "id": 0,
  "code": "2f2c9adb-b6fa-4328-b6ec-564ed8d2e01a",
  "companyId": 132398,
  "date": "2023-09-13",
  "paymentDate": "2023-09-13",
  "status": "Temporary",
  "type": "SalesOrder",
  "batchCode": "",
  "currencyCode": "USD",
  "exchangeRateCurrencyCode": "USD",
  "customerUsageType": "A",
  "entityUseCode": "A",
  "customerVendorCode": "10182079",
  "customerCode": "10182079",
  "exemptNo": "Exempt-customer-#10182079",
  "reconciled": false,
  "locationCode": "",
  "reportingLocationCode": "",
  "purchaseOrderNo": "",
  "referenceCode": "",
  "salespersonCode": "",
  "totalAmount": 118.14,
  "totalExempt": 0.0,
  "totalDiscount": 0.0,
  "totalTax": 5.91,
  "totalTaxable": 118.14,
  "totalTaxCalculated": 5.91,
  "adjustmentReason": "NotAdjusted",
  "locked": false,
  "version": 1,
  "exchangeRateEffectiveDate": "2023-09-13",
  "exchangeRate": 1.0,
  "email": "<REDACTED>",
  "modifiedDate": "2023-09-13T18:42:52.7851689Z",
  "modifiedUserId": 117753,
  "taxDate": "2023-09-13",
  "lines": [
    {
      "id": 0,
      "transactionId": 0,
      "lineNumber": "1",
      "customerUsageType": "",
      "entityUseCode": "",
      "description": "Test T-Shirt",
      "discountAmount": 0.0,
      "exemptAmount": 0.0,
      "exemptCertId": 0,
      "exemptNo": "",
      "isItemTaxable": true,
      "itemCode": "11521",
      "lineAmount": 118.14,
      "quantity": 2.0,
      "ref1": "",
      "ref2": "",
      "reportingDate": "2023-09-13",
      "tax": 5.91,
      "taxableAmount": 118.14,
      "taxCalculated": 5.91,
      "taxCode": "PP051161",
      "taxCodeId": 5654167,
      "taxDate": "2023-09-13",
      "taxIncluded": false,
      "details": [
        {
          "id": 0,
          "transactionLineId": 0,
          "transactionId": 0,
          "country": "US",
          "region": "WY",
          "exemptAmount": 0.0,
          "jurisCode": "56",
          "jurisName": "WYOMING",
          "stateAssignedNo": "",
          "jurisType": "STA",
          "jurisdictionType": "State",
          "nonTaxableAmount": 0.0,
          "rate": 0.04,
          "tax": 4.73,
          "taxableAmount": 118.14,
          "taxType": "Sales",
          "taxSubTypeId": "S",
          "taxName": "WY STATE TAX",
          "taxAuthorityTypeId": 45,
          "taxCalculated": 4.73,
          "rateType": "General",
          "rateTypeCode": "G",
          "unitOfBasis": "PerCurrencyUnit",
          "isNonPassThru": false,
          "isFee": false,
          "reportingTaxableUnits": 118.14,
          "reportingNonTaxableUnits": 0.0,
          "reportingExemptUnits": 0.0,
          "reportingTax": 4.73,
          "reportingTaxCalculated": 4.73,
          "liabilityType": "Seller",
          "chargedTo": "Buyer"
        },
        {
          "id": 0,
          "transactionLineId": 0,
          "transactionId": 0,
          "country": "US",
          "region": "WY",
          "exemptAmount": 0.0,
          "jurisCode": "019",
          "jurisName": "JOHNSON",
          "stateAssignedNo": "16",
          "jurisType": "CTY",
          "jurisdictionType": "County",
          "nonTaxableAmount": 0.0,
          "rate": 0.01,
          "tax": 1.18,
          "taxableAmount": 118.14,
          "taxType": "Sales",
          "taxSubTypeId": "S",
          "taxName": "WY COUNTY TAX",
          "taxAuthorityTypeId": 45,
          "taxCalculated": 1.18,
          "rateType": "General",
          "rateTypeCode": "G",
          "unitOfBasis": "PerCurrencyUnit",
          "isNonPassThru": false,
          "isFee": false,
          "reportingTaxableUnits": 118.14,
          "reportingNonTaxableUnits": 0.0,
          "reportingExemptUnits": 0.0,
          "reportingTax": 1.18,
          "reportingTaxCalculated": 1.18,
          "liabilityType": "Seller",
          "chargedTo": "Buyer"
        }
      ],
      "nonPassthroughDetails": [],
      "hsCode": "",
      "costInsuranceFreight": 0.0,
      "vatCode": "",
      "vatNumberTypeId": 0
    }
  ],
  "addresses": [
    {
      "id": 0,
      "transactionId": 0,
      "boundaryLevel": "Zip9",
      "line1": "123 Main St",
      "line2": "",
      "line3": "",
      "city": "BUFFALO",
      "region": "WY",
      "postalCode": "82831-1234",
      "country": "US",
      "taxRegionId": 31517,
      "latitude": "",
      "longitude": ""
    },
    {
      "id": 0,
      "transactionId": 0,
      "boundaryLevel": "Zip5",
      "line1": "PO Box 123",
      "line2": "",
      "line3": "",
      "city": "Mequon",
      "region": "WI",
      "postalCode": "53097",
      "country": "US",
      "taxRegionId": 4006722,
      "latitude": "43.221791",
      "longitude": "-87.951726"
    }
  ],
  "summary": [
    {
      "country": "US",
      "region": "WY",
      "jurisType": "State",
      "jurisCode": "56",
      "jurisName": "WYOMING",
      "taxAuthorityType": 45,
      "stateAssignedNo": "",
      "taxType": "Sales",
      "taxSubType": "S",
      "taxName": "WY STATE TAX",
      "rateType": "General",
      "taxable": 118.14,
      "rate": 0.04,
      "tax": 4.73,
      "taxCalculated": 4.73,
      "nonTaxable": 0.0,
      "exemption": 0.0
    },
    {
      "country": "US",
      "region": "WY",
      "jurisType": "County",
      "jurisCode": "019",
      "jurisName": "JOHNSON",
      "taxAuthorityType": 45,
      "stateAssignedNo": "16",
      "taxType": "Sales",
      "taxSubType": "S",
      "taxName": "WY COUNTY TAX",
      "rateType": "General",
      "taxable": 118.14,
      "rate": 0.01,
      "tax": 1.18,
      "taxCalculated": 1.18,
      "nonTaxable": 0.0,
      "exemption": 0.0
    }
  ]
}


I tried removing as much sensitive info as I could, including modifying slightly the addresses/zip-codes.
9 months ago
Thanks. And one more request-response with type SalesInvoice, not SalesOrder as in your previous post.