Practitionist / Practitionist/elluminar_web

Gifting & small-team seat purchases

Open
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

commerce post-mvp v2
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
17h 2m
Merged PRs (30d)
18

Description

Why / Context

PRD §7.2E: corporate gifting / small-team seat purchase is a lightweight revenue lever distinct from the full enterprise motion — a manager buying 5 seats of a course for their team shouldn't need a sales call. Gift columns were built into OrderItem at MVP; this issue turns them on.

Schema already in place — NO migration required

  • OrderItem.giftRecipientEmail / giftClaimToken (unique) / giftClaimedById / giftClaimedAt
  • CartItem.giftRecipientEmail + metadata (gift message)
  • Enrollment(source: GIFT)
  • Quantity >1 on OrderItem supports seat-pack purchases; Waitlist not needed here

Implementation plan

  1. Gift purchase flow: "Buy as gift" on course/project pages → recipient email + message at cart line level → checkout normally; fulfillment mints giftClaimToken per unit instead of enrolling the buyer.
  2. Claim flow: recipient email w/ claim link → signup/login → claim page validates token (unclaimed, unexpired per policy) → creates Enrollment/ProjectInstance(source GIFT) → token consumed (giftClaimedById/At).
  3. Buyer management: /account/gifts — status per gift (sent/claimed), resend email, reassign recipient before claim, cancel-unclaimed within refund window (normal Refund path).
  4. Team seats (multi-quantity): quantity picker for eligible items → N claim tokens under one OrderItem → buyer's seat-management table (invite emails per seat, revoke unclaimed, claim links) — deliberately no org/license machinery (that's enterprise).
  5. Pricing: optional volume discount rule in pricing engine (PlatformConfig thresholds, e.g., 5+ seats −10%).
  6. Emails: gift-received (with message), reminder before expiry, claimed-notification to buyer (via notification facade).
  7. Edge cases: recipient already enrolled → credit-to-account choice (support flow documented); refunds void unclaimed tokens.
  8. GST note: B2B buyers can enter GSTIN in billTo (field exists) — invoice shows it (full B2B treatment in issue #24).

Acceptance criteria

  • Gifted course reaches recipient; claim creates their enrollment; buyer never gets access
  • 5-seat purchase yields 5 claim links; buyer can invite/revoke unclaimed seats
  • Refund of an unclaimed gift voids its token; claimed gifts follow normal consumption guards
  • Volume discount applies at configured thresholds
  • Duplicate-claim and expired-token paths handled gracefully

Dependencies / sequencing

  • MVP M7 fulfillment is the base; notification facade (issue #10) optional

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with MVP M7 fulfillment and the existing OrderItem gift fields, Enrollment(source: GIFT), and CartItem gift metadata. Trace checkout, claim, account gift management, refund, pricing, and notification-facade entry points, then verify the acceptance criteria for per-seat tokens, claiming, refunds, discounts, and duplicate or expired tokens.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, full-stack, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.