title: Dashboard Quantity Program Summary
type: object
x-tags:
  - Models
description: Merchant-wide quantity activity in the selected half-open recorded period, lifetime purchase earning and current pool states. Monetary savings describe direct discounts, grouped by receipt currency. An outlet selection does not filter these figures.
required:
  - loyalty_program_uuid
  - loyalty_program_name
  - loyalty_program_type
  - active_customers
  - redemption_summaries
  - quantity_summary
properties:
  loyalty_program_uuid:
    type: string
    format: uuid
  loyalty_program_name:
    type: string
    minLength: 1
    maxLength: 255
  loyalty_program_type:
    type: string
    enum:
      - stamp
      - point
  active_customers:
    type: integer
    minimum: 0
    description: Distinct customers with positive unexpired units on an unarchived program, even when insufficient for any reward.
  redemption_summaries:
    type: array
    items:
      $ref: ./DashboardLoyaltyRedemptionSummary.yaml
  quantity_summary:
    type: object
    description: Quantity units, except exchange_count which counts successful exchange actions. All fields are present, including zero quantities.
    required:
      - lifetime_earned_quantity
      - earned_quantity
      - earned_bonus_quantity
      - tier_gift_quantity
      - added_quantity
      - revoked_quantity
      - exchanged_quantity
      - exchange_count
      - redeemed_quantity
      - reversed_quantity
      - net_redeemed_quantity
      - voided_quantity
      - expiration_quantity
      - outstanding_quantity
      - available_quantity
      - archived_quantity
      - expired_quantity
    properties:
      lifetime_earned_quantity:
        type: integer
        minimum: 0
        description: All purchase base and bonus units ever awarded, regardless of period, voids or current balance. Excludes manual additions and tier gifts.
      earned_quantity:
        type: integer
        minimum: 0
        description: Purchase base and bonus units credited in the selected period.
      earned_bonus_quantity:
        type: integer
        minimum: 0
        description: The bonus component of earned_quantity; do not add it again.
      tier_gift_quantity:
        type: integer
        minimum: 0
        description: Membership-tier gift units credited in the selected period. Gifts remain retained after purchase voids.
      added_quantity:
        type: integer
        minimum: 0
        description: Manual additions recorded in the selected period.
      revoked_quantity:
        type: integer
        minimum: 0
        description: Manual removals recorded in the selected period, expressed as a positive quantity.
      exchanged_quantity:
        type: integer
        minimum: 0
        description: Units spent on voucher exchanges in the selected period. The destination voucher issuance is reported once under its own program.
      exchange_count:
        type: integer
        minimum: 0
        description: Successful exchange actions in the selected period, each issuing one voucher unit.
      redeemed_quantity:
        type: integer
        minimum: 0
        description: Units consumed by direct order discounts in the selected period.
      reversed_quantity:
        type: integer
        minimum: 0
        description: Units restored by explicit direct-redemption reversals in the selected period.
      net_redeemed_quantity:
        type: integer
        description: Direct-redemption units consumed minus restored. Can be negative when reversing an earlier period redemption. Excludes voucher exchanges.
      voided_quantity:
        type: integer
        minimum: 0
        description: Actual base and bonus quantity deductions on full purchase voids in the selected period. Undeducted invalidated entitlement is reported only on the source order.
      expiration_quantity:
        type: integer
        minimum: 0
        description: Units actually cleared by existing expiration processing in the selected period. Reaching expiry alone does not create a recorded movement.
      outstanding_quantity:
        type: integer
        minimum: 0
        description: Current positive unexpired units, including archived pools.
      available_quantity:
        type: integer
        minimum: 0
        description: Current positive unexpired units on unarchived programs. Does not promise affordability or reward eligibility.
      archived_quantity:
        type: integer
        minimum: 0
        description: Current positive unexpired units on archived programs.
      expired_quantity:
        type: integer
        minimum: 0
        description: Positive expired units still awaiting normal expiration processing, evaluated at report generation time.
