Skip to content

docs(discount): document usage-limit and stacking-conflict rejection codes#577

Open
prateek-ct wants to merge 2 commits into
Universal-Commerce-Protocol:mainfrom
commercetools:discount-rejection-codes
Open

docs(discount): document usage-limit and stacking-conflict rejection codes#577
prateek-ct wants to merge 2 commits into
Universal-Commerce-Protocol:mainfrom
commercetools:discount-rejection-codes

Conversation

@prateek-ct

Copy link
Copy Markdown

Description

The discount extension's rejection-code table doesn't have an entry for two common cases: a code whose overall usage allowance has been exhausted, and a code that matched and was valid but lost to stacking/best-deal resolution against an already-active discount. Both currently have to be forced into discount_code_already_applied or discount_code_combination_disallowed, which mean something narrower and would actively mislead a buyer — "already applied" implies the buyer duplicated their own action, not that a promotion's usage cap ran out elsewhere.

Adds discount_code_usage_limit_reached and discount_code_stacking_conflict to the documented error-code table, with a short note distinguishing each from its nearest existing neighbor. discount_code_* values are a documented convention rather than a schema enum (see error_code.json), so this is a documentation-only change — no schema files touched.

Category (Required)

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

None.

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

N/A — documentation change only.

…codes

The documented discount_code_* rejection codes have no entry for two
common real-world cases: a code whose overall usage allowance has been
exhausted, and a code that matched and was valid but lost to stacking
or best-deal resolution against an already-active discount. Both
currently have to be forced into discount_code_already_applied or
discount_code_combination_disallowed, which mean something narrower
and would mislead a buyer.

Adds discount_code_usage_limit_reached and discount_code_stacking_conflict
to the error-code table, with a short note distinguishing each from its
nearest existing neighbor.
@prateek-ct
prateek-ct requested review from a team as code owners July 10, 2026 12:58
@prateek-ct prateek-ct changed the title docs(discount): document usage-limit and stacking-conflict rejection … docs(discount): document usage-limit and stacking-conflict rejection codes Jul 10, 2026
@damaz91
damaz91 removed the request for review from a team July 14, 2026 07:52
@damaz91 damaz91 added the documentation Improvements or additions to documentation label Jul 14, 2026
@damaz91
damaz91 removed request for a team, knightlin-shopify and westeezy July 14, 2026 07:53
@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 14, 2026
@damaz91
damaz91 requested a review from jingyli July 14, 2026 07:53
markdownlint (MD060/table-column-style) flagged the two new rows added
in the previous commit for not aligning with the rest of the table.
Re-padded every row to a consistent column width. No content change.
@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants