Skip to content

Document product attributes and Apply to vs Apply when in discounts - #3893

Merged
profuel merged 3 commits into
masterfrom
docs/discount-attributes-apply-to-when
Sep 15, 2026
Merged

profuel merged 3 commits into
masterfrom
docs/discount-attributes-apply-to-when

Conversation

@feversocial

@feversocial feversocial commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Addresses user feedback that critical information was missing from the Promotions & Discounts documentation.

Product attributes in decision rules:

  • Explain that attribute fields are named attribute.<attribute_key> and are generated from the product attribute keys that exist in the project, so no attribute keys means no attribute fields.
  • Link to creating attributes in the Back Office and to the product-attribute-key data import.
  • Mark attribute.color and attribute.processor_cores in the examples as illustrative, since they are project-specific and not present by default.
  • Add the missing list value type to the attribute.* reference row and document which operators each field offers, so a shorter operator list is explainable rather than surprising.

Apply to compared to Apply when:

  • Document that these are two separate settings: Apply when gates whether the discount applies to the cart, Apply to selects which items receive it.
  • Note that Apply to offers only item-level fields while Apply when also offers cart-level and customer-level fields, and that fields present in both have a different meaning in each.
  • Add screenshots of both tabs showing the same rule.

Image fixes:

  • Replace query-builder.png, which showed sku equal * while the surrounding text described total-quantity = 3 AND day-of-week = 5, contradicting both the prose and the paired plain query screenshot.
  • Replace query-string.png, which showed the removed "Discount collection type" and "Discount promotion to product" labels instead of the current "Discount application type" and "PROMOTIONAL PRODUCT".
  • Give both images descriptive alt text.

Field lists, operator lists and UI labels were verified against a running B2B demo shop.

PR Description

Describe the context for your changes and the changes you've made.

Tickets

If changes are associated with a ticket, add a docs ticket here.

Checklist

  • I agree with the Code Contribution License Agreement in CONTRIBUTING.md
  • I validated and improved the content with Custom GPT
  • I checked my pages at the deployment preview website.
  • [] I invited a person to review and merge this PR.

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for spryker-docs ready!

Name Link
🔨 Latest commit 3752a4c
🔍 Latest deploy log https://app.netlify.com/projects/spryker-docs/deploys/6aa95b1f5e381f00082a1565
😎 Deploy Preview https://deploy-preview-3893--spryker-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

profuel
profuel previously approved these changes Sep 8, 2026
Addresses user feedback that critical information was missing from the
Promotions & Discounts documentation.

Product attributes in decision rules:
- Explain that attribute fields are named `attribute.<attribute_key>` and are
  generated from the product attribute keys that exist in your database, so no
  attribute keys means no attribute fields.
- Link to creating attributes in the Back Office and to the
  `product-attribute-key` data import.
- Point out that `attribute.color` and `attribute.processor_cores` are examples
  that may not exist in your database, depending on the demo shop you started
  with.
- Add the missing `list` value type to the `attribute.*` reference row, document
  which operators each field offers, and note that costly operators are left out
  for performance reasons.

Apply to compared to Apply when:
- Document that these are two separate settings: Apply when gates whether the
  discount applies to the cart, Apply to selects which items receive it.
- Note that Apply to offers only item-level fields while Apply when also offers
  cart-level and customer-level fields, and that fields present in both have a
  different meaning in each.
- Rewrite the "Decision rule" section to lead with the Back Office wording,
  since the Back Office only uses the Apply when and Apply to labels. The
  headings and anchors are unchanged so existing links keep working.
- Add screenshots of both tabs showing the same rule.

Image fixes:
- Replace query-builder.png, which showed `sku equal *` while the surrounding
  text described `total-quantity = 3 AND day-of-week = 5`, contradicting both
  the prose and the paired plain query screenshot.
- Replace query-string.png, which showed the removed "Discount collection type"
  and "Discount promotion to product" labels instead of the current
  "Discount application type" and "PROMOTIONAL PRODUCT".
- Give both images descriptive alt text.

Field lists, operator lists and UI labels were verified against a running
B2B demo shop.
@feversocial
feversocial force-pushed the docs/discount-attributes-apply-to-when branch from 517f79c to 5295466 Compare September 15, 2026 09:27
@profuel
profuel enabled auto-merge (squash) September 15, 2026 14:49
@profuel
profuel merged commit 222050e into master Sep 15, 2026
15 of 17 checks passed
@profuel
profuel deleted the docs/discount-attributes-apply-to-when branch September 15, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants