feat: initialize project backend structure and document system specifications across all modules
This commit is contained in:
41
docs/specs/reward_campaign/cep_rule.md
Normal file
41
docs/specs/reward_campaign/cep_rule.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: "Counter Extract & Process (CEP) Rule"
|
||||
type: OpenSpec
|
||||
status: Draft
|
||||
domain: Reward Campaign Management
|
||||
---
|
||||
|
||||
# Counter Extract & Process (CEP) Rule
|
||||
|
||||
## Requirement Definition
|
||||
Extracts values accumulated in a Counter at the end of a defined period and generates a transaction to trigger an Award/Redeem rule based on that accumulated total.
|
||||
|
||||
## Process Flow
|
||||
|
||||
### Pre-Conditions
|
||||
- Users must have access rights.
|
||||
- A Counter tracking the required metric must exist.
|
||||
|
||||
## Business Rules
|
||||
|
||||
### Data Schema
|
||||
|
||||
#### General & Extraction Settings
|
||||
| Field Name | Description | Logic Type | Constraints / Rules |
|
||||
|---|---|---|---|
|
||||
| Rule Type | CEP. | Enum | Required. |
|
||||
| Counter to Extract | Counter containing the value. | Enum (Lookup) | Required. |
|
||||
| Bucket to Extract | Current, Previous, Period Before Last. | Enum | Required. |
|
||||
| Rule type to process | Rule type of the destination rule. | Enum (Lookup) | Required. |
|
||||
| Transaction Code | TC used to post the extracted transaction. | Enum (Lookup) | Required. |
|
||||
| -ve Bal. Adjust. TC | TC for negative extracted values. | Enum (Lookup) | Optional. |
|
||||
| Account with blocked Card | Include or Exclude blocked cards. | Boolean | Conditional (if Acct/Card entity). |
|
||||
| Run schedule | Day, Month, Annual, N days AOD, Stmt Cycle. | Enum (Lookup) | Required. Defines execution frequency. |
|
||||
|
||||
### Execution
|
||||
- Evaluated by the CEP Batch scheduled at end-of-day.
|
||||
- The extracted Counter Bucket value becomes the `Amount A` for the destination Rule.
|
||||
- State of Counter Buckets is updated based on Counter Definition (e.g., closed after extraction) to prevent double-processing.
|
||||
|
||||
## Exception Flow
|
||||
- N/A
|
||||
Reference in New Issue
Block a user