Skip to content

New vs recurring sale example - #373

Merged
steven-tey merged 1 commit into
mainfrom
reward-example
May 20, 2026
Merged

New vs recurring sale example#373
steven-tey merged 1 commit into
mainfrom
reward-example

Conversation

@marcusljf

@marcusljf marcusljf commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guide explaining how to configure partner reward conditions to differentiate between new and recurring sales. Documentation includes practical configuration examples with reward percentages, visual illustrations, and reference tables to help partners effectively structure their reward programs for different transaction types.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR adds documentation explaining how to configure reward conditions to distinguish first/new sales from recurring sales in the partner rewards system. The new section includes an example conditions table and visual guidance.

Changes

Partner Rewards Documentation Update

Layer / File(s) Summary
New vs. recurring sales documentation
help/article/partner-rewards.mdx
New subsection inserted under Reward examples describing how to configure Sale Type conditions for new (80%) versus recurring (30%) sales with explanatory text and example table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • steven-tey

Poem

🐰 A rabbit hops through docs so fine,
New sales shine bright, recurring align,
Eighty percent for first-time cheer,
Thirty for loyal friends so dear! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main change: adding a new subsection explaining the distinction between new vs. recurring sales with examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reward-example

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mintlify

mintlify Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Dub 🟢 Ready View Preview May 20, 2026, 9:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@help/article/partner-rewards.mdx`:
- Line 332: Rewrite the awkward sentence "This is especially useful for
subscription-based products, where you may want to offer a higher reward for the
first sale to incentivize partners to acquire new customers, while offering a
lower reward for recurring sales, while combining with other conditions." to
remove the repeated "while" and clarify the ending; for example, simplify to one
clear sentence that contrasts first-sale vs recurring rewards and notes that
these tiers can be combined with other conditions (e.g., "For subscription-based
products, offer a higher reward for the first sale to incentivize partner
acquisition and a lower reward for recurring sales; these tiers can be combined
with other conditions.").
- Line 323: The example description contains incorrect article usage ("a 80%
reward"); update the sentence in partner-rewards.mdx so it reads "an 80% reward"
instead of "a 80% reward" in the line that currently starts "In this example,
we're rewarding partners with a 80% reward for the first sale..."; ensure only
the article is changed and the rest of the sentence remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e648ada3-6487-43dc-838c-52cc9c0fd415

📥 Commits

Reviewing files that changed from the base of the PR and between e86517f and 56ab508.

⛔ Files ignored due to path filters (2)
  • images/dub-partners/reward-example-firstsale-selected.png is excluded by !**/*.png
  • images/dub-partners/reward-example-firstsale.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • help/article/partner-rewards.mdx

/>
</Frame>

In this example, we're rewarding partners with a 80% reward for the first sale while keeping the standard recurring commission for all other sales:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix article usage in the example description.

The phrase "a 80% reward" should use "an" instead of "a" since "80" starts with a vowel sound (eighty).

📝 Proposed fix
-In this example, we're rewarding partners with a 80% reward for the first sale while keeping the standard recurring commission for all other sales:
+In this example, we're rewarding partners with an 80% reward for the first sale while keeping the standard recurring commission for all other sales:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
In this example, we're rewarding partners with a 80% reward for the first sale while keeping the standard recurring commission for all other sales:
In this example, we're rewarding partners with an 80% reward for the first sale while keeping the standard recurring commission for all other sales:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@help/article/partner-rewards.mdx` at line 323, The example description
contains incorrect article usage ("a 80% reward"); update the sentence in
partner-rewards.mdx so it reads "an 80% reward" instead of "a 80% reward" in the
line that currently starts "In this example, we're rewarding partners with a 80%
reward for the first sale..."; ensure only the article is changed and the rest
of the sentence remains unchanged.

/>
</Frame>

This is especially useful for subscription-based products, where you may want to offer a higher reward for the first sale to incentivize partners to acquire new customers, while offering a lower reward for recurring sales, while combining with other conditions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Simplify the sentence structure.

The sentence contains awkward phrasing with "while...while" repetition and an unclear ending phrase. The meaning would be clearer with simplified structure.

✏️ Proposed fix
-This is especially useful for subscription-based products, where you may want to offer a higher reward for the first sale to incentivize partners to acquire new customers, while offering a lower reward for recurring sales, while combining with other conditions.
+This is especially useful for subscription-based products, where you may want to offer a higher reward for the first sale to incentivize partners to acquire new customers, while offering a lower reward for recurring sales. You can also combine this with other conditions to create more complex reward structures.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is especially useful for subscription-based products, where you may want to offer a higher reward for the first sale to incentivize partners to acquire new customers, while offering a lower reward for recurring sales, while combining with other conditions.
This is especially useful for subscription-based products, where you may want to offer a higher reward for the first sale to incentivize partners to acquire new customers, while offering a lower reward for recurring sales. You can also combine this with other conditions to create more complex reward structures.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@help/article/partner-rewards.mdx` at line 332, Rewrite the awkward sentence
"This is especially useful for subscription-based products, where you may want
to offer a higher reward for the first sale to incentivize partners to acquire
new customers, while offering a lower reward for recurring sales, while
combining with other conditions." to remove the repeated "while" and clarify the
ending; for example, simplify to one clear sentence that contrasts first-sale vs
recurring rewards and notes that these tiers can be combined with other
conditions (e.g., "For subscription-based products, offer a higher reward for
the first sale to incentivize partner acquisition and a lower reward for
recurring sales; these tiers can be combined with other conditions.").

@steven-tey
steven-tey merged commit b03b993 into main May 20, 2026
4 checks passed
@steven-tey
steven-tey deleted the reward-example branch May 20, 2026 22:49
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.

2 participants