Problem/Motivation

  • Allow tax exemptions on a per-organization level.
    • Allow exemption document upload
    • Require exemption type (diplomat, government, non-profit, re-sale, etc)
    • Exemptions based on locality (state, city, etc)
    • Exemptions should have an expiration date field
    • Ideally agnostic of jurisdiction (support more countries than USA)
    • Possibly use current available plugins (Avalara)
    • Exemptions should have approval capabilities
    • JSON:API Compatible

Proposed resolution

My initial thoughts are to use a custom group-enabled entity with the following fields:

  • Document (private storage, file upload)
  • Type of exemption (select list / radio)
  • Exemption locality (address field or locality checkboxes?)
  • CRUD Permissions within groups to manage these entities.

There would need to be a custom tax resolver for exemptions. This could technically be two separate modules really. One for the actual tax exemption entities, another for the group module integrations.

Remaining tasks

Decide if this module can be plugged into existing tax modules (Avalara)

User interface changes

A page to "manage my organization's tax exemptions"
A form to apply for exemptions. Administrators should be able to auto-approve exemptions, or require manual approval. This is similar to how accounts are created in Core. This could be a group content plugin configuration setting.

API changes

Data model changes

Comments

alexandersluiter created an issue. See original summary.

alexandersluiter’s picture

Issue summary: View changes
alexandersluiter’s picture

Issue summary: View changes
alexandersluiter’s picture

Issue summary: View changes
krystalcode’s picture

I think you're on the right track with the solution. We'd need a custom entity to hold tax exemptions, could have a state field for managing approval workflow, integrate them with tax resolvers and integrate with specific tax calculation providers such as Avalara and TaxJar.

This could technically be two separate modules really. One for the actual tax exemption entities, another for the group module integrations.

That should definitely be a separate module, and then, as you said, we can create a group content enabler plugin and anything else needed to integrate with Commerce Group. I've only seen a custom solution on tax exemptions so I'm not aware of something that has already been done in the Commerce ecosystem - it is possible that I miss something. I don't have clients that have such requirements so I don't see myself maintaining such a module. Once such a module exists I can help with integration here - it'd have to be a contrib module though, otherwise integration would be custom as well.

krystalcode’s picture

Status: Active » Postponed (maintainer needs more info)

Feel free to post more information here. I'm putting it on "Postponed" till there is a module to integrate with.

alexandersluiter’s picture

Status: Postponed (maintainer needs more info) » Active

I've started building out the initial structure of the module. It will be Commerce Tax Exemption (commerce_tax_exemption). From my notes and code: an entity (commerce_tax_exemption) is a tax exemption that a custom resolver will handle. Exemption types will require plugin(s) for certificate storage, calculation, approval, etc. I'm not sure if this is a single plugin type that handles all of these, or separate plugins for users to ad-hoc their own storage / approval. For example, we would like to use Avalara for calculation, but not certificate storage. We'd like to use a file field with a private storage schema. It's in the early stages of development yet.

Right now I'm holding off on the Group integration, as I need to build out the structure of the main module first. My thinking is that the Group integration would provide the entity enabler and then just decorate the commerce_tax_exemption tax resolver to use the Group enabled content.

Placeholder module page here, code to be pushed later today: Commerce Tax Exemption