Files
loyalty-agent-service/docs/specs/customer_management/adjustment.md

2.1 KiB

title, type, status, domain
title type status domain
Adjustment OpenSpec Draft Customer Management

Adjustment

Requirement Definition

Allows manual posting of adjustment transactions to correct balance discrepancies.

Process Flow

Pre-Conditions

  • Users must have access rights in the "Adjustment Entry" module.
  • Records require Maker-Checker approval.

Business Rules

Data Schema

Field Name Description Logic Type Constraints / Rules
Posted Transaction By Card, Account, or CIF. Enum Required.
Card / Account / CIF Identifier based on above selection. String Required.
Adjustment Quantity Sign Positive or Negative adjustment. Enum Required.
Store Store of transaction. Enum (Lookup) Required.
Pool Id Pool to be adjusted. Enum (Lookup) Required. Must respect entity level logic.
Transaction Date Transaction date time. Date Required.
Expiry Date (Positive) Expiry date of the new bucket. Date Required if Positive Adjustment. Defaults to pool policy.
Bucket Expiry Date (Negative) Specific bucket to deduct from. Enum (Lookup) Optional. If empty, uses FIFO Redemption approach.
Adjustment Quantity Amount to adjust. Decimal Required. Must be > 0.
Reason Code Reason for adjustment. Enum (Lookup) Required.
Transaction Code OLS transaction code. Enum (Lookup) Required.
Remarks Additional notes. String (100) Optional.

Execution

  • Pending/Approve Flow: New adjustments go to a Pending state. Authorized user must approve.
  • Positive Adjustments:
    • Offsets any negative balance buckets first.
    • Remaining points added to a new bucket with specified Expiry Date.
  • Negative Adjustments:
    • If a specific Bucket Expiry Date is chosen, deduction happens there.
    • Otherwise, points are deducted based on FIFO.
  • OLS validates status, permissions, and block codes for the entity.

Post-Conditions

  • Pool balance buckets updated.
  • Transaction logged in history.

Exception Flow

  • Validation failures or insufficient permissions.