Skip to content

feat: Add comprehensive tax classes and tax configuration support #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mariobrgomes
Copy link
Contributor

@mariobrgomes mariobrgomes commented Aug 12, 2025

Summary

Adds tax management support to Saleor Configurator for defining tax classes with country-specific rates and channel tax configurations.

What's New

  • Tax Classes: Define reusable tax classes with country-specific rates (0-100%)
  • Tax Configuration: Channel-level tax settings (FLAT_RATES or TAX_APP strategies)
  • Full Operations: Support for introspect, deploy, and diff operations
  • Product Integration: Reference tax classes in products and shipping methods

Example Configuration

taxClasses:
  - name: Standard VAT
    countryRates:
      - countryCode: US
        rate: 8.5
      - countryCode: GB
        rate: 20

channels:
  - name: US Store
    slug: us-store
    taxConfiguration:
      chargeTaxes: true
      taxCalculationStrategy: FLAT_RATES

products:
  - name: Sample Product
    taxClass: Standard VAT

Technical

  • Full TypeScript type safety, no any types
  • Comprehensive test coverage (44 tests)
  • Idempotent operations
  • Deployed early in pipeline to satisfy dependencies

✅ All tests passing
✅ No linting errors
✅ Round-trip integrity verified

mariobrgomes and others added 3 commits August 8, 2025 17:01
- Update GraphQL queries to use parent/level fields instead of children
- Fix introspection to build proper tree structure from flat API data
- Enhance category service to handle unlimited nesting depth recursively
- Add comprehensive tests for multi-level category hierarchies
- Ensure round-trip integrity for nested category configurations
- Add tax class management with country-specific rates (0-100%)
- Add channel-level tax configuration settings
- Support both FLAT_RATES and TAX_APP calculation strategies
- Integrate tax classes with products and shipping methods
- Include full introspect, deploy, and diff operations
- Add comprehensive test coverage with edge cases

Tax classes are deployed early in the pipeline (before products/shipping) to ensure dependencies are satisfied. The implementation supports idempotent operations and maintains round-trip integrity between introspect and deploy cycles.

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

changeset-bot bot commented Aug 12, 2025

🦋 Changeset detected

Latest commit: 5d5c000

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@saleor/configurator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

- Fix async/await in tax-schema.test.ts for all test cases
- Add strict validation to channel and tax configuration schemas
- Update config-service test to expect taxClasses field
- Ensure tax class names are non-empty strings
- Fix import ordering in tax-service.ts
- Add missing newlines at end of files
- Apply consistent formatting across all tax module files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant