diff --git a/docs/FSD P1_Finnal Version.docx b/docs/FSD P1_Finnal Version.docx new file mode 100644 index 0000000..632c9bd Binary files /dev/null and b/docs/FSD P1_Finnal Version.docx differ diff --git a/docs/specs/00_MIGRATION_REPORT.md b/docs/specs/00_MIGRATION_REPORT.md new file mode 100644 index 0000000..d891428 --- /dev/null +++ b/docs/specs/00_MIGRATION_REPORT.md @@ -0,0 +1,27 @@ +# Migration Report + +## Summary +The migration of the monolithic FSD (Functional Specification Document) Markdown files to the OpenSpec standard is complete. The goal was to decompose massive, human-oriented Word-converted markdown files into Agent-Friendly, atomic, and structured OpenSpec documents. + +## Completed Tasks +1. **Decomposition:** All major monolithic files have been decomposed into domain-specific subdirectories. +2. **Archiving:** The original monolithic markdown files have been moved to `docs/specs/archive/`. +3. **Format Standardization:** The newly created documents follow the OpenSpec format, including proper YAML frontmatter (`title`, `type`, `status`, `domain`). +4. **Cleanup:** Unnecessary UI clutter, malformed artifacts (e.g. `[Image Removed]`), and verbose narrative instructions were removed or converted into structured business rules and data schemas. + +## Output Structure +The new documentation is organized into the following domains under `docs/specs/`: +* `customer_management/`: Profiles, Accounts, Cards, Pool Balances, Transactions, Adjustments, etc. +* `reward_campaign/`: Campaign Structures, Rules, Criteria, Formulas, Counter Definitions, Transaction Categories, etc. +* `onetargeting/`: Segmentation, Audiences. +* `onecatalogue/`: Catalogues, Categories, Master Items, Vouchers. +* `onemarketing/`: Messages, Campaigns, A/B Testing, Whitelists, Blacklists. +* `oneaccess/`: Users, Permissions, Profiles. +* `oneadmin/`: Framework behavior. +* `system_management/`: Application parameters. +* `introduction/`: Terminology. +* `reference/`: References, Change History. + +## Next Steps +- Implement Agent tooling capable of reading these OpenSpec files to generate test cases or boilerplate code. +- Ensure any future updates to the requirements are made directly to the atomic OpenSpec files, not the archived monolithic documents. diff --git a/docs/specs/00_MIGRATION_TRACKER.md b/docs/specs/00_MIGRATION_TRACKER.md new file mode 100644 index 0000000..2a277d1 --- /dev/null +++ b/docs/specs/00_MIGRATION_TRACKER.md @@ -0,0 +1,34 @@ +# Migration Tracker: FSD to OpenSpec + +## Objective +Convert `docs/FSD P1_Finnal Version.docx` to a structured, modular Knowledge Base based on the OpenSpec format. + +## Stages +- [x] **Step 1:** Convert `.docx` to HTML using Python (`mammoth`), then to Markdown (`markdownify`) to preserve tables and structure. (Script: `convert_fsd.py`) +- [x] **Step 2:** Generate the Master Markdown file (`docs/FSD_Master_Clean.md`). +- [x] **Step 3:** Analyze the Master Markdown file to extract domains (e.g., Campaign, Customer, OneAccess). +- [x] **Step 4:** Split the content into modular OpenSpec Markdown files under `docs/specs/`, clean up heavy image tags, and apply standard headings. +- [x] **Step 5:** Finalize migration and generate report (`docs/specs/00_MIGRATION_REPORT.md`), remove temporary files. + +## Extracted Domains +1. `overview.md` (Overview) +2. `scope_and_assumption.md` (Scope & Assumption) +3. `one_access.md` (OneAccess) +4. `one_loyalty.md` (OneLoyalty / Campaign) +5. `customer_management.md` (Customer Management) +6. `one_marketing.md` (OneMarketing) +7. `one_catalogue.md` (OneCatalogue) +8. `one_targeting.md` (OneTargeting) + +## Decomposed and Verified +- [x] `onetargeting.md` -> `onetargeting/segmentation.md`, `onetargeting/audience_upload.md`, `onetargeting/customer_audience.md` +- [x] `application_parameter.md` -> `system_management/application_parameter.md` +- [x] `introduction.md` -> `introduction/terminology.md` +- [x] `reference.md` -> `reference/change_history.md`, `reference/document_references.md` +- [x] `oneaccess.md` -> `oneaccess/user_group.md`, `oneaccess/permission_management.md`, `oneaccess/user_profile.md` +- [x] `oneadmin.md` -> `oneadmin/framework_behavior.md` +- [x] `onecatalogue.md` -> `onecatalogue/catalogue.md`, `onecatalogue/category.md`, `onecatalogue/item_master.md`, `onecatalogue/item_price.md`, `onecatalogue/voucher_code.md` +- [x] `onemarketing.md` -> `onemarketing/marketing_message.md`, `onemarketing/marketing_campaign.md`, `onemarketing/frequency_capping.md`, `onemarketing/ab_testing.md`, `onemarketing/blacklist.md`, `onemarketing/whitelist.md` +- [x] `customer_management.md` -> `customer_management/customer_profile.md`, `customer_management/customer_360.md`, `customer_management/account.md`, `customer_management/card.md`, `customer_management/pool_balance_detail.md`, `customer_management/transaction_history.md`, `customer_management/no_hit_cp_transaction.md`, `customer_management/statement.md`, `customer_management/attribute.md`, `customer_management/counter.md`, `customer_management/adjustment.md`, `customer_management/transfer_balance.md`, `customer_management/re_instatement.md`, `customer_management/item_redemption.md`, `customer_management/award_transaction.md` +- [x] `reward_campaign_management.md` -> `reward_campaign/campaign_structure.md`, `reward_campaign/external_transaction_code.md`, `reward_campaign/ols_transaction_code.md`, `reward_campaign/pool_definition.md`, `reward_campaign/counter_definition.md`, `reward_campaign/transaction_category.md`, `reward_campaign/account_type_group.md`, `reward_campaign/reward_campaign.md`, `reward_campaign/reward_campaign_rule.md`, `reward_campaign/campaign_rule_criteria.md`, `reward_campaign/campaign_rule_formula.md`, `reward_campaign/campaign_rule_contributor.md`, `reward_campaign/cep_rule.md`, `reward_campaign/rep_rule.md`, `reward_campaign/item_redemption_rule.md`, `reward_campaign/campaign_insight.md` +1 \ No newline at end of file diff --git a/docs/specs/archive/application_parameter.md b/docs/specs/archive/application_parameter.md new file mode 100644 index 0000000..7c618ed --- /dev/null +++ b/docs/specs/archive/application_parameter.md @@ -0,0 +1,78 @@ +--- +title: "Application Parameter" +type: OpenSpec +status: Draft +--- +# Application Parameter + +## Requirement Definition + +* The “**Application Parameters**” module provides a means to maintain a set of application control parameters that define the system behavior in relation to user authentication, and user interface. These include password policy parameters session time-outs and system display format. + +## Process Flow + +## Wireframe + +* + 1. Access control + +[Image Removed] + +* + 1. Display setting + +[Image Removed] + +* + 1. Functionality + +[Image Removed] + +## Trigger + +## Pre-condition + +* Users have to have access right on this screen in order to access this screen. +* Depending on the user’s access rights, they can view/add/edit/ + +## Business Rule + +* + 1. When the Application Parameters option is selected (under the System Management module in the navigation panel), the screen is displayed with the "Access Control" tabs as the default, as illustrated in the following: + +[Image Removed] + +1. There are 3 tabs under the **Application Parameters** modules: **Access Control, System Display, and Functionality**. +2. All parameters under each tab will be pre-defined by the system as default. When any tabs is selected then the parameters are displayed according and allow the user to modify them. +3. Application parameters list detail: + +| Label (EN/VN) | Parameter | Data Type | +| --- | --- | --- | +| **Access *Control*** | | | +| Same User Cannot Approve \*/ Người dùng không thể phê duyệt cùng bản ghi | Allow/Disallow the user to approve/reject the record that they themselves created. | Switch button Default OFF | +| Same User Cannot Modify Own Profile \*/ Người dung không thể thay đổi thông tin cá nhân | Allow/Disallow the user to change their profile in the system. | Switch Button Default OFF | +| User Session Inactivity Time-out (minutes)\* / Hết hạn phiên đăng nhập | The user session will be ended if there are no user actions for N minutes. The system will throw an alert message and require the user login again. | 9(2) Default N as 30 minutes | +| Maximum Failed Forgotten Password Attempts \*/ | User id is blocked from further log-ins and the user profile record is suspended (blocked) until it is reset if customer enters more than N invalid passwords consecutively. | 9(2) Default N as 5 tiems | +| Inactivate User Id after N days of no log-ins\*/Tài khoản bị dừng hoạt động sau N ngày không đăng nhập. | User status is automatically inactive until reset if the user has not logged in for more than the number of days specified. | 9(3) Default as 30 days | +| Remind User to Change password N Days Before password expires\*/ Nhắc người dùng đổi mật khẩu trước N ngày trước khi hết hạn. | When the user logs into the system, the system will show an alert message to notify the user has to change the password from N day away before the password expires. | 9(3) Defaut as 5 days | +| Password expiration [days] \*/ Số ngày hiệu lực của mật khẩu | The number of days after which a new password will be expired. This determines how long a password remains valid before the user must change it. After this period, the account is locked and the user is unable to log in until the administrator unlocks the account. | 9(3) Default as 180 days | +| Disallow re-use of the last N passwords \*/ Cho phép dùng lại mật khẩu trong N lần gần nhất | The system just allows the user to re-use the last N password only. These options help to ensure passwords are regularly updated and not recycled. User can not re-use any of their last 2 passwords. | 9(1) Default as 2 times | +| Maximum password length \*/ Độ tài tối đa của mật khẩu | When the user is setting a new password or when changing an existing password, the new password must be not greater than this length | 9(2) Default as 50 | +| Minimum password length\* /Độ dài tối thiểu của mật khẩu | When the user is setting a new password or when changing an existing password, the new password must be at least this length | 9(2) Default as 8 | +| Password must at least N numeric digit \*/ Mật khẩu phải có ít nhất N số | When the user sets a new password or when changing an existing password, the new password must be at least N numeric digits. | 9(2) Default as 1 digit | +| Password must have at least [N] upper case alphabet\*/ Mật khẩu có ít nhất N kí tự in hoa | When the user sets a new password or when changing an existing password, the new password must be at least N upper case alphabet. | 9(2) Default as 1 | +| Password must have at least [N] lower case alphabet \*/ Mật khẩu có ít nhất N chữ cái thường | When the user sets a new password or when changing an existing password, the new password must be at least N lowercase alphabet. | 9(2) Default as 1 | +| Password must have at least [N] special character\*/ Mật khẩu có ít nhất N kí tự đặc biệt | When the user sets a new password or when changing an existing password, the new password must be at least N special character. | 9(2) Default as 1 | +| **Display Setting** | | | +| Date format \* / Định dạng ngày | A drop-down to select the following date display format: * DD/MM/YYYY * DD-MM-YYYY * DDMMYYYY * MM/DD/YYYY * MM-DD-YYYY * YYYY/MM/DD * YYYY-MM-DD * DD,MM,YYYY This determines how dates are displayed throughout the system. This is the default display. | Dropdown Select one Default as DD/MM/YYYY | +| Time format\* /Định dạng giờ | A drop-down to select the following time display format: * HH:mm: ss * HHmmss * HH, mm, ss * HH;mm;ss * HH/mm/ss This determines how times are displayed throughout the system. This is the default display. | Drop-down Select one Default as HH:mm: ss | +| Amount display format \*/ Định dạng số | This parameter determines how amounts are displayed throughout the system: * American [999,999,99] * European [999.999,99] | X(20) | +| **Functionality** | | | +| Processing Date / Ngày xử lí | The date on which a particular transaction or event is processed or recorded in the OLS system for the online transaction instead of the system. This parameter must be used for testing only. In production the processing date should be empty then the system always uses the system to process or record the online transaction. | Date Default is empty | +| Allow Cross Function Update\* / Cho phép cập nhật chéo | This allows or disallows cross-updates between data created by users and data created. The following functions apply to this parameter: * Customer data * Account data * Card data | Switch button Default ON | + +## Post-Condition + +* The application now uses the new, standardized parameter format. +* All existing parameter settings have been successfully migrated to the new format. +* The application's functionality remains uninterrupted, and end-users can continue using the application without any noticeable changes. +* The application's parameter management is more maintainable, scalable with other systems. + +## Exception flow + diff --git a/docs/specs/archive/customer_management.md b/docs/specs/archive/customer_management.md new file mode 100644 index 0000000..3a0b1eb --- /dev/null +++ b/docs/specs/archive/customer_management.md @@ -0,0 +1,1687 @@ +--- +title: "Customer management" +type: OpenSpec +status: Draft +--- +# Customer management + +## Customer profile + +### Requirement Definition + +1. OLS administration screens include a “Customer Profile” function to view Customer details. +2. Customer records are view-only, and can only be updated from source systems by batch ==TBD=== + +### Process Flow + +[Image Removed] + +### Trigger + +* + - 1. User want to verify/ get customer’s information. + +### Pre-Conditions + +1. User have to have the access right on both “Customer Profile module under “Customer Mangement” Group. + +### Wireframe + +* + - * 1. Summary listing page + +[Image Removed] + +* + - * 1. Filter + +[Image Removed] + +* + - * 1. Create/Edit mode + +1. [Image Removed] + * + - 1. Detail view + +[Image Removed] + +### Business Rules + +1. Click on Customer Profile icon in Main Menu to list customer records, as illustrated in the [wrireframe](#_Wireframe_13). +2. Use the filter to locate particular customer, which will be listed in the display. +3. Click on a row to view details of the customer record, as illustrated in the [wireframe](#_Wireframe_13). +4. Filter description: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Filter** | | | | +| | Quick search | As common function, OLS allows find customer record by quick search function. Put and press enter any key related to these field to find data. | | +| | Gender / Giới tính | If Gender are provide then just get customer who have selected gender If gender are not provided then get all customer | Drop -down Allow multiple select | +| | Country Origin /Quốc gia | If Country are provide then just get customer who have selected Country Issused If Country are not provided then get all customer | Drop -down Allow multiple select | +| | Date of Birth/Ngày sinh | Find customer who have day of birth matched with selected date | Date Time picker | +| | Card number/ Số thẻ | Find customer who have the account of inputed Card number | Text box | +| | Account number/Số tài khoản | Find customer who have the inputed Account | Text box | + +1. **Screen description** + +Screen description at create/edit mode + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Step 1: Customer Profile / Hồ sơ khách hàng** | | | | +| | CIF number \* / Số CIF | Unique CIF Number assingn to each customer. | X(30) | +| | Frist Name \*/ Tên | Customer First Name | X(50) | +| | Last Name \* / Họ | Customer last name Frist Name + Last Name will be customer Name which will be stored in database for refering | X(50) | +| | Date of Birth\*/ Ngày sinh | Customer birth date | Date | +| | Registration Date/ Ngày đăng kí | The date customer open an account | Date | +| | Gender / Giới tính | Customer Gender | Drop-down Select one Lookup value from Code\_Management table where code type is “gender”. Refer to “get-type-by-code”API under Master data | +| | Customer Status \*/Trạng thái khách hàng | Customer status | Drop-down Select one Lookup value from Code\_Management table where code type is “customer-status”. Refer to “get-type-by-code”API under Master data | +| | Customer Block Code | Customer block code | X(10) | +| | Marital Status/ Tình trạng hôn nhân | Customer marital ima status | Drop-down Select one Lookup value from Code\_Management table where code type is “marital-status”. Refer to “get-type-by-code”API under Master data | +| | ID Type/ Loại ID | ID Type of cardholder ID | Drop-down Select one Lookup value from Code\_Management table where code type is “cardholder-idtype”. Refer to “get-type-by-code”API under Master data | +| | Cardholder ID/ Số ID | Cardholder ID Condition field. This field is required when Cardholder type is selected otherwise this will be optional field. | X(30) | +| | Country Origin/ Quốc gia | Customer country orgin | Drop-down Select one Lookup value from “Country” table. Refer “Country Code” API under Code Maintenance | +| | Customer Income/Thu nhập | Customer income | 9(14,2) Should be greater than or equal to 0 if provided | +| | Datetime of maitenance date/ Ngày cập nhật thông tin | The sysdate to create/update record via OA screen. The maintenance date from request if input via batch job | Datetime The date format must adhere to the configured format Display for view mode only | +| | Profile Picture /Ảnh hồ sơ | Drag or drop photo Or Browse file to upload image file | | +| **Step 2: Contact Detail/ Thông tin liên hệ** At least one contact detail record should be provided Each customer can have more than one contact detail information such as customer contact and guardian contact…. | | | | +| | Addess Type\*/ Loại địa chỉ | Adress type A drop-down list to select one of following address: Home Address Business Address Shipping Address Billing Address | Drop-down Select one Address type should be unique on each customer | +| | Phone number\*/ Số điện thoại | Phone number | X(30) | +| | Email Address\*/ Địa chỉ Email | Email Adress This field must be under email format | X(50) | +| | Address 1/ Địa chỉ 1 | The main address | X(100) | +| | Address 2/ Địa chỉ 2 | Other address | X(100) | +| | State/Tỉnh-Khu vực | State | Drop-down Select one Lookup value from “State\_Code” table Refer to “State code” API under Code maintenance | +| | City/ Thành phố | City | Drop-down Select one Lookup value from “City\_Code” table Refer to “City code” API under Code maintenance | +| | Zip Code/ Mã bưu điện | Zip code/postal code | Drop-down Select one Lookup value from “ZIP\_CODE” table Refer to “Zip Code” API under Code Maintenance | + +* 1. **Processing** + + If a request is adding a record which whose CIF # locates an existing Client record in OLS with record Status = “A”, the incoming record will be rejected. + + If a request is updating or deleting a CIF # that does not locate an existing Client record with record Status = “A” in OLS, the request will be rejected. + + If a request is deleting a CIF# that locates a Client record that is linked to one or more Account that is still active in OLS, the request will be rejected. + + When new customer is added in OLS then: + ++ Customer record is added in both Client and Client\_corr table. + ++ The corresponding LOYALTY\_ACCOUNT is created. + +* + - When customer is deleted then: + ++ Logically delete the record by moving it to History table. + ++ Locate record in LOYALTY\_ACCOUNT and move that to History table. + +* + - Records added thru this screen cannot be updated by records from the OLS batch. Record created/updated by OLSCUST batch cannot be CHANGED from the admin screen. This implicit check can be disabled through a parameter in App Param. + 1. **View mode of active record is display as customer 360 which is described** **in section 5.2.** + +### Post-Conditions + +* + - * 1. Able to access submodule in customer management module which will be described more detail as following section. + +### Exception Flow + +N/A + +## Customer 360 + +### Requirement Definition + +1. OLS administration screens include a “Customer 360” function to view Customer details. +2. Customer 360 contains key information about customer. User can use it as a strategy guide to creating personalized experiences. + +### Process Flow + +N/A + +### Trigger + +N/A + +### Pre-Conditions + +1. User need to have the access right in Customer Profile module in order to able to view this dashboard. +2. User must select a customer in customer profile listing page to bring up the customer dasboard. + +### Wireframe + +[Image Removed] + +[Image Removed] + +### Business Rules + +1. Clicking on the chart icon at the top of the main Customer list page will toggle between the Customer list view and the Customer dashboard view. +2. Customer dashboard update constantly, giving user a real-time view of customer behavior and information. +3. Click any customer record in listing page to see the customer profile of each customer. +4. **OLS support following information:** + +#### Customer information + +[Image Removed] + +* + 1. Click “See profile details” to see customer profile detail. The system bring up the screen as pop-up screen for customer profile as illustrated as following: + +[Image Removed] + +1. User can edit/delete customer from this screen. + +#### Customer’s rewards statistic + +[Image Removed] + +* + 1. This part displays statistical indicators related to the customer's rewards. OLS introduces 2 indicators: + ++ Points: The customer’s total available points. Use sysdate to determine the balance bucket periods. + ++ Cash back: The customer’s total available cash back. Use sysdate to determine the balance bucket periods. + +#### Account / Card information + +* + 1. The Customer’s account holdings and all of the customer’s card are displayed, regardless of whether account or card number is used. + 2. **The Account/ Card information listing give user have a general overview of customer’s cards:** + +**+ A = Set of card list of all account in the selected customer** + +**+ B= Set of card lists for the specifically selected customer.** + +**Therefore C= Card in listing page = Distinct cards from the union of A and B** + +* + 1. **In case account there is no card is added then just show the account list of selected customer.** + 2. Quick shortcut to support adding new Card or new Account from this screen. + 3. Detail listing description: + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Filed** | **Description** | **Data type** | +| **Layout** [Image Removed] | | | | +| | Account type\*/Loại tài khoản | The combination of Product Account Level and Prodcut Account Type of customer. All Customer’s account holding are displayed here. | Display | +| | Account Number\* /Số tài khoản | Product Account No. | Link Click on each Account number to bring up the Account Detail screen to see more about this account. See more on [Account](#_Account) section | +| | Card Number/Số thẻ | Card number | Link Click on each Card number to bring up the Card Detail screen to see more about this card. See more on [Card](#_Card) section. | +| | CIF Number\*/Số CIF | CIF number of card will be the same as selected CIF number for Principal card For supplement card then this is CIF number of Card instead CIF Number of Account. | Display | +| | Card Status/Trạng thái thẻ | Card status | Display Lookup value from Card table | +| | Card indicator/Chỉ thị thẻ | Card indicator | Display Lookup value from Card table | +| | Card block code/Mã chặn tài khoản | Card block code | Display Lookup value from Card table | +| | Card expiry date/Ngày hết hạn thẻ | Card expiry date | Display Lookup value from Card table | +| | Account block code/Mã chặn tài khoản | Account block code | Display Lookup value from Product\_Account table | +| | Account status\*/Trạng thái tài khoản | Account status | Display Lookup value from Product\_Account table | +| | Account Open Date\*/Ngày mở tài khoản | Account Open Date | Display Lookup value from Product\_Account table | + +#### Transaciton statistic + +A combination of two charts is used to describe the transaction statistic for selected period of a customer. + +The line chart describes the fluctuations in a customer's balance for the selected pool over a specified period. + +The combo chart illustrates the relationship between the total number of transactions and the total number of transacted merchants for the selected pool over a specified period. + +Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | | +| **Filter** [Image Removed] | | | | +| | Period | This is drop-down filter key Madatory and select one only OLS support following periods: * + 1. This month 2. Last month 3. Last 3 months 4. Last 6 months Default as “This month” This filter is apply for both graph | | +| | Pool | Mandatory field Allow multiple select Lookup value from Pool Defintion Display Pool ID and Pool Name per each pool. This filter is applied for left graph only | | +| | Account type | Drop-down list to select combination of PAT and PAL. Allow multiple select. This filter is applied for right graph only | | +| | MCC | Drop-down list to select MCC of the transaction. Allow multiple select Display code and description per each MCC This filter is applied for right graph only | | +| **Line chart** **Layout** [Image Removed] [Image Removed] | | | | +| | Vertical axis | Total point each selected period/ selected pool Each line is assinged for one transaction type. | | +| | Horizontal axis | Condition data. If Period “This month” or “Last Month” is selected then horizontal axis is including all day of the month. Total point will be daily total point. If Period “Last 3 months” is selected then horizontal axis is including last 3 month from currenlty month. Total points will be monthly total points. If Period “Last 6 months” is selected then horizontal axis is including last 6 months from currenlty month. Total points will be monthly total points. Hover over the line graph to view a count of redemmed points/earned points/ adjusted points for the date range/time frame defined. | | +| **Data source** | | | | +| Get data from the TRANSACTION table with transaction type = “Award” for earned points/Transaction type = “Redeem” for redeemed points / Transaction type =’ Adjust” for Adjusted points during each selected month on the selected pool. The transaction should not be a cancellation transaction. Use the transaction date to determine the period. | | | | +| **Combo chart** Layout [Image Removed] [Image Removed] | | | | +| | Left vertical axis | | Total number of transacted merchants during selected period of selected pool Use Bar chart to describe total number per each period | +| | Right vertical axis | | Total number of transaction during selected period of selected pool Use line chart to describe total number per each period | +| | Horizontal axis | | Condition data. If Period “This month” or “Last Month” is selected then horizontal axis is including all day of the month. If Period “Last 3 months” is selected then horizontal axis is including last 3 month from currenlty month. Total points will be monthly total points. Hover over the line graph to view a count of transaction for the each day/month Hover over the bar graph to view a count of transacted merchant for the each day/month | +| **Data source** | | | | +| | Lookup value from TRANSACTIONS table Use transaction date to determine period Use Store data as merchant to determine transacted merchant Each OLS Reference No should be one and only transaction. | | | + +#### Customer Activities + +* + - * 1. The all customer activites will be triggerd and displayed here. + 2. Some types of customer activities as following: + 1. Loyalty program + +All OLS transaction of customer such as: + +* + - Enrolling in and participating in OLS loyalty programs. + - Redeeming points + - Transfer points + - Earn points + 1. Feedback and Review + + Leaving customer’s feedback on the portal app. + 2. Email engagement + + Receive email from OMR + 3. Account management + +Refering to all bellow action in portal app such as: + +* + - Updating customer information, such as contact details, payment methods, and preferences. + - Password resets and login activity. + +1. Allow user filter data by time frame (Start date and End date). +2. Layout + +[Image Removed] + +#### Customer Segmentation + +* + - 1. Deviding the customer base into segmentation groups based on specific characteristics, behaviors and demographics. + 2. Introduce the criteritions on each segmentation group and the conditons to meet each criterion. Based on this, OLS introduce a program to collect data and devide customers into each segment. + 3. Demographic segmentation includes following segment: + 1. Gender: Famale or Male + 2. Age: Teenager / Adult/ Middle- Aged person/ Senior Citizens: Based on criteria (Age’s range) to devide customer’s age. + 3. Matirial Status: Single or Married + 4. Income: Low / Medium / High: Based on criteria (customer’s income range) to devide icom segment. + 5. Layout + +[Image Removed] + +1. Behaviors segmentation includes following segment: + 1. Frequency of purchase: Daily / Weekly/Montly..: Based on the frequency of the transaction to devide this segment. + 2. Membership class: Depending on the organization, business. Some common types of membership class: + * Basic membership + * Premium membership + * Platium membership + * Gold membership + * Daimon membership + * VIP membership + 3. Purchase channel: Categorizing customers based on customer’s preferred purchase channels, such as in-store, online, mobile app, or phone (Call to call center)… + 4. Hobby: Based on customer’s hobby to create siutable loyatly program. + +6. Layout + +[Image Removed] + +#### Most Redemmed Items + +The top 10 (this value should be configurable value) redeemed items of the customer are displayed here. + +Just show top 5 item on each page. + +Each row contains a summary for an item, including the item code, the total redeemed quantity, and the redeemed points/cash amount to use for the specificed period. + +Shortcut to support quick add new item redemption transaction from this screen. + +Listing page description: + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field** | **Descriptions** | **Data type** | +| **Layout** [Image Removed] | | | | +| F**ilter** | | | | +| | Period | Period used to filter data. | This is drop-down filter key Mandatory and select one only OLS support following periods: * + 1. Today 2. This month 3. Last month 4. Last 3 motnhs Default as “To day” | +| | Item type | Optional field The drop-down to select item type to get top N item. If item type is not provided then top N of all item type will be displayed. | Drop down Multiple select Default Evoucher type | +| **Listing page** | | | | +| | Item code/Mã vật phẩm | Item code | Display Lookup value from CAT\_CATALOGUE\_TRANS\_DETAIL table | +| | Item Name/Tên vật phẩm | Item Name | Display Lookup value from ITEM table | +| | Category/ | The categories are assigned to item | Display Lookup value from Item table Each item can be assinged more than one category | +| | Quantiy/Số lượng | Total redemmed quantity of selected customer for top item on selected period | Display as number format Lookup value from CAT\_CATALOGUE\_TRANS\_DETAIL table | +| | Redemmed points/ Điểm đã sử dụng | Total redemmed point of selected customer for top item on selected period | Display as number format Lookup value from CAT\_CATALOGUE\_TRANS\_DETAIL table | +| | Cash Amount used/Tiền đã sử dụng | Cash used to redeem | Display as number format Lookup value from CAT\_CATALOGUE\_TRANS\_DETAIL table | +| **Data source** | | | | +| | Lookup value from CAT\_CATALOGUE\_TRANS\_DETAIL table Use Post\_Date to determine period Order by quantity descending order. | | | + +#### Balance information + +1. The all customer’s pool balances are displayed here. +2. Each row contains the summary for a Pool: the total balance (sum of all buckets in a Pool), redeemable balance and the expiry date of the earliest expiring bucket. +3. Listing page descriptions + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Descriptions** | **Data type** | +| Layout [Image Removed] | | | | +| **Fitler** | | | | +| | Pool | Optional field A drop-down to select the reward pools, which quickly retrieves the customer's balance. If Pool is provided then the system display all balance of the selected pool of the customer. If pool is not provided then all pool balance of the customer are displayed. | Drop –down Default as empty Multiple select Lookup from pool definition screen Display only the pools with a non-zero balance. | +| **Listing page** | | | | +| | Pool ID/Mã pool | Pool ID | Link Click on the pool id to bring up the “[Pool Balance Enquiry](#_Balance_Detail_Enquiry) ” detail view of this pool. | +| | Pool Name/Tên pool | Pool Name | Display Lookup value from Pool Definition | +| | Balance/Số dư | Sum all balance buckets of a pool of customer. | Display as number format Lookup value from LAB table | +| | Redeemable Balance/ Số dư khả dụng | The sum all non-balance buckets of a pool of customer. The bucket should have: Start date <= Processing date <= Expiry date | Display as number format Lookup value from LAB table | +| | Earliest Exp Bal and Date/ Số dư gần nhất | The earliest expiring bucket date for a pool, for non-0 balance buckets. And Balance that is expiring on The earliest expiring bucket date. The balanace should not be zero balance. | Display as number format Lookup value from LAB table | + +### Post – condition + +* + 1. User can use it as a strategy guide to creating personalized experiences.. + +### Exception Flow + +N/A + +## Account + +### Requirement Definition + +Account tab show all customer’s holding account. + +Account information means anything relating to customer’s holding acccount which sent from external system to OLS or Added by user via OLS system. + +### Process Flow + +[Image Removed] + +### Trigger + +N/A + +### Pre-Conditions + +1. Users have to have access rights in both “Customer Profile” and “Account” modules under “Customer Mangement” Group in order to able to view this screen. +2. User must select a customer in customer profile listing page to access the “Account” tab. +3. An account type must be available in the OLS system before adding any account of that type. + +### Wireframe + +Summary listing page + +[Image Removed] + +Figure 1: Listing page + +[Image Removed] + +Figure 2: Filter + +Add/Edit mode + +[Image Removed] + +[Image Removed] + +Detail view + +* 1. Record detail + +[Image Removed] + +* 1. Record status and history + +[Image Removed] + +### Business Rules + +Account records are updated in the external system and then loaded into OLS. + +Account records can be added by adding functions in administration screens. + +Click on the Account tab in the Customer profile screen to bring up the Account listing as illustrated in the [wireframe](#_Wireframe_4). + +Use the filter to locate a particular Account, which will be listed in the display. + +Click on a row to view details of the Account record, as illustrated in the [wareframe](#_Wireframe_4). + +Screen description + +| | | | | | | +| --- | --- | --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Description** | | | **Data type** | +| | CIF numnber\* / Số CIF) | CIF number of selected customer | | | Display | +| | Product Account Level (PAL) \* /Hạng tài khoản | Product Account Level of Account | | | Drop-down Lookup value from PRODUCT\_ACCOUNT\_LEVEL table Refer to “ Product Account Level” API under “Code Maintenance” | +| 2. | Product Account Type (PAT)\* /Loại tài khoản | Product account type which belongs to selected PAL that assigned to Account Combination PAL and PAT as Account Type of Account | | | Drop-down Lookup value from PRODUCT\_ACCOUNT\_TYPE table where PAL as selected PAL Refer “ Product Account Type” API under “Code Maintenance” | +| 3 | Account Number\*/ Số tài khoản | Product Account Number | | | X(20) Combination Account Type + Account Number should be unique. An Combination Account No + Account Type is assigned to an ASN. ASN is unique in the OLS system | +| | Account Open Date \*/Ngày mở tài khoản | Product Account Open Date | | | Date The date format must adhere to the configured format | +| | Account Indicator\*/ Chỉ thị tài khoản | P- Personal account C- Corporate Account | | | Drop-down Select one Lookup value from “Code Management” table where type code is “Acct-indicator”. Refer “List-by-code-type” API under Master Data. | +| | Account block code/ Mã chặn tài khoản | The account block code is used to check block transaction via TP or on some MQ validation | | | X(10) | +| | Block code reason / Mã lí do chặn tài khoản | Reason to block account | | | X(100) | +| | Block code last update date/ Ngày chặn cuối cùng | The day to block account | | | Date The date format must adhere to the configured format | +| | Cycle / Ngày sao kê | Statement cycle date | | | 9(02) Should be greater than 0 if provided | +| | Account status\*/ Trạng thái tài khoản | Product account status The Account status is used to check block transaction via TP or on some MQ validation | | | Drop-down Select one Lookup value from “Account Status” screen (Account\_status table). Refer “Account status” API under Code Maintenance | +| **Card information/Thông tin thẻ** When click to view any active account then this pannel is display to show the card of cards belong to selected account. The pannel includes following information: | | | | | | +| | Card number / Số Thẻ | | Card Number | Display Lookup value from Card\_Product\_Account\_Rel table where account is selected account. Refer “Card” API under Customer Management | | +| | Card status/ Trạng thái thẻ | | Card Status Display both code and description of status | Lookup value from Card table by Card Number Lookup description from Code\_Management table by code type is “card-status”. Refer “Card” API and “get-by-code-type” API | | +| | Card Indicator/Chỉ thị thẻ | | Card indicator Display both Code and description of indicator | Display Lookup value from Card table by Card Number Lookup description from Code\_Management table by code type is “card-indicator”. Refer “Card” API and “get-by-code-type” API | | +| | Card Creation Date/ Ngày tạo thẻ | | Creation Date of Card | Display date format The date format must adhere to the configured format. Lookup value from Card table by Card Number Refer “Card” API under Customer Management | | +| | Card Expiry Date /Ngày hết hạn | | Expiring date of Card | Display date format The date format must adhere to the configured format. Lookup value from Card table by Card Number Refer “Card” API under Customer Management | | +| | CIF number/ Số CIF | | CIF number of Card | Display Lookup value from Card table by Card Number Refer “Card” API under Customer Management | | +| | Card block code/Mã chặn thẻ | | Card block code | Display Lookup value from Card table by Card Number Refer “Card” API under Customer Management | | + +Each account is belong to only one Customer. OLS don’t support to change CIF number of account in this screen. If have to change CIF number of the account then it should be processed via CIF Merge batch if needed. + +Records added thru this screen cannot be updated by records from the OLSACCT batch. Record created/updated by OLSACCT batch cannot be CHANGED from the admin screen. This implicit check can be disabled through a parameter in App Param. + +When an account is added then: + +* If locate any exiting record with the same combination Account No+ Account Type in OLS (record status is “A”) then the record is rejected. +* If not then: + + - Account record is added in PRODUCT\_ACCOUNT table. + - The corresponding LOYALTY\_ACCOUNT\_PRODUCT is created + +When an account is modified then : + +* If there is no combination Account No+ Account Type is found in OLS then the record is rejected. +* If found the same combination Account No+ Account Type existing record in OLS then update Product Account fields with the incoming field values accordingly. The original record is moved to his table after record is approved. +* Upgrade Account case :==tbd=== + +When account is deleted then: + +* If there is no combination Account No+ Account Type is found in OLS then the record is rejected +* If locates a Product Account record that has a Card record with record Status “A” linked to it, the incoming delete action is rejected. +* If found the same combination Account No+ Account Type existing record in OLS then move record into history table. The corresponding LOYALTY\_ACCOUNT\_PRODUCT is moved to his table as well. + +### Post – Codition + +* 1. Allow to add Card. + 2. Allow to post transaction with new account. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Card + +### Requirement Definition + +Card tab show all customer’s card. + +Card information means anything relating to customer’s card which sent from external system to OLS or added by users on the OLS system. + +### Process Flow + +[Image Removed] + +### Trigger + +N/A + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Card” modules under “Customer Mangement” Group to able to view this screen. +2. User must select a customer in customer profile listing page to access the “Card” tab. +3. An account must be available in the OLS system before adding any card of that account. + +### Wireframe + +Summary listing page + +[Image Removed] + +Figure 1: Listing page + +[Image Removed] + +Create/Edit view + +[Image Removed] + +[Image Removed] + +Detail record view + +* 1. Record detail + +[Image Removed] + +* 1. Record status and history + +[Image Removed] + +### Business Rules + +Card records are updated in external system and then loaded into OLS, so OLS only provides view functions in administration screens for Card records. There is no further actions. + +Click on Card tab in Customer profile screen to brings up the Card listing as illustrated in the [wareframe](#_Wireframe_5). + +Use the filter to locate particular Card, which will be listed in the display. + +Click on a row to view details of the Card record, as illustrated in the [wareframe](#_Wireframe_5). + +Create/Edit screen description + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Description** | **Data type** | +| | CIF number \*/Số CIF | CIF Number of Card | Drop-down Get data from Client table Default as CIF Number of selected customer but user can modify if Supplement Card is added. Support quick search CIF number by enterd al least 4 digits of CIF number. | +| | Account Type\*/ Loại tài khoản | Combination of Product Account Level and product account type PAT : Visa [001] PAL: Debit [830] Account type : 830-001 | Drop-down Lookup value from PRODUCT\_ACCOUNT table where Account Type is Account type of select customer (Use CIF number which is selected from listing page). Refer to “Product account” API under “Customer Management”. | +| | Account number \*/ Số tài khoản | Product Account number | Drop-down All account of selected account type of selected customer. Refer to “Product account” API under “Customer Management” | +| 3 | Card number\* /Số thẻ | Card number | X(20) Must be unique value in whole system. | +| | Masked Card Number/ ==tbd== | Masked Card Number | X(20) | +| | Cardholder Name\*/ Tên chủ thẻ | Cardholder Name | X(50) | +| | Card Indicator\*/ Chỉ thị thẻ | Card indicator: S- Supplement Card P – Principal Card K – Corporate Card …. For principal card then CIF of card must be the same as CIF of Account. | Drop-down Select one Lookup value from “Code management” table where type code is “card-indicator”. Refer “list-by-code-type” API under “Master Data”. | +| | Card status \*/Trạng thái thẻ | Card status The Card status is used to check block transaction via TP or on some MQ validation | Drop-down Lookup value from “Card Status” screen (Card\_status table). Refer “Card status” API under Code Maintenance | +| | Card block code/Mã chặn thẻ | Card block code The Card block code is used to check block transaction via TP or on some MQ validation | X(10) | +| | Card activation date /Ngày kích hoạt thẻ | Card activation date | Date | +| | Card creation date\*/ Ngày mở thẻ | Card creation date | Date | +| | Card expiry date \*/ Ngày thẻ hết hạn | Card expiry date | Date | +| | Old Card Number/ Số thẻ cũ. | Old Card Number | Drop-down list Card belong to selected account. In BAU processing, this is the existing card number to be replaced by new Card Number in this record. This field should have a value only if this record is ADDING a NEW CARD NUMBER which is to replace the OLD CARD NUMBER. Both new card and old card should under the same account. | +| | ==tbd== | | | + +1. Records added thru this screen cannot be updated by records from the OLSCARD batch. Record created/updated by OLSCARD batch cannot be CHANGED from the admin screen. This implicit check can be disabled through a parameter in App Param. +2. When a record is adding with whose Card Number already exists in OLS, the record will be rejected. +3. When a record is adding/updating with whose Account does not exists in OLS, the record will be rejected. +4. When a record is adding/updating with whose CIF Number does not exists in OLS, the record will be rejected. +5. **Processing** + +* Each Card is belong to only one Account and only one customer. OLS don’t support to change CIF number Or Account of Card in this screen. If have to change CIF Numnber of card or account of card then it should be processed via CIF Merge batch if needed. +* When a record is adding with inputed data passed the card record validation then: + + - The card record is added in CARD table. + - The linked record to the Account through CARD\_PRODUCT\_ACCOUNT\_REL table is added as well. +* When a record is updated whose Card Number passes the validations then the Card record and the Card–Account relationship record are updated. Original record is moved to his table. +* When a Card is deleted then the Card record is moved to history table to indicate a logical delete. The corresponding CARD\_PRODUCT\_ACCOUNT\_REL record for this card is also moved to history table. +* For principal card CIF number of account should be the same CIF number of card. +* For replacement case: A new Card issued to the Cardmember in case of loss, theft, mutilation or non-receipt of a Card. Therefore new card is coming to replace old card. When replace card then: + + - Add the incoming record as a new Card record with the same PSN as old card number. + - The linked record to the Account through CARD\_PRODUCT\_ACCOUNT\_REL table is added as well. + - Old Card Number will continue to be processed until the Card Status and/or Block Code is/are updated to make the card ineligible. + - All Attributes, Counters and Pool Buckets which were linked to the old Card number will be automatically linked to the new Card record. + +1. Card listing will be the list card of all account of selected customer. + +### Post – Codition + +N/A + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Pool Balance Detail + +### Requirement Definition + +OLS will support Pool balance enquiry as a tab on Customer Profile Screen. + +Pool Balance tab to list a summary of all Pools of the customer. + +### Process Flow + +[Image Removed] + +### Trigger + +User would like to check balance detail of customer. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Balance Enquiry” modules under “Customer Mangement” Group to able to view this screen. +2. User must select a customer in customer profile listing page to access the “Pool Balance Detail” feature. + +### Wireframe + +Summary listing page + +* + 1. Listing page + +[Image Removed] + +* + 1. Filter + +[Image Removed] + +1. Detail view + * 1. Detail view per each pool + +[Image Removed] + +* + 1. Click on each row in Pool Balance View to brings up the pop-op detail view + +[Image Removed] + +### Business Rules + +* 1. Click on Pool Balance tab to list a summary of all Pools of the customer. + 2. All summary of pool balance display in listing page. + 3. This screen just display only. There is no Add/Mofify action on this screen. + 4. Each row contains the summary for a Pool: the total non-balance (sum of all buckets in a Pool), and redeemable balance and the expiry date of the earliest expiring bucket. + 5. Use the filter to locate particular pool balance detail record, which will be listed in the display. + 6. Click on any record to bring up the breakdown of the Pool in that row on the “Pool Balance Detail” Screen as illustrated in the [Wireframe](#_Wireframe_2). + 7. User stories and acceptance criteria + +[Image Removed] + +* 1. Pool Balance Detail screen descriptions + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Descriptions** | **Data type** | +| **Pool Balance /Số dư pool** | | | | +| | Pool ID / Mã pool | Pool ID | Display | +| | Pool Name/ Tên pool | Pool Name | Display Lookup value from Pool Definition | +| | Pool type/ Loại pool | Pool Type | Display Lookup value from Pool Definition | +| | Pool Entity level / Cấp thực thể pool | Pool Entity level | Display Lookup value from Pool Definition and master data table | +| | Balance / Số dư | Sum all balance buckets of selected pool | Display as number format Lookup value from LAB table | +| | Redeemable Balance/ Số dư khả dụng | The sum all non-balance buckets of selected pool The balance bucket must be non-expired and available to use. | Display as number format Lookup value from LAB table | +| | Next Expiring Balance/ Số dư hết hạn gần nhất | The earliest non-expiring balance bucket of the selected pool. | Display as number format Lookup value from LAB table | +| **Pool Balance View/ Chi tiết số dư pool** The breakdown of the Pool in that row following: [Image Removed] 1. Each row is a bucket containing the remaining points earned by the Account/Card shown, and expiring on the date shown. Expired buckets but haven’t yet forfeited will be shown as well. 2. If Customer pool level then all Pools buckets of the customer are shown under each speparaty account even it is customer entity-level. 3. If Account pool level then all only the Pool buckets earned by the presented Account will be shown. 4. If Card pool level then only the Pool buckets earned by the presented card will be shown. | | | | +| | Account type/ Loại tài khoản | Combination of Product Account Type and Product Account level of Account | Display Lookup from Product\_Account table Lookup from Product\_Account number by ASN from LAB table. | +| | Account No/ Số tài khoản | Product Account Number | Display Lookup from Product\_Account number by ASN from LAB table. | +| | Card Number/ Số thẻ | Card number | Present for Card pool entity level only | +| | Pool ID/ Mã pool | Pool ID | Selected pool | +| | Balance / Số dư | Non zero balance | Display Loopkup value from LAB table. Group by Expiry date / LA/ASN/CSN/Pool ID | +| | Expiry Date/ Ngày hết hạn | Expring date | Display Loopkup value from LAB table | + +### Post – Codition + +N/A + +### Exception Flow + +N/A + +## Transaction History + +### Requirement Definition + +* + - 1. Transaction History is a tab under Customer profile. + 2. A transaction history is a running record of all of the transactions logged in OLS including cancellation transactions. + 3. Noted that: Transaciton hisstory listing depened on housekeep parameter. Nomarly It will show all transaction on the last 12 months. + +### Process Flow + +[Image Removed] + +### Trigger + +User would like to check transaction history of customer. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Transaction History” modules under “Customer Mangement” Group in order to view this screen. +2. User must select a customer in customer profile listing page to access the “Transaction History” tab. + +### Wireframe + +* + - * 1. Summary listing page + +[Image Removed] + +* + 1. Detail record + 1. Transaction Detail + +[Image Removed] + +* 1. Record status + +[Image Removed] + +1. Right panels + * + Quick view desribes expand information for this transaction. + + Click on each item to bring up the according tab + + Support scrollbar for pop-up detail view. + 1. Reward details + +[Image Removed] + +* 1. Item Redemption Transaction Details + +[Image Removed] + +* 1. Counter Transaction Details + +[Image Removed] + +### Business Rules + +* 1. Click on Transaciton History tab to list all transaction of the customer as illustrated in the [wireframe](#_Wireframe_3). + 2. One transaction detail record is combination of all input field (assinged to an OLS Reference No). + 3. Transaction history listing all transaction in OLS of customer include cancellation transactions. + 4. This screen just view only. There is no futher action. + 5. Use the filter to locate particular transactions, which will be listed in the display. + 6. Click a listed record to display the details of the transaction as illustrated in the following: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Account Detail/Chi tiết tài khoản** | | | | +| | Account Number/ Số tài khoản | Transacting Product Account Number | Display Lookup value from TRANSACTIONS table | +| | Product Account Type/ Loại tài khoản | Transacting Product Account Type | Display Lookup value from TRANSACTIONS table | +| | Product Account Level/Hạng tài khoản | Transacting Product Account Level | Display Lookup value from TRANSACTIONS table | +| | Card Number/ Số thẻ | Transacting Card Number | Display Lookup value from TRANSACTIONS table | +| **Transaction Detail/ Chi tiết giao dịch** | | | | +| | Invoice No/ Số hóa đơn | Internal invoice No generated by OLS system. | Unique for each transaction Display only Lookup value from TRANSACTIONS table | +| | Reference No/Số tham chiếu giao dịch | OLS Transaction Reference Number | Unique for each transaction Display only Lookup value from TRANSACTIONS table | +| | Source Reference Number | Reference number from source system For refrence only | Display | +| | OLS Transaction Code | OLS Transaction Code | Display Lookup value from TRANSACTIONS table | +| | Gross Amount/ Giá trị giao dịch gộp | Gross transaction amount | | +| | Nett Amount/Giá trị giao dịch ròng | Nett transaction Amount | | +| | Redeem points/Điểm đổi thưởng | Redeem points Total redeem points of the choosen transaction. The total point shoule equal to total redeem points on each campaign rule which will be display on quick view. | Display Lookup value from TRANSACTIONS table | +| | Points Redeemed Amount/ Giá trị điểm đổi thưởng | Redemmed point Amount Total redeem point amount of the choosen transaction. The total point shoule equal to total redeem point amount on each campaign rule which will be display on quick view. | | +| | Adjust Points/ Điểm điều chỉnh | Adjustment point Total adjustment points of the choosen transaction. The total point shoule equal to total adjust points on each campaign rule which will be display on quick view. | Display Lookup value from TRANSACTIONS table | +| | Points Adjustment Amount/ Giá trị điểm điều chỉnh | Adjustment points amount Total adjust point amount of the choosen transaction. The total point shoule equal to total adjust point amount on each campaign rule which will be display on quick view. | | +| | Award Points/ Điểm thưởng | Earned points Total award points of the choosen transaction. The total point shoule equal to total award points on each campaign rule which will be display on quick view | Display Lookup value from TRANSACTION table | +| | Points Awarded Amount/Giá trị điểm thưởng | Earned points amount Total award point amount of the choosen transaction. The total point shoule equal to total award point amount on each campaign rule which will be display on quick view. | +| | Transaction Date/Ngày giao dịch | Transaction Date Time | +| | Post Date/ Ngày đăng | Post Date | +| | Settlement Date/ Ngày ghi sổ | Settlement Date | +| | Cancellation Indicator/Chỉ thị hủy | Cancellation Indicator | +| | MCC | Transaction MCC Code | +| | Store/ Cửa hàng-đơn vị | Transaction Store ID | +| | Terminal / Cấp thiết bị đầu cuối | Transaction Terminal ID | +| | Transaction Description/Mô tả giao dịch | Transaction Description in OLS or Shop Name from external source system. | +| | Currency Code/ Mã tiền tệ | Currency code of the original transaction amount | +| | Country Code /Mã quốc gia | Country code of the original transaction. | +| | Transaction Mode/ Phương thức giao dịch | Mode of transaction at point of payment | +| | Transaction Channel /Kênh giao dịch | Transaction channel | +| | Salary Credit/ Chỉ báo tiền lương | Indicates bundled deposit account is receiving regular salary credits | +| | POS Entry Mode/ =tbd= | POS Entry Mode | +| | Reason Code/ Mã lí do | Adjustment reason code | For Adjustment transaction | + +1. Quick view in right panel displays the award, redeem, adjust and counter update details of the transaction including the campaign rules applied to the transaction and the Pool Units earned and redeemed. Click on each item to bring up the according tab. + 1. Award/Redeem/Adjust detail: Total balance in right panel should be equal to blanace which is displayed in transaction detail. This quick view displays the reward details of the transaction. + +| | | | +| --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Descriptions** | +| | Campaign Rule / Quy tắc chiến dịch | Campaign rule that transaction has been triggered This value may be empty if transaction does not trigger campaign rule | +| | Transaction Type/ Loại giao dịch | Transaction Type | +| | OLS Transaction Code/Mã giao dịch OLS | OLS Transaction Code | +| | Pool/ Pool | Reward Pool | +| | Pool Unit/ Đơn vị Pool | Award/Redeem/Adjust points Depended on transaction type | +| | Pool Unit Amount / Giá trị đơn vị Pool | Award/Redeem/Adjust points amount Depended on transaction type | + +* 1. Counter Transaction Detail: + + This part displays the counter value, which is updated by the transaction on each campaign rule. + +| | | | +| --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Descriptions** | +| | Campaign Rule / Mã quy tắc | Campaign rule that transaction has been triggered | +| | Counter / Bộ đếm | The counter for that transaction has been updated | +| | Entity / Cấp thực thể | Entity level of counter | +| | Counter Value/Giá trị bộ đếm | Counter Value | +| | Bucket Number/ Bộ đếm số | Counter bucket number which one is updated by this transaction. | +| | Bucket Start Date/ Ngày bộ đếm bắt đầu | The start date of the counter bucket for the updated counter has been changed | +| | Bucket End Date /Ngày bộ đếm kết thúc | The end date of the counter bucket for the updated counter has been changed | + +* 1. Item Redemption Transaction Detail + + This quick view displays the item redemption details of the transaction. + +| | | | +| --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Descriptions** | +| | Item / Mã vật phẩm | Item | +| | Descriptions/ Mô tả | Remark of the redemption transaction | +| | Redemmed quantity / Số lượng đổi thưởng | Redemmed quantity | +| | Redeemed points/ Điểm đổi thưởng | Redeemed points | +| | Cash Amount used/Số tiền đã dùng | Cash amount is used to redeem item. | + +### Post – Codition + +N/A + +### Exception Flow + +N/A + +## No Hit CP – Transaction –IF “RULE EVALUATION” IMPLEMENTED THEN THIS SCREEN IS REDUNDANT + +### Requirement Definition + +* + - 1. In the nearest version, there is no screen to be tracking the transaction which did not trigger campaign rule by some reasons. + 2. In this version, we introduce a new screen under the 'Customer Management' module to track all non-eligible transactions (those that did not meet the rule criteria) or transactions with no linked rules + 3. A 'No-Hit Transaction' is a running record of all transactions sent to OLS to trigger a CP rule but not eligible for a campaign rule or incoming transactions with no linked campaign rule. If an incoming transaction hits Rule A but does not hit Rule B, this transaction will still appear on this screen for Rule B + 4. Noted that: Listing is depending on housekeep parameter. Nomarly It will show all transaction on the last 12 months. + +### Process Flow + +[Image Removed] + +### Trigger + +* + - * 1. User would like to verfiy why transaction did not hit campaign rules. + +### Pre-Conditions + +Incoming transactions trigger campaign but do not hit CP. + +User have to have access rights in both “Customer Profile” and “No hit CP- Transaction” modules under “Customer Mangement” Group in order to view this screen. + +User must select a customer in customer profile listing page to access the “No hit CP- Transaction” tab. + +### Wireframe + +Summary listing page + +[Image Removed] + +Detail view + +* 1. Record detail + +[Image Removed] + +* 1. Record status + +[Image Removed] + +### Business Rules + +* 1. Click on No Hit CP- Transaction tab to list all No-Hit CP transaction of the customer as illustrated in the [wireframe](#_Wireframe_15). + 2. One transaction detail record is one incoming transaction ( assinged to one Invoice No). + 3. Detail view screen will display all campaign rule which transaction trigger but does not hit. + 4. This screen just view only. There is no further actions. + 5. Use the filter to locate particular transactions, which will be listed in the display. + 6. Lookup no – hit transactions from OLS\_ORPHAN\_TXN\_NO\_HIT table for transaction which trigger campaign rule but not meet rule criteria OR transaction no linked any campaign rule. + 7. This screen should desribe detail why transactions do not hit CP rule such as if critertia do not meet then which criteria failed. TP should response detail the error description to can show in this screen. + 8. Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Account Information** | | | | +| | CIF Number | Transacted CIF Number If incoming transaction are not provided then lookup by Account/ Card which are provided. | Display | +| | Product Account No | Transacted Product Account Number and combination of Product Account Level and Product Account Type. If Incoming transaction are not provided then lookup by Card Number which is provided | Display | +| | Account Type | +| | Card number | Transacted Card Number | From incoming transaction | +| **Transaction Detail** | | | | +| | Invoice No | Unique Invocie No which generate by OLS system to determine unique incoming transaction. | Display | +| | Transaction Type | Transaction Type of CP rule AWD- Award RED- Redeem ADJ- Adjust | Display | +| | OLS Transaction Code | Transaction code which used to locate CP rule. | | +| | Transaction Date Time | Transaction Date and Time | Display as date time format. The date format must adhere to the configured format From incoming transaciton | +| | Transaction Amount | Transaction Gross Amount from incoming transaction for Award/Redeem transaction Adjust point for Adjustment transction | Display as number format 999,999,999.99 From incoming transaciton | +| | Corporate | Transaction corporate ID Lookup value from transaction store | Display | +| | Chain | Transaction chain ID Lookup value from transaction store | Display | +| | Store | Transaciton Store ID | Display From incoming transaciton | +| | Terminal | Transaction Terminal ID | Display From incoming transaciton | +| | Transaction MCC | Transaction MCC Id | Display From incoming transaciton | +| | Transaction Description | Transaction description | Display From incoming transaciton | +| | Currency Code | Currency code of the original transaction amount | Display From incoming transaciton | +| | Transaction Mode | Mode of transaction at point of payment | Display From incoming transaciton | +| | DCC indicator | DCC indicator From incoming transaciton If empty then mean for non -DCC transaction | Display | +| | Tap2Pay Indicator | Tap2Pay Indicator If empty then mean for transaction is not a Tap2Pay(token) transaction | Display | +| | Token Requestor ID | Token Requestor ID (mobile pay) 3rd party wallet providers (Apple Pay, Samsung Pay, Android Pay etc | From incoming transaciton | +| | Salary Credit | Salary Credit | From incoming transaction Indicates bundled deposit account is receiving regular salary credits | +| | POS Entry Mode | POS entry Mode | From incoming transaction | +| **CP Rule Listing** **Detail error description for each campaign Rule which incoming transaction trigger but do not hit this campaign Rule** | | | | +| | Campaign ID | Campain ID | Lookup value by Campaign Rule ID | +| | Campain Rule | Campaign Rule ID | Display | +| | Pool ID | The reward pool of campaign rule | Display Lookup value by Campaign Rule ID | +| | Error Code | Error response code from OLS | Display | +| | Error Descriptions | Error response description | Display | + +Post-condition + +* + - 1. User can adjust incoming transaciton to meet Campain Rule or explain to customer why they do not get reward. + +### Exception Flow + +N/A + +## Statement + +### Requirement Definition + +* + 1. Statement Enquiry is a list of all transactions for a customer/ account over a set period, usually monthly. The statement includes earned, redeemed and adjusted, as well as the beginning and ending balance for the period, along with any interest earned. + +### Process Flow + +[Image Removed] + +### Trigger + +User would like to review/verify statement detail of customer. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Statement Enquiry” modules under “Customer Mangement” Group in order to this screen. +2. User must select a customer in customer profile listing page to view customer profile and access the “Statement Enquiry” tab. + +### Wireframe + +* + - 1. Summary listing page + +[Image Removed] + +* + - 1. Detail view + 1. Record detail + +[Image Removed] + +* 1. Record status + +[Image Removed] + +### Business Rules + +* + 1. OLS statement output support Customer level and Account level, however statement records will be stored under Account level therefore Statement Enquiry show under Account level for both Statement Pool Entity level. + 2. Statement Enquiry includes all active statement records of statement pool. + 3. Statement records are updated by OLS batch jobs, so in administration functions (OA) only provides view in screens. There is no further actions. + 4. Click on Statement Enquiry tab to list all statement records of the customer as illustrated in the [wireframe](#_Wireframe_6). + 5. Click a listed record to display the details of the transaction as illustrated in the [wireframe](#_Wireframe_6). + 6. Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Statement detail** | | | | +| | Loyalty Account Number | Loyalty Account Number | Display Lookup value from STATEMENT table | +| | Product Account Number | Product Account Number | Display Lookup value from PRODUCT\_ACCOUNT table by ASN in Statement table. | +| | Account Type | Combination of Product Account Level and Product Account Type | +| | Pool ID | Statement Pool | Display Lookup value from STATEMENT table | +| | Cycle start date | Cycle start date time Provious statement cycle | +| | Statement Opening balance | Previous Statement Points Balance | +| | Total Award | Total earned points in this cycle | +| | Total Redeem | Total redemmed points in this cycle | +| | Total Adjust | Total Adjusted points in this cycle | +| | Statement Closing Blance | Accumualted points | +| | Expired points | Balance in expired buckets which have not yet been forfeited | +| | Last transaction Date | Last transaction post date on this cycle | +| | Cycle statement date | Cycle statement date time | +| **Transaction Detail** This part display all transaction of account/customer on each cycle. [Image Removed] Get data from TRANSACTION table where: * + 1. LA is LA of customer statement records. 2. Pool ID is statement pool 3. ASN is ASN of Account statement records. 4. Post date from Cycle Start Date upto Last Transaction Date 5. Without cancellation transaction 6. Points are not equal to 0 | | | | +| | Reference Number | OLS Reference Number | Display | +| | Transaction Type | Transaction Type of this transaction | Display Lookup value from Transaction table | +| | Unit | Earned/ Redeemed/Adjusted point Depended on transaction type Group by Reference No,Post Date,Transaction date and Txn type | +| | Post Date | Post Date time | +| | Transaction Date | Transaction Date Time | + +### Post – Condition + +N/A + +### Exception Flow + +N/A + +## Attribute + +### Requirement Definition + +* + - * 1. In nearest version of OLS, on each sub tab: Customer profile, Account and Card will display according attribute: + 1. Customer profile screen dislays customer information and Customer attribute lisitng. + 2. Account Detail screen dislays Account information and Account attribute of customer. + 3. Card detail screen displays Card information and Card attribute of customer. + 1. In new OLS version Attribute will be displayed on separately tab under Customer profile module. + +### Process Flow + +[Image Removed] + +### Trigger + +* + 1. User would like to review/ verify attribute detail of customer. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Attribute” modules under “Customer Mangement” Group to able to view this screen. +2. Users must select a customer on the customer profile listing page to access the "Attribute Enquiry" tab. + +### Wireframe + +* + - 1. Summary listing page + +[Image Removed] + +Figure 1: Listing page + +[Image Removed] + +Figure 2: Filter + +* + - 1. Detail view + 1. Record detail + +[Image Removed] + +* 1. Record status and history + +[Image Removed] + +### Business Rules + +* + - * 1. Get data from ATTRIBUTE\_VALUE table. The attribute values inserted/update form OLS batch process (Attribute maintenance batchs or OMR batch job) OR can be updated by the Attribute maintenance batch as well as by Campaign Rules. + 2. This screen just display atribute value only. There is no further action. + 3. The Attributes listing screen is accessed from the Attribute Tab in the Customer profile module. Clicking on the Attributes Tab will bring up a listing of Attributes, as illustrated in the [wireframe](#_Wireframe_7). + 4. In this screen will display all attribute of customer including Customer attribute/Account attribute/ Card attribute. + 5. Clicking on the Attribute value row in listing page will bring up the attribute value detail of customer, as illustrated in the [wireframe](#_Wireframe_7). + 6. Description of Attribute value detail field + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/Vn)** | **Description** | **Data type** | +| **Filter** Apply quick search functions as common function on OLS administrator screen without Entity ID and Effect date. | | | | +| | Entity /Thực thể | Optional field Including: Client/Product\_Account/ Card If Client entity is selected then listing all customer attribute of customer. If Product\_Account entity is selected then listing all account attribute of customer. If Card entity is selected then listing all card attribute of customer. If Entity is not provided then get all attribute of customer which under Customer/ Account/Card entity level | Drop-down Allow multiple select. Default as empty | +| 2. | Effective Date From /Ngày bắt đầu có hiệu lực | Mandatory Listing attribute value during selected date frame. | Date time | +| 3. | Effective Date To/Ngày kết thúc hiệu lực | +| | Only effective records listed/Chỉ hiển thị các giá trị thực thể có hiệu lực | Use processing date to compare with attribute value effective date. If selected then only effective records listed If non-select then all attribute record including expired attribute value records listed | Check box Default as selected | +| **Attribute value detail field / Thông tin chi tiết thuộc tính** | | | | +| | Attribute Group/Nhóm thuộc tính | Attribute group of attribute | Display Lookup value from ATTRIBUTE\_MAINTENANCE table by Attribute ID | +| | Attribute ID/ID thuộc tính | Attribute ID | Display Lookup value from ATTRIBUTE\_VALUE table | +| | Attribute Name / Tên thuộc tíng | Attribute Name | Display Lookup value from ATTRIBUTE\_MAINTENANCE table by Attribute ID | +| | Entity / Thực thể | Entity level of attribute Indicates the Entity to which this Attribute belongs Client: Customer Product\_Account : Account Card: Card | Display Lookup value from ATTRIBUTE\_MAINTENANCE table by Attribute ID | +| | Entity ID/ ID thực thể | The identifier for the Entity to which the Attribute value in this record belongs. If Entity is : • “Product\_Account”, this field contains the PA Number • “Card”, this field contains the Card Number • “Client”, this field contains the CIF Number * “Store”, this field contains the Store ID * ……etc…. | Entity value will be : * + 1. CSN for customer attribute. 2. ASN for account attribute 3. PSN for Card attribute. Use Entity and Entity\_ID of attribute for lookup according value: | +| | Account Type/ Loại tài khoản | Combinaiton of Product Account Level and Product Account Type of Account attribute. Present for Account attribute only | Display Lookup value from PRODUCT\_ACCOUNT table | +| | Attribute value /Giá trị thuộc tính | Attribute value | Display Lookup value from ATTRIBUTE\_VALUE table | +| | Effective Date From/ Ngày bắt đầu có hiệu lực | Start date of the effective period for the Attribute value | +| | Effective Date To/Ngày kết thúc hiệu lực | End date of the effective period for the Attribute value | +| **List of Campaign/Danh sách chiến dịch** **This appear when user click to view detail of any record** [Image Removed] | | | | +| | Campaign ID/ID chiến dịch | Campaign ID which reference to Campaign Rule | Display Lookup value from “Campaign Rule screen” | +| | Campaign Name | Name of Campaign | Display Refer to “Campaign “ API under Campaign Management Lookup value from “Campaign” table. | +| | Campaign Rule | Campaign Rules which reference to this attribute | Display Lookup value from “Campaign Rule” screen to list all campaign rules which includes this attribute on at least following items: * + 1. Attribute Criteria 2. Formula 8 3. Formula 7 4. Award limit | +| | Campaign Rule Name | Name of Campaign rule | Display Lookup value from “Campaign\_Rule” tablle Refer “Campaign Rule” API under Campaign Management | +| | Effect date | The Effect date of Campaign Rule Dislay both Effective from date and effective to dat e | Display The date format must adhere to the configured format | + +### Post-Conditions + +N/A + +### Exception Flow + +N/A + +## Counter + +### Requirement Definition + +* + - * 1. In nearest version of OLS, on each sub tab: Customer profile, Account and Card will display according Counter: + - Customer profile screen dislays customer information and customer -level counter listing + - Account Detail screen dislays Account information and account -level counter of customer. + - Card detail screen displays Card information and card -level counter of customer. + 1. In new OLS version Counter will be displayed on separately tab under Customer profile module. + +### Process Flow + +### Trigger + +* + 1. Users would like to review and verify the counter detail of the customer. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Counter” modules under “Customer Mangement” Group in order to view this screen. +2. Users must select a customer on the customer profile listing page to access the "Counter " tab. + +### Wireframe + +* + - 1. Summary listing page + +[Image Removed] + +Figure 1: Listing page + +[Image Removed] + +Figure 2: Filter + +* + - 1. Record detail + 1. Record detail view + +[Image Removed] + +* 1. Record status + +[Image Removed] + +### Business Rules + +* + - * 1. Get data from the table that updates the counter value (Campaign\_Counter table). The counter values are inserted/updated from the OLS batch process that triggers the Campaign Rules as well as the OA screen. + 2. This screen just displays counnter value only. There is no further action. + 3. The Counter Detail listing screen is accessed from the Counter Tab in the Customer profile module. Clicking on the Counter Tab will bring up a listing of the counter, as illustrated in the [wireframe](#_Wireframe_8). + 4. In this screen will display all counter bucket for the chosen customer, including Customer-level counter/Account -level counter/ Card- level counter. + 5. Clicking on the Counter value row in listing page will bring up the counter value detail of customer, as illustrated in the [wireframe](#_Wireframe_7). + 6. Description of Counter value detail field: + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Description** | **Data type** | +| **Filter** Apply quick search functions as common function on OLS administrator screen without Entity level and Counter bucket period | | | | +| | Entity /Thực thể | Optional field Including: **Customer [CU]/ Account [PA] /Card [CA].** If “Customer[CU]“ is selected then listing all customer -level counter of customer. If “Account [PA]” is selected then listing all account- level counter of customer. If “Card [CA]”is selected then listing all card -level counter of customer. If Entity level is not provided then get all counter level of customer which under Customer/ Account/Card entity level. | Drop-down Allow multiple select. Default as empty | +| 2. | Bucket Start Date / Ngày bắt đầu | Mandatory Listing counter value during selected date frame. | Date | +| 3. | Bucket End Date/ | +| | Only effective records listed/Chỉ hiện thị counter hiện tại | Use processing date to compare with counter bucket period. If selected then only effective records listed. Use processing date to determine the effective of the counter bucket. If non-select then all counter value record including expired counter records listed | Check box Default as selected | +| **Counter value detail field** | | | | +| | Counter/Bộ đếm | Counter | Display | +| | Entity /Cấp bộ đếm | Entity counter level Cust- CU Account – PA Card – CA | Display | +| | Entity ID/ID thực thể | The identifier for the Entity to which the counter value in this record belongs. If Entity is : • “Account”, this field contains the Account Number • “Card”, this field contains the Card Number • “Customer”, this field contains the CIF Number | Display | +| | What to count/ Tiêu chí đếm | The data entity that is to be counted or tracked | Display | +| | Counter Value/Giá trị bộ đếm | Counter value | Display as number format | +| | Bucket start date | Start date of the bucket period for the Counter value | Display as date format | +| | Bucket end date | End date of the bucket period for the Counter value | Display as date format | +| | Counter state/Tình trạng bộ đếm | Counter state A: Awared C: New | Display Show state code only | +| **Counter Statistic / Tổng hợp bộ đếm** [Image Removed] **This part will list the details of the counter history statistics for the chosen counter bucket in the listing page** | | | | +| | Reference No/ Số tham chiếu giao dịch | OLS Transaction Reference Number | Display | +| | Post Date /Ngày đăng | The post date of the transaction | Dipslay as date time format The date format must adhere to the configured format | +| | Counter Value/Giá trị bộ đếm | Counter value which is updated on this transaction | Display as number format | +| | Bucket Number/Số bộ đếm | The bucket number of selected counter | Display as interger number format | +| | Update Date | The system date when counter value is updated | Dipslay as date time format The date format must adhere to the configured format | +| | Updated by | The batch/User who post the transaction that make counter value is changed. | Display | + +### Post-Conditions + +N/A + +### Exception Flow + +N/A + +## Adjustment + +### Requirement Definition + +1. Adjustment transactions can be manually posted through the Customer Management module in the administration screen function under. +2. This screen display all manually adjustment transaction of customer. + +### Process Flow + +[Image Removed] + +### Trigger + +* + 1. User would like to review/ verify manually adjustment transaction of customer. + 2. There is some wrong in balance of customer then user have to manually adjust via OA screen. + +### Pre-Conditions + +1. User have to have access rights in both “Customer Profile” and “Adjustment Entry” modules under “Customer Mangement” Group in order to view this screen. +2. Users must select a customer on the customer profile listing page to access the "Adjusment Entry" tab +3. Depending on the user’s access rights, they can view/edit/add or approve manually Adjustment transaction records. + +### Wireframe + +* + - 1. Summary listing page + +[Image Removed] + +* + - 1. Active record + +Record detail + +[Image Removed] + +[Image Removed] + +1. Create/Edit form + +Create /Edit mode + +[Image Removed] + +[Image Removed] + +* + - After selected/inputted card/Account/CIF click to quick view icon to see right panel information + +[Image Removed] + +### Business Rules + +1. While under “Transaction Management” module in the administration screen function, manually adjustment transaction can be posted for any customer then in “Customer management”module manually adjustment transaction can be posted for selected customer only. +2. Click on the Adjustment Entry tab in the “Customer Profile “sreen to bring up the screen for accessing the Adjustment Entry listing page. The detail as illustrated in the [wireframe](#_Wireframe_9). +3. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Adjustment Entry screen is illustrated in the [wireframe](#_Wireframe_9). +4. Noted that Edit icon (!) and Delete icon just display for pending and rejected record only. +5. User stories and acceptance criteria + +[Image Removed] + +1. Screen desscriptions + +| | | | | | +| --- | --- | --- | --- | --- | +| **Index** | **Field** | **Desscription** | **Data type** | | +| **Adjustment detail** | | | | | +| | Posted transaction by\*/ Tạo giao dịch bởi | Transacting Account/Customer identifier. Only one of the followings: CIF number/ Account / Card must be provided | Radio button Default posted by Card Look up value from master data | | +| | | | Under Customer management module | Under Transaction Management module | +| | Card Number/Số thẻ | Any of the customer's card numbers. Condition filed This field is only active and required if txn is posted by Card. | Drop -down Select one List all card of selected customer | Drop-down Select one Put any Card number in OLS system. Default emptu to avoid performance issue then user must enter at least 4 digits of Card number to find card. Refer “Customer” API under Customer Management | +| | Product Account Level/Loại tài khoản | Product Account Level Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account level for all accounts of selected customer. Refer “==tbd== “ API | Drop-down Select one List all account level in the OLS system. Refer “Product Account Level” API under Code Maintenance service | +| | Product Account Type/Hạng tài khoản | Product Account Type Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account types for the selected account level of the selected customer. Refer “==tbd== “ API | Drop-down Select one List all account type in the OLS system by selected Account level. Refer “Product Account Type” API under Code Maintenance service | +| | Account Number /Số tài khoản | Product Account Number Condition filed This field is only active and required if txn is posted by Account. | Drop-down Select one List all account number for selected account type of selected customer Refer “Account “ API under Customer Management service | Drop-down Select one List all account number for selected account type in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of Card number to find card. Refer “Product Account” API under Customer Management. | +| | CIF number /Số CIF | CIF number Condition filed This field is only active and required if txn is posted by Customer. | Read only This is selected CIF Number | Drop-down Select one List all CIF number in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of CIF number to find CIF. Refer “Customer Profile” API under Customer Management. | +| | Quick view/Xem nhanh | Click on each quick view icon (balance or Buket Balance Detail View) to retrieve the available balances of the customer after entering the card/account/CIF number. The details will be displayed in the right panel. See more in Quick view part Show error message if Requesting Card/Account/CIF is invalid.t With Edit/Create mode the system will expand / collapse on the same screen to user can see and continue input needed information as illustrated following: [Image Removed] With View/Approve/Reject mode the system will show detail as pop-up when click on each quick view icon as illustrated following: [Image Removed] | Hyperlink/Icon | | +| | Adjustment Quantity is +ve/-ve \*/ Điều chỉnh âm/dương | Indicates whether the adjustment is a positive adjustment or a negative adjustment | Drop-down Select one Lookup value from “Code\_Management” table Refer “list-by-code-type” API with code type is “adj-type” | | +| | Store \*/Đơn vị/Cửa hàng | The store of transaciton | Drop-down Select one Lookup active Store record from “Store” screen Refer “Store” API under Merchant Managemant. | | +| | Pool Id \*/Mã pool | The pool to be adjusted Should respect pool entity level For example: Cant posted txn by Account if pool to be adjusted is card- entity level pool. | Drop-down Select one | | +| | Transaction Date\*/Ngày giao dịch | Transaction date | Time picker within time also DD-MM-YYYYY HH:MM:SSS Allow user input from keybroad | | +| | Expiry Date \*/Ngày hết hạn | This is the expiry date of the new bucket after the expired points have been adjusted. Present for postive adjustment only Show the balance bucket based on transaciton Date and expire policy of adjusted pool. When update transaction date / Card number (Account /CIF) OR Pool then this value should be automation updated. Allow user modify this value | Time picker without time DD-MM-YYYY Allow user input from keybroad | | +| | Bucket Expiry Date/ … | This is the expiry date of the bucket will be deduct poitn. Present for negative adjustment only If not selected then follow by TP processing for Redemption/Negative adjustment approach. If selected then just adjust on the selected bucket. | Drop-down Select one Loopkup value from customer balance based on adjusted pool/selected card. | | +| | Adjustment Quantiy \* /Số lượng điều chỉnh | The pool units by which to adjust the pool balance. | 9(12,2) Should be greater than 0 if provided | | +| | Reason Code \*/Mã lí do điều chỉnh | The Reason Code is a drop-down providing a set of pre-defined reason codes to explain the reason for the adjustment. | Drop-down Lookup value from Reason Code screen | | +| | Transaction Code \*/Mã giao dịch | OLS transaciton code of transaction | Drop- down Lookup value from OLS Transaction Code screen | | +| | Remarks/Ghi chú | A description of the adjustment. | X(100) | | +| **Quick view** **Balance Detail View** [Image Removed] Show pool bucket balances take into account the entity level in the display. If posted txn by Card then : Show pool bucket balances take into Card considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected card for customer entity- level pool. 2. Get all balance buckert of Account of the selected card for account entity-level pool 3. Get the balance bucket of the selected card only for the card entity-level pool. If posted txn by Account then : Show pool bucket balances take into Account considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected Account for customer entity -level pool. 2. Get all balance of Account of selected card for account entity- level pool 3. Card pool –entity level should not be present. If posted txn by CIF number then: Get all customer – entity level pool balance bucket of chosen customer. Card and account pool entity-level should not be present. **Noted that: Each row represent each pool which take into account the entity level in the display** **Use processing date to determine available balance which ready to be redeemed.** | | | | | +| | Pool ID | Pool ID | Lookup value from LAB table | | +| | Balance | Total balance buckets of a reward pool of customer. Show up to the pool entity level | Display as number format Lookup value from LAB table | | +| | Redeemable Balance | The sum all non-balance buckets of a pool of customer. Show up to the pool entity level | Display as number format Lookup value from LAB table | | +| | Earliest Exp Bal and Date | The earliest expiring bucket date for a pool, for non-0 balance buckets. Show up to the pool entity level And Balance that is expiring on The earliest expiring bucket date. The balanace should not be zero balance. | Display as number format Lookup value from LAB table | | +| **Bucket Balance Detail View** [Image Removed] The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool of the customer, regardless of Entity Level | | | | | +| | Account number | Product Account No | Display Present for all pool entity-level | | +| | Product Account Type | Combination of Product Account Type and Product Account level of Account | +| | Product Account level | +| | Card Number | Card number | Display Present for Card pool entity level only If there are more than Card under the same Plastic Serial Number then the newest cards is present. | | +| | Pool ID | Pool ID | Display Loopkup value from LAB table. | | +| | Balance | Non zero balance | Display Loopkup value from LAB table. | | +| | Expiry Date | Expring date | Display Loopkup value from LAB table | | + +* + - 1. Edit Action just be applied for Pending/Rejected record. + 2. For Active Record just view only. + 3. After the transaction has been saved, it is put in the pending tab. + 4. An authorised user has to retrieve the transaction and approve it before it is processed and pool is updated: + +**Based on entity level/account selection alog** + +* 1. For postive adjustment transaction then: + + If have negative balance bucket then adjusted point used to offset negative balance bucket to 0 first. + + The remaining points will be added for selected bucket. + 2. For negative adjustment transaction then: + +[Image Removed] + +* + - 1. Approved transaction is putted in the active tab. + +### Post-Conditions + +* + - Pool balance buckets are updated. + - Transaciton is posted and viewable on the transaction history screen. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + 2. Transaciton is rejected by TP validation such as block code validation, ATG validation … + +## Transfer balance + +### Requirement Definition + +1. Transfer balance transactions can be manually posted through the Customer Management module in the administration screen function under. +2. Change in UI/UX and change to support both user can transfer balance from their account to other customer or transfer between its own self. + +### Process Flow + +[Image Removed] + +### Trigger + +* + 1. The user would like to review/verify the manually transferred points from a customer to another customer or between the customer's own accounts/cards. + +### Pre-Conditions + +1. User have to have the access rights in both “Customer Profile” and “Transfer Balance” modules under “Customer Mangement” Group in order to view this screen. +2. Users must select a customer on the customer profile listing page to access the "Transfer Balance" tab. +3. Depending on the user’s access rights, they can view/add/Edit or Approve manually transfer points transaction records. + +### Wireframe + +* + - 1. Summary listing page + +[Image Removed] + +* + - 1. View detail form + +[Image Removed] + +* + - 1. Create/Edit form + +[Image Removed] + +### Business Rules + +1. Click on the “Transfer Balances” tab in the “Customer Profile “screen to bring up the screen for accessing the Transfer Points listing page. The detail is illustrated in the [wireframe](#_Wireframe_10). +2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for the Transfer Balance screen is illustrated in the [wireframe](#_Wireframe_10). +3. Noted that the Edit icon (!) and Delete icon just display for pending and rejected records only. +4. The point transfer function will transfer all pools linked directly from the “From” to the “To”. +5. Expiry Dates will be preserved unless a specific date is provided. +6. User stories and acceptance criteria + +[Image Removed] + +1. F**orm descriptions:** + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field** | **Descriptions** | **Data type** | +| | Transfer mode \*/ Phương thức điều chuyển | Use transfer mode to determine the relationship between from transfer source and the transfer destination. Check on the “Internal” mode to transfer balances itself. Check on the “External” mode to transfer the balance from a customer to another customer in the OLS system. Use Application Parameter to allow/disallow transfer mode: Apply both or only Internal or only external | Radio button Default “Internal” transfer Lookup value from “Code\_Management” table where code type is ‘transfer-mode’. Refer “list-by-code-type” API under Master Data. | +| | Transfer Type\*/Loại điều chuyển | Condition field Depend on Transfer Mode to disable/enable as follows: Note: “X” stands for enable | | | | | | --- | --- | --- | --- | | **Transfer mode** | **Transfer Type disable/enable** | | | | **Card** | **Account** | **Client** | | Internal | X | X | | | External | X | X | x | | Radio button Default “Card”. Lookup value from “Code\_Management” table where code type is ‘entity-lvl’. Refer “list-by-code-type” API under Master Data. | +| | From \*/Từ | A card/Account/CIF number must be present which depends on the transfer mode. | Drop-down Select one | +| | Product Account Type /Hạng tài khoản | Condition filed This field is only active and required if transferred by Account. This is the product account type of the selected source account | Drop-down Select one | +| | Product Account level /Cấp tài khoản | Condition filed This field is only active and required if transferred by Account. This is the product account level of the selected source account | Drop-down Select one | +| | Quick view/Xem nhanh | Click on each quick view icon to retrieve the available balances of the customer after entering/selecting the card number. The details will be displayed in the right panel. See more in the Quick view part Show an error message if the Requesting Card is invalid. With Edit/Create mode the system will expand/collapse on the same screen to user can see and continue input needed information but with View/Approve/Reject mode the system will show detail as pop-up when click on each quick view icon See more in Quick view part | Hyperlink | +| | To \*/Đến | Card /Account/CIF number must be present which depened on transfer mode. If Transfer Type is “Account” then Account type is present. | Drop-down Select one | +| | Product Account Type /Hạng tài khoản | Condition filed This fild is only active and required if transfer by Account. This is product accout type of selected destination Account | Drop-down Select one | +| | Product Account level /Cấp tài khoản | Condition filed This fild is only active and required if transfer by Account. This is product accout level of selected destination Account | Drop-down Select one | +| | Pool ID\*/Mã pool | The pool from which to transfer Just show the pool of “From” balance buckets as following: X: Display | | | | | | --- | --- | --- | --- | | **Transfer Type** | **Pool balance bucket of “From” Customer.** | | | | **Pool Level Card** | **Pool level Account** | **Pool Level cust** | | Card | X Display distinct Card- entity Pool of balance bucket of Inputed card only | X Display distinct account -entity Pool of balance bucket of Account of Inputed card | X Display distinct customer -entity pool of balance bucket of customer of inputed card | | Account | | X Display distinct account- entity Pool of balance bucket of inputed account only | X Display distinct customer- eintiy pool of balance bucket of customer of inputed account | | Client | | | X Display distinct customer-entity pool of balance bucket of inputed CIF Number | | Drop- down Based on Transfer Type and “From” to lookup pool from LAB and Pool Definition table. | +| | Store\*/Cửa hàng-Đơn vị | The store which transaciton is logged | Drop -down Lookup value from Store screen- Store table. Refer “Store” API under Merchant Management | +| | Amount to Transfer \*/Mức điều chuyển | The amount to transfer. Defaults to the whole pool balance. | 9(14,2) Should be greater than 0 if provided | +| | Expiry Date (after transfer)/Ngày hết hạn | The expiry date of the points after the transfer. By default the expiry date will be the source expiry date. | Date time | +| | Transaction Code\*/Mã giao dịch | OLS transaction code which transaction is logged | Drop -down Lookup value from OLS TC screen. Refer “OLS Transaction Code” API under Campaign Management | +| | Reason Code \*/Mã lí do điều chuyển | Select from a list of pre-defined codes to identify the reason for the transfer | Drop-down Lookup value from Reason Code screen (Reason\_Code table). Refer “Reason Code” API under Code Maintenance | +| | Remarks/Ghi chú | Remarks to be appended to the transaction, for reference | Text box X(100) | +| **Bucket Balance Detail view of Source** The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool, regardless of Entity Level | | | | +| | Account number/Số tài khoản | Product Account No | Display Present for all pool entity level | +| | Product Account Type/Hạng tài khoản | Combination of Product Account Type and Product Account level of Account. | Display Present for all pool entity level | +| | Product Account level/Cấp tài khoản | +| | Card Number/Số thẻ | Card number | Display Present for Card pool entity level only If found more than one Card under the same Plastic Serial Number then the newest card is present. | +| | Pool ID/Mã pool | Pool ID | Display Loopkup value from LAB table. | +| | Balance /Số dư | Non zero balance | Display Loopkup value from LAB table. | +| | Expiry Date/Ngày hết hạn | Expring date | Display Loopkup value from LAB table | +| **Bucket Balance Detail view of Destination** The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool, regardless of Entity Level | | | | +| | Account number/Số tài khoản | Product Account No | Display Present for all pool entity level | +| | Product Account Type/Hạng tài khoản | Combination of Product Account Type and Product Account level of Account. | Display Present for all pool entity level | +| | Product Account level/Cấp tài khoản | +| | Card Number/Số thẻ | Card number | Display Present for Card pool entity level only If found more than one Card under the same Plastic Serial Number then the newest card is present. | +| | Pool ID/Mã pool | Pool ID | Display Loopkup value from LAB table. | +| | Balance /Số dư | Non zero balance | Display Loopkup value from LAB table. | +| | Expiry Date/Ngày hết hạn | Expring date | Display Loopkup value from LAB table | + +1. After the transaction has been saved, it is put in the pending list. +2. An authorised user has to retrieve the transaction and approve it before it becomes effective. +3. OLS will validate the status permission and block code permission for both “From” and “To”, the transfer transaction will be rejected if any permission disallowed to perform adjustment. +4. Transfer transaction will be rejected if Pool balance of “From” is insufficient. +5. The Approved transfer transaction is logged as Adjustment transactions and following by TP processing: + 1. Each bucket in the “From” is transferred as a negative adjustment to the “From” and logged as a positive Adjustment to the “To”. + 2. The Reason Code will be selected from a list of Adjustment Reason codes. + 3. The Adjustment Reason Code is important for determining the GL posting accounts. + +### Post-Conditions + +* + 1. Pool balance buckets are updated. + +### Exception Flow + +* + 1. Pool balance of “From” is insufficent. + 2. Transaciton is rejected by TP validation such as block code validation, ATG validation … + 3. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Re-instatement + +### Requirement Definition + +1. This screen is used to re-instatement for expired balance bucket which have not been forfeited. +2. If balance have been forfeited, then “re-instatement” does not apply and an adjustment transaction should be used to return points to the customer. + +### Process Flow + +[Image Removed] + +### Trigger + +* + - 1. User want to review/verify Re-Instatement transaction + 2. User want to re-instate expired bucket. + +### Pre-Conditions + +1. User have to have access righsts in s both “Customer Profile” and “Re-Instatement” modules under “Customer Mangement” Group in order to view this screen. +2. Users must select a customer on the customer profile listing page to access the "Re-Instatement" tab. +3. Customers have pool expired bucket which have not been forfeited. +4. Depending on the user's access rights, they can view, add, edit, or approve manually Re-Instatement Transaction records. + +### Wireframe + +* 1. Summary listing page + +[Image Removed] + +* 1. Record detail view + +[Image Removed] + +* 1. Create/Edit form + +[Image Removed] + +### Business Rules + +1. Click on the “Re-Instatement” tab in the “Customer Profile “sreen to bring up the screen for accessing the Re-Instatement listing page. The detail as illustrated in the [wireframe](#_Wireframe_11). +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Re-Instatement screen is illustrated in the [wireframe](#_Wireframe_11). +3. User stories and acceptance criteria + +[Image Removed] + +1. Noted that Edit icon (!) and Delete icon just display for pending and rejected record only. +2. Form description: + +| **Seq** | **Field** | **Description** | **Data type** | | +| --- | --- | --- | --- | --- | +| | Posted transaction by\*/ Tạo giao dịch bởi | Transacting Account/Customer identifier. Only one of the following 3 (CIF Number, Account , Card Number) must be provided | Radio button Default posted by Card Lookup value from “Posted txn by” type code in master data | | +| | | | **Under customer management** | **Under Transaction Management** | +| Card Number/Số thẻ | Any of the customer's card numbers. Condition filed This field is only active and required if txn is posted by Card. | Drop -down Select one List all card of selected customer | Drop-down Select one Put any Card number in OLS system. Default emptu to avoid performance issue then user must enter at least 4 digits of Card number to find card. | +| Product Account Level/Loại tài khoản | Product Account Level Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account level for all accounts of selected customer. | Drop-down Select one List all account level in the OLS system. | +| Product Account Type/Hạng tài khoản | Product Account Type Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account types for the selected account level of the selected customer. | Drop-down Select one List all account type in the OLS system by selected Account level. | +| Account Number /Số tài khoản | Product Account Number Condition filed This field is only active and required if txn is posted by Account. | Drop-down Select one List all account number for selected account type of selected customer | Drop-down Select one List all account number for selected account type in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of Card number to find card. | +| CIF number /Số CIF | CIF number Condition filed This field is only active and required if txn is posted by Customer. | Read only This is selected CIF Number | Drop-down Select one List all CIF number in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of CIF number to find CIF. | +| | Quick view /Xem nhanh | Click on each quick view icon (balance or Buket Balance Detail View) to retrieve the available/expired balances of the customer after entering the customer information. The details will be displayed in the right panel. See more in Quick view part Show error message if Requesting Card/Account/CIF are invalid. With Edit/Create mode the system will expand / collapse on the same screen to user can see and continue input needed information as illustrated following: [Image Removed] With View/Approve/Reject mode the system will show detail as pop-up when click on each quick view icon as illustrated following: [Image Removed] | Hyperlink | | +| | Store \*/Cửa hàng\_Đơn vị | Store | Drop -down Select one | | +| | Pool Id \*/Mã pool | The pool to be adjusted. The pool of the bucket to Re-instate. Just list the pool have balance which has already expired, but are still within the grace period (haven’t forfeited), while respecting the pool entity-level based on transfer mode. E.g Use account to re-instate then cant select card pool entity-level | Drop-down Select one | | +| | Bucket to Re-instate \*/Số lô cần gia hạn | The drop-down displays the expired buckets of the selected pool which have not been forfeited The bucket to be re-instated must be selected individually and the new expiry date must be provided in the “Expiry Date” field. | Drop-down Select one Lookup value based on LAB table. | | +| | Expiry Date \*/Ngày hết hạn | This is the expiry date of the new bucket after the expired points have been re-instated. | Date The date format must adhere to the configured format | | +| | Reason Code \*/Mã lí do | The Reason Code is a drop-down providing a set of pre-defined reason codes to explain the reason for the re-instatement. | Drop-down Select one Lookup value from Reason Code screen with Reason type is Re-instatement Refer “Reason Code” API under Code Maintenance | | +| | Remarks/Ghi chú | Additional remarks on the re-instatement. | X(100) | | +| Quick View Expired Balance Detail This part display Expired bucket which haven’t been forfeited of selected/inputted acccout/Card/CIF. The expired pool bucket balances should take into account the entity level in the display. **If use Card to post re-instatement txn then:** * + 1. Get all expired balance buckets of customer regardless selected/inputed card for Customer entity level pool 2. Get all balance expired buckets of Account of selected/inputed card for Account entity level pool 3. Get all blance expired buckets of selected/inputed card only for Card entity level pool If **use Account to post re-instatemeen txn then:** * + 1. Get all balance expired buckets of customer regardless selected/inputed account for Customer entity- level pool 2. Get all balance expired buckets of selected/inputed account for Account entity -level pool. 3. Card pool entity-level should not be present. If **use CIF numebr to post re-instatemeen txn then** get all customer – entity level pool expired balance bucket of chosen customer. Card and account pool entity-level should not be present. Take note that: Use Processing Date to compare with expiry date to located eligible pool balance bucket. **Each row represent each pool which take into account the entity level in the display** | | | | | +| | Pool ID/Mã pool | Pool ID | Display Lookup value from LAB table via selected Card. | | +| | Balance /số dư | Total Expired balance | +| | Expiry Date/Ngày hết hạn | Expiry date | +| **Bucket Balance Detail view** The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool, regardless of Entity Level | | | | | +| | Account number/Số tài khoản | Product Account No | Display Present for all pool entity level | | +| | Product Account Type/Hạng tài khoản | Combination of Product Account Type and Product Account level of Account. | Display Present for all pool entity level | | +| | Product Account level/Cấp tài khoản | +| | Card Number/Số thẻ | Card number | Display Present for Card pool entity level only If found more than one Card under the same Plastic Serial Number then the newest card is present. | | +| | Pool ID/Mã pool | Pool ID | Display Loopkup value from LAB table. | | +| | Balance /Số dư | Non zero balance | Display Loopkup value from LAB table. | | +| | Expiry Date/Ngày hết hạn | Expring date | Display Loopkup value from LAB table | | + +1. After the transaction has been saved, it is put in the pending list. +2. An authorised user has to retrieve the transaction and approve it before it becomes effective. +3. The re-instatement will be posted as an Adjustment, with the Reason Code set to the selection. +4. The balance in the expired buckets will be set to 0. +5. If the bucket with the required expiry date exists, the adjustment amount will be added to the bucket. +6. Otherwise, a new bucket with the new expiry date as entered in the Re-instatement edit form is created with the balance from the expired bucket. + +### Post-Conditions + +### Exception Flow + +* + 1. Transaciton is rejected by TP validation such as block code validation, ATG validation … + 2. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Item Redemption + +### Requirement Definition + +1. Customers call the customer service (call center) and requests to redeem an item, giving identification and item code. +2. Item redemption requests are processed against the catalogue item set-up parameters. The details are described against the relevant parameter in the catalogue item set-up description in section 7. +3. All redemptions are in real-time. +4. Redemption through administration screens that requires approval is real-time only at time of approval. + +### Process Flow + +[Image Removed] + +### Trigger + +* + - 1. Users use this screen to assist customers in exchanging points for items. + 2. Users want to review and verify the redemption item transaction details of customers, which includes all online transactions via the OA screen or M as well. + +### Pre-Conditions + +1. Users have to have access rights in both “Customer Profile” and “Item Redemption Entry” modules under “Customer Mangement” Group in order to view this screen. +2. Users must select a customer to access the “Item Redemption Entry” tab. +3. Depending on the user's access rights, they can view, add, edit, or approve manually Item Redemption Transaction records. + +### Wireframe + +* 1. Summary listing page + +[Image Removed] + +* 1. Record detail view + +[Image Removed] + +Click on each item to bring up item detail view + +[Image Removed] + +* 1. **Create** + +**Step 1: Add General information** + +[Image Removed] + +[Image Removed] + +**Step 2: Add Physical /Evoucher item** + +[Image Removed] + +[Image Removed] + +**Step 2: Add Miles item** + +[Image Removed] + +[Image Removed] + +**Step 2: Add cash rebate item** + +[Image Removed] + +[Image Removed] + +**Step 2: Add other items** + +[Image Removed] + +[Image Removed] + +### Business Rules + +1. Click on the “Item Redemption Entry” tab in the “Customer Profile “screen to bring up the screen for accessing the Item Redemption Entry listing page. The detail as illustrated in the [wireframe](#_Wireframe_12). +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Re-Instatement screen is illustrated in the [wireframe](#_Wireframe_12). +3. User can’t modify transaction after transaction is posted. +4. User stories and acceptance criteria + +[Image Removed] + +1. Screen descriptions: + +| | | | | | +| --- | --- | --- | --- | --- | +| **Seq** | **Field** | **Description** | **Data type** | | +| **General information** | | | | | +| | Posted transaction by\*/ Tạo giao dịch bởi | Transacting Account/Customer identifier. Only one of the followings: (CIF Number, Account , Card Number) must be provided | Radio button Default posted by Card Lookup value from master data | | +| | Condition fileds as following descriptions | | **Under customer management** | **Under Transaction Management** | +| Card Number/Số thẻ | Any card belonging to the customer can be used for making a redemption Condition filed This field is only active and required if txn is posted by Card. | Drop -down Select one List all card of selected customer | Drop-down Select one Put any Card number in OLS system. Default emptu to avoid performance issue then user must enter at least 4 digits of Card number to find card. | +| Product Account Level/Loại tài khoản | Product Account Level Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account level for all accounts of the choosen customer. | Drop-down Select one List all account level in the OLS system. | +| Product Account Type/Hạng tài khoản | Product Account Type Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account types for the selected account level of the choosen customer. | Drop-down Select one List all account type in the OLS system by selected Account level. | +| Account Number /Số tài khoản | Product Account Number Condition filed This field is only active and required if txn is posted by Account. | Drop-down Select one List all account number for selected account type of selected customer | Drop-down Select one List all account number for selected account type in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of Card number to find card. | +| CIF number /Số CIF | CIF number Condition filed This field is only active and required if txn is posted by Customer. | Read only This is selected CIF Number | Drop-down Select one List all CIF number in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of CIF number to find CIF. | +| | Quick view /Xem nhanh | Click on each quick view icon (Balance Detail or Buket Balance Detail View Or Expired Balance View) to retrieve the available balances of the customer after entering the card number. The details will be displayed in the right panel. See more in Quick view part Show error message if Requesting Card invalid. | Hyper link | | +| | Redemption Channel \*/Kênh đổi thưởng | Redemption Channel | Drop-down Select one Lookup value from master data | | +| | Redemption Date \*/Ngày đổi thưởng | The redemption transaction date | Date time Date time format must respect the date configuration format | | +| | Store\*/Đơn vị | The drop-down list to select any acitive Store in the OLS. Redemption Transaciton will be logged under this store. | Drop -down Select one | | +| | Appliable Fee/ Áp dụng phí | The fee will be applicable for this transaction if item has a fee See more about fee on Item price section. | Switch button Default OFF | | +| **Item details** | | | | | +| | Catalogue Code\*/Nhóm vật phẩm | The drop-down to select the effected catalog | Drop – down Select one Use Redemption Date to determine effected catalogue. | | +| | Item\*/Vật phẩm | The drop-down to select the item code to be redeemed. The item must belong to the selected catalogue. Display an error message if item has no matched price. | Drop-down Select one Use Redemption Date and selected catalogue to determine effected item. From selected item and inputed data to determine price of the item. Please refer Item price to get more detail | | +| | Redemption Mode\*/Loại đổi thưởng | A drop-down list with the following choices: * Fixed Partial (Cash + Points) * Fixed Points If Price configuration did not allow Partial Redeem then just Fixed Partial is disable. If Price configuration allow “Partial Redemption” mode then both mode are enable. | Radio button Defaut fixed points Look up value from master data | | +| | Unit Price \*/Giá mỗi đơn vị | Point required **For Fixed points Mode then this is Price in point in item price configuration and user can’t change.** **For Fixed Partial Mode, the sytem must automation populate than “Minimum Partial Redeem Points” in item price configuration and user can modify this value but Unit Price must be equal to or greater than “Minimum Partial Redeem Points”.** | 9(12,2) | | +| | Unit Cash Amount required./Tiền phải trả mỗi đơn vị | Condition field This field is only active and required Fixed Partial mode only. The system must automation populate as: ( **Full Price in Point – Unit Price** ) \* **Price in Cash (per point) ( from item Price Configuration)** | Display | | +| | Unit Face value/Giá trị mỗi đơn vị | Condition field Active only when this item required face value on the configruration **Get face value from Item price cofiguration with higher priority. Otherwise this is base face value from item master.** | Display as 9(14,2) format | | +| | Quantity on hand/Số lượng còn lại | Available item can be redeemed. Just display if the item is tracked by quantity. | Display as 9(9) format | | +| | Redemption Quantity\*/Số lượng đổi thưởng | Redemption quantity If the item is tracked by quantity, then the redemption quantity must not be greater than the quantity on hand. Don’t allow to redeem if redemption quantity is greater than quantity on hand | 9(5) Should be greater than 0 if provided | | +| | Total price\*/Tổng cộng | **The system must automation populate as Unit Price \* redemption quantity** | Display | | +| | Total Cash amount required/Tổng tiền phải trả | Condition field This field is only active and required Fixed Partial mode only. **The system must automation populate as** **Unit Cash Amount required\* Quantity.** | Display | | +| | Total face value/ Tổng giá trị | Condition field. Active only when this item required face value on the configruration **The system must automation populate as** **Unit Face value \* redemption quantity** | Display as 9(14,2) format | | +| | FFP Ship number/ Mã số thẻ | FFP ship number | X(50) Condition fields Display and required for Miles items and should be configurable. Automation populate value from Attribute value based on configuration attribute ID and allow user modify this one. These fields to be used to send to partner. | | +| | FFP First Name/Tên | FFP First Name | +| | FFP last name /Họ | FFP last name | +| | Delivery Address/Địa chỉ | Delivery Address 1 Condition field Only active for Evoucher item and Physical item Auto populate from customer’s address 1 and allow user modify. | X(100) | | +| | Zip code/Mã bưu điện | Zip code Condition field Only active for Evoucher item and Physical item. Auto populate from customer’s Zip code and allow user modify. | Drop-down Select one | | +| | Recipient Name/Người nhận | Recipient Name Condition field Only active and required for Evoucher item and Physical item. Auto populate from customer’s Full Name and allow user modify. | X(50) | | +| | Email adress /Địa chỉ email | Email address Auto populate from customer’s email and allow user modify. | X(50) | | +| | Mobile Phone/Số điện thoại | Mobile Auto populate from customer’s email and allow user modify. | X(50) | | +| | Remark/ Ghi chú | Additional remarks on the item redemption transaction | X(100) | | +| **Quick view** **Balance Detail View** [Image Removed] Show pool bucket balances take into account the entity level in the display. If posted txn by Card then : Show pool bucket balances take into Card considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected card for customer entity- level pool. 2. Get all balance buckert of Account of the selected card for account entity-level pool 3. Get the balance bucket of the selected card only for the card entity-level pool. If posted txn by Account then : Show pool bucket balances take into Account considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected Account for customer entity -level pool. 2. Get all balance of Account of selected card for account entity- level pool If posted txn by CIF number then: Get all customer – entity level pool balance bucket of chosen customer. **Noted that: Each row represent each pool which take into account the entity level in the display** **Use processing date to determine available balance which ready to be redeemed.** | | | | | +| | Pool ID | Pool ID | Lookup value from LAB table | | +| | Balance | Total balance buckets of a reward pool of customer. Show up to the pool entity level | Display as number format Lookup value from LAB table | | +| | Redeemable Balance | The sum all non-balance buckets of a pool of customer. Show up to the pool entity level The balance bucket must be non-expired and available to use. | Display as number format Lookup value from LAB table | | +| | Earliest Exp Bal and Date | The earliest expiring bucket date for a pool, for non-0 balance buckets. Show up to the pool entity level And Balance that is expiring on The earliest expiring bucket date. The balanace should not be zero balance. | Display as number format Lookup value from LAB table | | +| **Bucket Balance Detail View** The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool of the customer, regardless of Entity Level | | | | | +| | Account number | Product Account No | Display Present for all pool entity-level | | +| | Product Account Type | Combination of Product Account Type and Product Account level of Account | +| | Product Account level | +| | Card Number | Card number | Display Present for Card pool entity level only If there are more than Card under the same Plastic Serial Number then the newest cards is present. | | +| | Pool ID | Pool ID | Display Loopkup value from LAB table. | | +| | Balance | Non zero balance | Display Loopkup value from LAB table. | | +| | Expiry Date | Expring date | Display Loopkup value from LAB table | | +| Expired Balance Detail This part display Expired bucket which haven’t been forfeited of selected/inputted acccout/Card/CIF. The expired pool bucket balances should take into account the entity level in the display. **If use Card to post re-instatement txn then:** * + 1. Get all expired balance buckets of customer regardless selected/inputed card for Customer entity level pool 2. Get all balance expired buckets of Account of selected/inputed card for Account entity level pool 3. Get all blance expired buckets of selected/inputed card only for Card entity level pool If **use Account to post re-instatemeen txn then:** * + 1. Get all balance expired buckets of customer regardless selected/inputed account for Customer entity- level pool 2. Get all balance expired buckets of selected/inputed account for Account entity -level pool. 3. Card pool entity-level should not be present. If **use CIF numebr to post re-instatemeen txn then** get all customer – entity level pool expired balance bucket of chosen customer. Card and account pool entity-level should not be present. Take note that: Use Processing Date to compare with expiry date to located eligible pool balance bucket. **Each row represent each pool which take into account the entity level in the display** | | | | | +| | Pool ID/Mã pool | Pool ID | Display Lookup value from LAB table via selected Card/Account/Customer | | +| | Balance /số dư | Total Expired balance | +| | Expiry Date/Ngày hết hạn | Expiry date | +| **Bucket Balance Detail view** The same as [Balance enquiry](#_Balance_Detail_Enquiry) Display all buckets of the Pool, regardless of Entity Level | | | | | +| | Account number/Số tài khoản | Product Account No | Display Present for all pool entity level | | +| | Product Account Type/Hạng tài khoản | Combination of Product Account Type and Product Account level of Account. | Display Present for all pool entity level | | +| | Product Account level/Cấp tài khoản | +| | Card Number/Số thẻ | Card number | Display Present for Card pool entity level only If found more than one Card under the same Plastic Serial Number then the newest card os present. | | +| | Pool ID/Mã pool | Pool ID | Display Loopkup value from LAB table. | | +| | Balance /Số dư | Non zero balance | Display Loopkup value from LAB table. | | +| | Expiry Date/Ngày hết hạn | Expring date | Display Loopkup value from LAB table | | + +### Post-Conditions + +* + 1. Transactions are logged into the related table in the database. The transaction listing includes not only transaction which to be posted under the OA but also transaction to be posted from the member site. + 2. Balance are updated. Quantity on hand are updated if transaction is posted successfully in the system. + 3. The net transaction of the redemption transaction is the sum of the tax amount, total fee, and total cash required. + 4. At the end of day (EOD), all approved items include are output in a OLS output file to be sent to parnter to be tracking or created back to the account/customer used in the item redemption, etc. + 5. TP process to approve Transaction + +[Image Removed] + +### Exception Flow + +* + 1. Transaciton is rejected by TP validation such as block code validation, ATG validation… + 2. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Award Transaction + +### Requirement Definition + +### Process Flow + +Process follow for award transaction (Award service on TP side: ) + +[Image Removed] + +### Trigger + +### Pre-Conditions + +### Wireframe + +* + - 1. Create /Edit + +[Image Removed] + +### Business Rules + +1. Click on the “Award Transaction” tab in the “Customer Profile” screen to bring up the screen for accessing the Award Transaction Entry listing page. The detail as illustrated in the [wireframe](#_Wireframe_10). +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Re-Instatement screen is illustrated in the [wireframe](#_Wireframe_10). +3. Noted that Edit icon (!) and Delete icon just display for pending and rejected record only. +4. User stories and acceptance criteria + +[Image Removed] + +1. Screen descriptions: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Descriptions** | **Data type and data source** | +| | Posted transaction by\*/ Tạo giao dịch bởi | Transacting Account/Customer identifier. Only one of the following 3 (CIF Number, Account , Card Number) must be provided | Radio button Default posted by Card Lookup value from “Posted txn by” type code in master data | | | +| | Condition fileds as following descriptions | | Under Customer profile | | Under Transaction Management | +| Card Number/Số thẻ | Any of the customer's card numbers. Condition filed This field is only active and required if txn is posted by Card. | Drop -down Select one List all card of selected customer | Drop-down Select one Put any Card number in OLS system. Default emptu to avoid performance issue then user must enter at least 4 digits of Card number to find card. | | +| Product Account Level/Loại tài khoản | Product Account Level Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account level for all accounts of selected customer. | Drop-down Select one List all account level in the OLS system. | | +| | Product Account Type/Hạng tài khoản | Product Account Type Condition Filed This field is only active and required if txn is posted by Account. | Drop-down Select one List distinct account types for the selected account level of the selected customer. | Drop-down Select one List all account type in the OLS system by selected Account level. | | +| Account Number /Số tài khoản | Product Account Number Condition filed This field is only active and required if txn is posted by Account. | Drop-down Select one List all account number for selected account type of selected customer | Drop-down Select one List all account number for selected account type in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of Account number to find card. | | +| CIF number /Số CIF | CIF number Condition filed This field is only active and required if txn is posted by Customer. | Read only This is selected CIF Number | Drop-down Select one List all CIF number in the OLS system. Default empty to avoid performance issue then user must enter at least 4 digits of CIF number to find CIF. | | +| | Quick view | Click on each quick view icon “Balance” to retrieve the available balances of the customer after entering the card/account/CIF number. The details will be displayed in the right panel. See more in Quick view part With Edit/Create mode the system will expand / collapse on the same screen to user can see and continue input needed information as illustrated following: [Image Removed] With View/Approve/Reject mode the system will show detail as pop-up when click on each quick view icon as illustrated following: [Image Removed] | Hyperlink | | | +| | Transaction Code\* /Mã giao dịch | OLS Transaction Code This TC is used to locate the Campaign Rule to use for processing. | Drop-down Select one Lookup value from “Transaction\_Code” table. Refer “OLS Transaction Code” API under Campagin Management | | | +| | Transaction Date \*/Ngày giao dịch | Must be valid date. Transaction rejected if not valid. Transaction rejected if this date is older than sysdatetime by N days, where N is a system setting. | Date time | | | +| | Source Reference Number/Số giao dịch gốc | Source Transaction Reference Number Unique transaction identifier from source system | X(20) | | | +| | Store\*/Đơn vị/Cửa hàng | Transaction Store Id | Drop-down Select one Lookup value from “Store” table Refer “Store” API under merchant management | | | +| | Terminal /Thiết bị đầu cuối | Transaction Terminal Id | Drop-down Select one Lookup value from “Terminal” table Refer “Terminal” API under merchant management | | | +| | Transaction Amount\*/ Giá trị giao dịch | Transaction Gross amount Note: It is dependent on each project, Lets it be gross transaction amount first. | 9(14,2) Should be greater than 0 if provided | | | +| | Transaction Description/ Mô tả giao dịch | Shopname from Source system or OLS transaction description | X(100) | | | +| | Transaction Currency Code/ Mã tiền tệ giao dịch | It can be anpha code or number code. Let’s it be anpha code first | Drop-down Select one Lookup data from “Currency\_code” table Refer “Currency Code” API under Code Maintenance | | | +| | Transaction Mode/Phương thức giao dịch | Mode of transaction at point of payment | Radio button Lookup value from “Code\_Management” table where code type is “txn-mode’. Refer “get-by-code-type” API under master data | | | +| | POS Entry Mode/Phương thức thiết bị bán hàng | POS Entry Mode | X(04) This field is subdivided as follows: 0 – Unknow , 1- Manual (key entered) 3- Bar code ---Etc | | | +| | MCC code/Mã MCC | Merchant category code | Drop-down Select one Lookup value from “MCC” table Refer “MCC” API under merchant management | | | +| | Country Code/Mã quốc gia | Country code | Drop-down Select one Lookup value from “Country\_Code” table Refer “country code”API under Code Maintenance | | | +| | Salary Crediting Indicator/ Tài khoản nhận lương | Indicates bundled deposit account is receiving regular salary credits | Switch button Default OFF | | | +| | Transaction Channel/Kênh giao dịch | Transaction channel | Drop-down Select one Lookup value “Code\_Management” table where type code is “txn-channel” Refer “get-by-code-type” API under master data | | | +| **Quick view** **Balance Detail View** [Image Removed] Show pool bucket balances take into account the entity level in the display. If posted txn by Card then : Show pool bucket balances take into Card considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected card for customer entity- level pool. 2. Get all balance buckert of Account of the selected card for account entity-level pool 3. Get the balance bucket of the selected card only for the card entity-level pool. If posted txn by Account then : Show pool bucket balances take into Account considering entity level in the display: * + 1. Get all balance bucket of customer regardless selected Account for customer entity -level pool. 2. Get all balance of Account of selected card for account entity- level pool 3. Card pool –entity level should not be present. If posted txn by CIF number then: Get all customer – entity level pool balance bucket of chosen customer. Card and account pool entity-level should not be present. **Noted that: Each row represent each pool which take into account the entity level in the display** **Use processing date to determine available balance which ready to be redeemed.** | | | | | | +| | Pool ID | Pool ID | Lookup value from LAB table | | | +| | Balance | Total balance buckets of a reward pool of customer. Show up to the pool entity level | Display as number format Lookup value from LAB table | | | +| | Redeemable Balance | The sum all non-balance buckets of a pool of customer. Show up to the pool entity level The balance bucket must be non-expired and available to use. | Display as number format Lookup value from LAB table | | | +| | Earliest Exp Bal and Date | The earliest expiring bucket date for a pool, for non-0 balance buck Show up to the pool entity level And Balance that is expiring on The earliest expiring bucket date. The balanace should not be zero balance. | Display as number format Lookup value from LAB table | | | + +### Post-Codition + +Refer Process flow to get more detail for post-conditon when transaction is approved. + +### Exception -flow + +* + 1. Transaciton is rejected by TP validation such as block code validation, ATG validation. + 2. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + diff --git a/docs/specs/archive/introduction.md b/docs/specs/archive/introduction.md new file mode 100644 index 0000000..3075991 --- /dev/null +++ b/docs/specs/archive/introduction.md @@ -0,0 +1,45 @@ +--- +title: "Introduction" +type: OpenSpec +status: Draft +--- +# Introduction + +## Scope of Document + +## Terminology + +1. The following sets out the definition of terms which are used in this document: + +| | **Term** | **Definition** | +| --- | --- | --- | +| | Amount vs Quantity | * In OLS, “Amount” is used in connection with monetary amounts – i.e. when the unit of measure is an actual currency such as Dollars, Pesos, and Indonesian Rupiah etc. For example, “Transaction Amount” is the most frequently encountered “amount” entity. * Quantity is used to refer to the number of units of an entity, but not to monetary value. For example, the number of points awarded is typically referred to as the “Award Quantity”, and the number of points redeemed is the “Redeem Quantity”, whereas the value of the award is the “Award Amount” and the value of the redemption is the “Redeem Amount” | +| | Pool Blance Bucket (Bucket) | * It is used in the context of a Reward Pool Bucket, per bucket: based on pool entity level and expiring date to determine a pool balance bucket. | +| | Bucket Expiry Date | * If used in the context of a Counter, see Counter. * If used in the context of a Reward Pool Bucket, see Pool. | +| | Campaign Rule (Rule) | * A Rule is a business rule defining the conditions under which a reward will be given, including the type and quantity of reward. * The Rule includes a set of “**Rule Criteria**” that defines the conditions to be met in order that the quantity of rewards to be calculated with the formula and parameters that are defined in the “**Rule Formula**” is to be given to the customer. | +| | CEP | * “Counter Extract & Process” is a module for setting up job requests to extract a specified counter based on criteria set up in the request, and using the counter value as transaction amount, to form a transaction to process against Campaign Rules linked to the transaction through a Transaction Code and other Rule Criteria. * The module includes the corresponding batch processes to execute the requests. | +| | Contributor | * Identifies an entity which funds the rewards given under a given Rule. * One or more Contributors can be set up for rewards of each Rule. * If there is more than one Contributor for a Rule, the “**Rule Contributor Settings**” function is used to define the percentage of reward to be billed to each Contributor. The total contribution percentage must be 100%. * If the business entity with which the customer is transacting is the only Contributor for the rewards, then no setting has to be done in the “**Rule Contributor Settings**”, as BLP will consider the transacting entity as the default Contributor. * The Contributor setting is used in the end-of-day Contributor settlement report to calculate the amount due from each Contributor, for each reward transaction. | +| | Counter | * Counters are used to track customer’s transaction statistics. * Counters can be defined on demand to track a spend frequency or spend total for a given set of criteria. * For example, a Counter can be configured to track the number of transactions done by each customer in a specific Merchant Category Code or MCC. * If the count to be tracked is periodic – e.g. monthly – then the Counter can be configured to track the count for each period in a separate “**Counter Bucket**”, where each Counter Bucket has a “**Counter Bucket Date**” equal to the end date of the month. * What is tracked depends on which “**Counter Method**” is selected. * Counters are identified by “Counter Ids”. | +| | Effective Period | * Many parameters have a Start Date and End Date range during which the parameter is effective. * The general rule is that the Start Date starts on and after 00:00:00 hours and the End Date ends at 23:59:59. * Note that in BLP, time is considered a discrete quantity in seconds. * This definition applies for all cases where we have the “Start Date” and “End Date” parameters – e.g. campaign rules, currency rates, item price schedules, etc, where the corresponding start and end times are not specified. | +| | Expiry Policy | * See more on the Pool Definition section | +| | Formula | * This part of the Rule defines the calculation formula or formulae to be used for calculating the quantity (number of units in the Reward Pool – e.g. number of points, number of coupons) of reward to be given for a given transaction if the conditions set in the Rule Criteria are fulfilled. * The Formula comprises 2 parts: the Formula Header and the Formula Detail. * “**Formula Header**” defines a set of parameters to be adopted by all formulas selected in the Formula Detail – e.g. the maximum amount of reward to be given, the rounding rule (round down, round up, etc), the quantity to use for calculation (whether the Gross Amount or Nett Amount). * “**Formula Detail**” defines the details of the formula to be used in the calculations. Each Formula Detail can have one or more Formula. * **Execution Sequence**. A Rule has one or more Formula Details. Each Formula Detail is assigned an Execution Sequence number that determines the order in which the Formula is executed during transaction processing. The higher the numbers are executed first. | +| | Gross Amount | * See Transaction Amount. | +| | Pool | * Each type of reward – e.g. points or coupons, is tracked in a “**Pool**” or “**Reward Pool”**. * Each Reward Pool is associated with a “**Pool Expiry Policy**”, also referred to as “**Expiry Policy**”. * The Pool Expiry Policy selected for the Pool determines how the reward earned in that Pool is expired. * An example of a Pool Expiry Policy is “Expire 2 calendar quarters after earning”. * This would cause all the rewards earned in a given calendar quarter to be put in a Pool Bucket with an Bucket Expiry Date set to the end date 2 calendar quarters from the quarter in which the rewards were earned. * Rewards that expire on a given date are tracked in a separate “**Pool Bucket**”. * Example, if **Expiry Policy** for a Reward Pool is “Expire rewards 6 months from month of earning”, then all the points earned in each month will be stored in a separate bucket, each “Pool Bucket” having its own **Bucket Expiry Date**. * To meet the requirements of UNIRMs, new policy based on Card Types will be provided. For details of this, see “Expiry Policy” definition. | +| | REP | * “Redeem, Extract and Process” is a module for setting up a request to redeem a specified Pool, subject to criteria set up as part of the request, and to then output the redemption transaction details according to the selection set up in the request. | +| | Rule Criteria | * See Campaign Rule Criteria | +| | Rule Pool | * The Rule Pool is a Reward Pool which is updated with the results of the Rule Formula or Formulae. * Each Rule is associated with one Rule Pool. | +| | Transaction Amount | * Each transaction record in OLS for award processing has a mandatory column identified as the Transaction Amount. The Transaction Amount is used as the principal quantity for reward calculation in the Formula. * If the transaction is a payment transaction: + The Transaction Amount is the payment amount + If the transaction request includes a request to offset the payment amount by redeeming any available rewards, the amount remaining after deducting the available rewards value from the payment amount is referred to as the “**Nett Amount**”. + The payment amount before the deduction is the “**Gross Amount**”. * The Transaction Amount is always logged in OLS as the “Gross Amount”. | +| | OLS Transaction Code (TC) | * Each transaction record received in OLS for award processing has a column identified as the Transaction Code or TC. * The TC is used as the key to locate applicable Rules. * If no Rule is linked to TC, no reward calculation is done for that transaction. * TC is user-defined but it must be set up in the Transaction Code look-up table. | + +## Structure of Document + +The rest of this document is made up of the following sections: + +1. Introduction +2. OneAcess +3. Customer Management +4. Campaign Management +5. OneCatalouge +6. OneMarketing +7. OneTargeting + diff --git a/docs/specs/archive/oneaccess.md b/docs/specs/archive/oneaccess.md new file mode 100644 index 0000000..ae057cb --- /dev/null +++ b/docs/specs/archive/oneaccess.md @@ -0,0 +1,243 @@ +--- +title: "OneAccess" +type: OpenSpec +status: Draft +--- +# OneAccess + +## Overview + +1. OneAccess™ is the module for managing user access rights to OLS administration functions. +2. The Access control Management functions are comprised of: + +* User Group definition +* User Profile set-up (defining user IDs for logging into the system). +* Permission Management setup 2 permission type: Particular user/ User Group. + +1. Report permission + +* To identify reports each Permission Group is allowed to access. + +1. View filter Management + +Every screen can be configured with a filter based on the value of fields in the screen (View Filter). The View Filter restricts which fields in which screens are displayed to users in a User Group. The View Filter can also be used to block the entire view from the users in a User Group. + +**In phase 1, we are focusing on item #1 first and allow automation to approve when user/edit record.** + +## User Group + +### Business Requirement + +1. The User Group module is utilized to categorize users who share identical permissions within OLS. +2. Use this screen to define the group to be assigned to a particular user or group of users. When adding a new user to the system, select this group for that user. + +### Process Flow + +=TBD= + +### Trigger + +1. A new user group needs to be defined. +2. An existing user group needs to be modified or the user needs to review the existing group to make any decision. + +### Post –Condition + +1. Users have to have the access right on this screen to access this screen. +2. Depending on the user’s access rights, they can view/add/edit user group records. + +### Wireframe + +Please refer to the wireframe on the Figma. + +### Business Rules + +* + - * 1. The user group ID must be a unique value. + 2. If the required user group has not been defined, click on the User group icon in the Main Menu to bring up the summary list as illustrated in section [Wireframe](#_Wireframe_18) + 3. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for User Group is illustrated in section [Wireframe](#_Wireframe_18). + 4. Screen description: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Genneral information** | | | | +| | User Group ID\*/ Id nhóm người dùng | The identify of user group | ~~X(20)~~ X(10) | +| | User group Name\*/ Tên nhóm người dung | The name of the user group For reference only | X(100) | +| | Description /Mô tả | Description for user group | X(200) | +| **Group users: List all active User Profile record are assigned to this group.** **This part is display when user click to view any active record only** | | | | +| | User ID\* / ID người dùng | The identify of the user who be long to the chosen group | Display | +| | User name\*/Tên người dung | The name of the user | Display | +| | Email \*/Địa chỉ email | Email | Display | + +### Post –Condition + +* 1. The data is updated in the DB and relation screen (if needed). + +### Exception Flow + +1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Permission Management + +### Business requirement + +1. The Permission Management module is used to maintain Access Rights Groups – i.e. to define: + 1. Which modules and functions can be accessed by users in a group, and + 2. Which of the applicable actions can be performed by the users in each of the functions within each of the modules in the group: + +| | | | +| --- | --- | --- | +| * + 1. Add | * + 1. Change | * + 1. View | +| * + 1. Delete | * + 1. Approve (or Reject) | * + 1. Copy | +| * + 1. View History | h. Save as Template | | + +### Process Flow + +TBD + +### Trigger + +* + 1. New user group to be defined then need to add permission to this group. + +### Post-Conditions + +1. Users have to have the access right on this screen in order to access this screen. +2. Depending on the user’s access rights, they can view/add/edit Permission Management records. + +### Wireframe + +Please refer to the wireframe on the Figma. + +### Business Rules + +* + - * 1. If permission required has not been defined, click on the Permission Management icon in the Main Menu to bring up the summary list as illustrated in the section [Wireframe](#_Wireframe_19) + 2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for Permission Management is illustrated in the section [Wireframe](#_Wireframe_19). + 3. Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Step 1\*: General information/Thông tin Chung** | | | | +| | Role \*/Quyền | The unique identifier of the permission group. | ~~X(20)~~ X(10) | +| | Role Name\*/Tên nhóm quyền | Text describing the Permission Group Name, for user reference | X(100) | +| | Permission Type \*/Loại quyền | Drop down to select the following permission type: *Particular User* *User Group* | Drop-down Select one | +| | User/Người dùng | Condition field Drop-down list to select one or more users who can be accessed on all functions of this role. This field is only active and required when "Particular User" is selected in the previous step. | Drop-down Multiple select | +| | User group/ Nhóm người dung | Condition field Drop-down list to select only one group and all users under this group can be accessed on all functions of this role. This field is only active and required when this role is applicable to the user group type. | Drop-down Select one | +| | Description/ Mô tả | Text describing the Role, for user reference | X(200) | +| **Step 2**\*: **Permission Management** /Quản lí quyền | | | | +| | **Select Modules** A hierarchy of modules contains the list of functions available. Top-level module: The modules group Second level module: The specific module for each group. Allow the user to search the modules by entering the module name | | | +| | Select All/Chọn tất cả | Check/Uncheck to drag/drop all modules in the system into the permission part to configure the specific permission of the role. | Check box | +| | “Module Name” | Check/Uncheck to drag/drop this module permission part to configure the specific permission of the role. Checked/Unchecked on top level then all second level modules will be applicable as well. | Check box | +| | Search /Tìm kiếm | Users input their search keyword(s) into a designated search bar to find the module they're looking for. | Search feature | +| | **Permission /Quyền** **A list contains all selected modules in the previous step and the permission list applicable for each module.** **Note that: N/A =**Not Applicable will be defined in the master data and the user can’t check/uncheck to allow/disallow the permission if this permission is not applicable. **The system allows the user to quickly add/delete one permission to all modules per each module group.** **Besides the system allows** to allow/disallow all available permissions for all modules that appeared in the “Permission” part | | | +| | Selected all/Chọn tất cả | Check/Uncheck to allow/disallow all available permissions for all modules that appeared in the “Permission” part. | Check box | +| | “Top-level module name” E.g: Customer Management | The name of the top-level selected module. Check/uncheck to allow/disallow all available permission for all second-level modules belonging to this module | Check box | +| | “Second level Module name” E.g: Card | The name of the second level selected module. Check/uncheck to allow/disallow all available permissions for the chosen module. | Check box | +| | “Second level Module name” E.g: Card | Click on the second level module to bring up the popup to define the permission of each field on the each screen. See more on “Acccess Right Fields” | Hyperlink | +| | View /Xem | This column contains one checkbox in each row corresponding to a function to which the View action is applicable. If checked, users in this role can view the data available in this function | Check box | +| | Create/Thêm mới | This column contains one checkbox in each row corresponding to a function to which the Create action is applicable. If checked, users in this role can create data in this function. If user have created permisson then user will have "Save as draft" role also | Check box | +| | Edit /Sửa | This column contains one checkbox in each row corresponding to a function to which the Edit action is applicable. If checked, users in this role can do "update" action in this function. | Check box | +| | Delete/Xóa | This column contains one checkbox in each row corresponding to a function to which the Delete action is applicable. If checked, users in this role can do "delete" action in this function. | Check box | +| | Copy /Sao chép | This column contains one checkbox in each row corresponding to a function to which the Copy action is applicable. If checked, users in this Role can coppy available data in this function | Check box | +| | Approve /Phê duyệt | This column contains one checkbox in each row corresponding to a function to which the Approve/Reject action are applicable. If checked, users in this role can do " approve/reject" action in this function | Check box | +| | History/Xem lịch sử | This column contains one checkbox in each row corresponding to a function to which the History action (i.e. to view earlier versions of the data in the activity log) is applicable. If checked, users in this role can view data history in this function. | Check box | +| | Template/Tạo biểu mẫu | This column contains one checkbox in each row corresponding to a function to which the "Save As Tempalte"action is applicable. If checked, users in this role can save record as a template and able to access to "template" tab in listing page | Check box | +| **Access rights field /Phần quyền chi tiết trường thông tin** | | | | +| | Access permission | The list available fields of chosen module | Display | +| | View/Xem | This column contains one checkbox in the each row corresponding to a function to which the “view” action is applicable. If checked, user in this role can view the field in the screen. | Check box | +| | Editable/Cho phép chỉnh sửa | This column contains one checkbox in the each row corresponding to a function to which the “Editable” action is applicable. If checked, user in this role can modify the value of this field in the screen. | Checkbox | + +* When viewing any record, the system displays only the available permissions for this group. + +### Post-Conditions + +Record is automation approval. + +Based on the permission the system will check and display available module/function of each user as following: + +A = Set of Permission of role which are assigned directly to user + +B= Set of Permission of Role which are assigned to permission group and user are in these permission group. + +**Therefore: C= User permission = Combination of A and B.** + +### Exception Flow + +1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## User Profile + +### Business requirement + +The user profile defines user attributes and sets the date and time for allowing user access to system functions. User profile created will be used for login, and users, upon logging in, will be able to view a list of functions with specific operations set in the permission management section and will be associated with users through this function screen. + +### Process Flow + +N/A + +### Trigger + +* + 1. New account need to be defined. + 2. Need to update information of any existing account in the system. + +### Post-codition + +1. Users have to have the access right on this screen in order to access this screen. +2. Depending on user’s access rights, they can view/add/edit User Profile records. + +### Wireframe + +Please refer to the wireframe in the Figma. + +### Business Rules + +* + - * 1. If the permission required has not been defined, click on the User Profile icon in the Main Menu to bring up the summary list as illustrated in the section [Wireframe](#_Wireframe_20). + 2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for the User Profile is illustrated in the section [Wireframe](#_Wireframe_20). + 3. Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **General information** | | | | +| | User ID\*/ ID người dùng | Unique user identifier, assigned by the user | X(10) | +| | User Name\*/Tên người dùng | Name of the user associated with the User ID | X(50) | +| | Password/Mật khẩu | Condition field This field is only active and required when creating a new user. The password must be strong enough. | X(50) | +| | Re-enter password/Nhập lại mật khẩu | Condition filed This field is only active and required when viewing any record. The re-enter password must be matched with the password. | X(50) | +| | Reset Password | Condition field This field is only active and required when updating the user profile record. Click to reset the password in case the user forgot the password. See more on “ Reset password” | Hyperlink | +| | Email \*/Email | User’s email address. A password reset link can be sent to this address if the system is configured to do so. User can use this email to log in in the system instead. The email must be unique value | X(100) | +| | Default Language\* /Ngôn ngữ mặc định | Determines the language in which the screen labels are displayed. | Drop-down Select one | +| **Access Detail** | | | | +| | Access Day \*/Ngày truy cập | Seven checkboxes, each of which indicates the day of week on which the user has (checked) or has no (unchecked) access to the system. | Check box Allow to check more than one value | +| | Access time \*/Thời gian truy cập | On days when user has access, the Access Time is the time on and after which user has access to the system – i.e. is able to log in to the system | Time | +| | User Profile Effective From Date \*/Tài khoản có hiệu lực từ ngày | Date on and after which this User Profile is effective and the user can log in to the system | Date | +| | User Profile Effective End Date\*/Tài khoản hết hạn sau ngày | Date on and before which this User Profile is effective and the user can log in to the system After this day user can no longer log in to the system | Date | +| | User Group\*/Nhóm người dùng | A drop-down listing the available User groups. The selected group determines the functions to which the user that this user profile is defined for has access. | Drop-down Select one | +| | Report Access Right/ Quyền truy cập báo cáo | Drop-down listing the Report Access Rights groups. The selected Report Access Rights group determines which report(s) the user has access to. | Drop-down Select one | +| | User Status\*/Trạng thái người dùng | Drop-down to select following user status: Active Blocked If account is blocked then user can no longer login into the system. | Drop-down Select one | +| **Reset Password** A pop-up will be appeared when user click to Reset password | | | | +| | New Password\*/ Mật khẩu mới | Enter new password Password must be strong enough. | X(50) | +| | Re-enter Password\*/Nhập lại mật khẩu | Enters their new password again to confirm | X(50) | +| | Save /Lưu | Click to accept the change | Button | +| | Cancel /Hủy | Click to cancel the change | Button | +| **User Permission / Quyền người dùng** **Display for any active User Profile records** **The list contains all permission which applicable for the chosen user** | | | | +| | “Top level module name” E.g: Customer Management | The name of top-level module. | Display | +| | “Second level Module name” E.g: Card | The name of the seconde level selected module. | Display | +| | “Second level Module name” E.g: Card | Click on the second level module to bring up the popup show the access rights fields of chosen module. | Hyperlink | +| | View /Xem | Checked if allow Unchecked if disallow N/A if not applicable this action to that module | Display | +| | Create/Thêm mới | Display | +| | Edit /Sửa | Display | +| | Delete/Xóa | Display | +| | Copy /Sao chép | Display | +| | Approve /Phê duyệt | Display | +| | History/Xem lịch sử | Display | +| | Template/Tạo biểu mẫu | Display | + +### Post-Conditions + +When create new record then the new user account is successfully created in the system. + +The new user receives an email notification with login instructions and temporary password. + +When password is resetted then an email notification will send into user’s email with new password to user can login into the system again. + +### Exception Flow + diff --git a/docs/specs/archive/oneadmin.md b/docs/specs/archive/oneadmin.md new file mode 100644 index 0000000..2041e0e --- /dev/null +++ b/docs/specs/archive/oneadmin.md @@ -0,0 +1,186 @@ +--- +title: "OneAdmin™" +type: OpenSpec +status: Draft +--- +# OneAdmin™ + +## Overview + +1. OneAdmin™ is a browser-based application framework based on which all OLS administration screen functions are implemented. +2. This section describes the admin screen functions in general. +3. OneAdmin™ provides the screen functions such as the following for users to administer OLS: + +| | | +| --- | --- | +| * 1. Application parameters and campaign management | * 1. Creating and reviewing customer information through menus | +| * 1. Viewing and Posting of transactions for award, redeems and adjusts | * 1. Requesting for generation and viewing of reports. | +| * 1. Creating and reviewing catalogue information. | * 1. Generic Ledger management | +| * 1. Creating and reviewing merchant information | * 1. Posting of transaction testing for award, redeem and adjusts. | + +1. Maintenance actions supported include: + 1. “**Add**”, to add a new record in the module or function. See section 3.6 for an illustration of the [Add](#_Add_Form) form for adding a record. + 2. “**Edit**”, to modify an existing record on the module or function. See section [Edit](#_Edit_Form) for an illustration of the Edit form for editing a record. + 3. “**Copy**”, where user can add a new record with the contents of a currently selected record: user will be prompted to change key values which are not allowed to be replicated across records. See section [Record Copy](#_Record_Copy) for an illustration of the record copy screen. + 4. “**History**” tab brings up a display of previous versions of this record. See section [History](#_Record_History) for an illustration of the History screen. + 5. “**Save**” will save the record displayed in the edit form to the database (whether it’s a new record or changes made to an existing record). + 6. “**Cancel**” will cancel the action. + 7. “**Approve**”, to accept the change of the record in the module or function. + 8. “**Reject**”, to reject the change of the record in the modue or function. + 9. “**Save as Draft**”, to temporary save the record in the module or function without publishing it. + 10. “**Save as Template**”, to save the record displayed in the form to re-use in the furture as a template. +2. When first “saved”, the record is stored with its Status set to “Pending”. +3. It has to be selected (by click on the “Pending” tab to locate records with Status = “Pending”), then clicking on the record to view and/or approve it. +4. Upon approval, the record status is set to “Active”. +5. See section [Approve](#_Approve_Pending_Record) for the process to “**Approve**” pending records. +6. “**Delete**” marks the record being displayed as deleted or “inactive”. +7. The record will be copied into a new record with its status set to “Pending”, and the original record will be left intact. +8. A user with the necessary “Approval” rights must approve the deletion for the record to be deleted and blocked from further use. +9. All updates posted through OneAdmin™ are reflected in the database immediately on approval. + +## Types of Screen Layouts + +1. OLS admin screen functions are generally made up of 3 types of screen layouts, each corresponding to the screen function +2. The first is the **Home Page** – there is only one of this. This screen is displayed after a successful log in. +3. The second is the **Listing** **Page**: + 1. This class of screens is displayed when module in the navigation panel (Menu) is clicked. + 2. It generally displays a default list of records that can be accessed through the module. +4. The third type of screens is the “**Details Page**” layout: + 1. This is the page displayed after a record in the Summary Listing page has been selected. + 2. It shows the details of the selected record at the field level + 3. In some cases, access to child records of the record on display is provided as tabs in the screen. +5. The general features of each type of screen layout are described in the following sub-sections. + +## Home Page + +1. The following figure illustrates the Home Page screen: + +Main Menu + +1. The left panel (navigation panel) lists the module and functions to which user has access. The actual functions available in the navigation panel vary depending on the access rights of the user id that is used to log into the system. Only the functions to which the user has access will be displayed. +2. The main display area shows charts of key statistics, pre-configured at time of deployment. +3. Each of the listed modules in the navigation panel expands when clicked to show the functions available under that module. + +[Image Removed] + +Figure: The “Campaign Managemetn” module in illustrates this expanded view. + +This module has 07 functions – “Campaign Insight”, “Campaign”, “Campaign Rule”, “Pool Definition”, “Pool Conversion Rate”, “Counter Definition”, and “Account Type Group”. + +The total number of pending records on each module is displayed on the right side of the module name. + +1. Clicking on a function will bring up the summary listing page for that function: see section 3.4. + +## Summary Listing Screens + +1. When a function in the navigation menu is clicked, the main display area will typically show the summary listing page for that function. +2. The typical layout is illustrated in the following: + +[Image Removed] + +Sample Summary Listing Screen Layout + +1. In the following table, the row numbers correspond to the display areas enclosed in red boxes with the same number: + +| Box | Description | +| --- | --- | +| | The name and the path of the function are displayed at the top left corner of the main display area, in this case “Campaign Management > Pool List” – i.e. the function for maintaining “Pool Definition” records. | +| | The top right conner of the screen displays the language, with an icon of the language and language name. To change the display language, click on the icon to choose another language. | +| | The top right corner of the screen displays the user id and an icon of the user, with a description of the user’s access rights, i.e. the actions to which the user has access. To leave this screen simply click on the destination module and function in the navigation menu. | +| | The module name | +| | The area labelled in red displays the quick search form. It contains input boxes for filtering the records to be displayed. There are two modes of search – the **Quick search** mode and **Filter** mode: * The **Quick Search** mode search involves searching by key word: + Provides users with a fast and efficient way to access search functionality without navigating through multiple pages with the selection record status in the area 7. + Entering keyword on the text box. + By click on the icon or press “Enter” key to get result. The system will display the list of records where the keyword is found in any column on the listing page except date time data type coulmn, in the area labeled as box number 9. + The search uses the "Contains" operator in a case-insensitive manner to find the matching record | +| | The area labelled 4 in red displays the link to the advanced filter form where multiple fields can be set up as part of the search/filter criteria. * The advanced mode involves clicking on the “**Filter**” link. * When click on the “Filter” button the advanced filter form that appears is illustrated as following: [Image Removed] Figure 1 – Example of the Advanced Filter Form * When click to “Add” button the form that appears as illustrated in red box in area 2 as following: [Image Removed] Figure 2 – Example of the Advanced Filter when add any filter In the red box, which represents the Advance Filter form (area 2): * + Three purple boxes appear in the adjacent areas: area 4, area 5, and area 6. + In the area 4, there is the “Search Field” drop-down a data field name by which to search. The system list all available **field in the listing page by the default, except “Action” and “Status” field.** * Some specific modules will need include custom filter field, that are not displayed on the listing page such as: “Customer Profile” and “Transacion History” screen. See more on its section. * Users can choose from the available data fields to narrow down their search. + In the area 5, there is the “Search Operator”. For each data type‘s search filed then the system provides a set of “Operator” options that users can apply. These operator allow the user to specific how the field should be applied to the selected filter field. All available operator according on each data type’s search field are described on the following table: | | | | | --- | --- | --- | | **Index** | **Data Type** | **Operator** | | | Character | A drop dow to select following values: * Equal * Not Equal * Empty * Not Empty * Contains * Not Contains * In * Not In | | | Number | A drop dow to select following values: * Equal * Not Equal * Greater Than * Less Than * Greater than Or Equal to * Less than or Equal to * Between | | | Boolean | A drop dow to select following values: * Equal | | | Datetime | A drop down to select following values: * Equal * Not Equal * Greather Than or Equal To * Less than or Equal to * Between | * + In the area 6, there is the “Value Field”. This field can be of two types: Text box or Drop-Down. The type of value fields (text box or drop-down) displayed to users depends on the selected operator and searched field as following: * “Empty” and “Not Empty” operator should not require a value input field. * “Between” operator of Date/Time search field should require 2 value input fields with date/ time picker to allow the users to specific the range of date /time to be used in the filter query. * “Between” operator of number search field should require 2 text boxes with number format to allow user to specific the range of number to be used in the filter query. * “In” /”Not In” operator of character search field may present a drop-down list when search field is a lookup value field on that screen, meaning it is a field that fetches data from other tables in the system . The drop-donw list all active records of the search field and allow user select multiple value to be used in the filter query. * “In”/”Not In” operator of character search field may present a text box when search field is not a lookup value field on that screen. This text box should allow the user to enter multiple values, separated by input tag. * “Contain”/”Not Contain” operator of character search field shoud present a text box. This text box should allow the user to enter multiple values, separated by input tag. They system uses “\*” to match zero or more occurrences of the preceding subexpression. * All remaining operators may present a text box input filed to allow the users to enter a filter value. The system should validate the user-entered value based on the data type of the search field. * There is no sensitive case for character search fields. * All selected fields are used in an “AND” search. * On clicking the “Adanced Search” button, the list of records found to have the matching value would be displayed in area in box number 9. * Searching by “Filter” and “Status” be done together as an AND condition. * On clicking the “Reset” button, the system delete all filter field and return all records by the slection status. | +| | This are contains three distinct tabs, each representing a different record status: Active, Pending and Rejected. On the “Pending” tab the system show the total number of pending records next to the tab label. | +| | This area contains the pagination control links – to page forward, backward or to navigate directly to a numbered page with the number of records displayed and the number of record in total. | +| | This is the main display area listing the first N records within the function selected, where N defaults to a system parameter. N can be changed in drop-down box in area 8. The top row contains the column headings, with up to N numbered rows below it. The right-most column in are 10, inclues the actions for viewing, editing, deleting and approval the record in each row. | +| | This area shows the number of records displayed and the number of record in total. | +| | This is the Add button which when clicked brings up the edit form described in section 3.6, for adding a new record in the system. | + +## Detail View + +1. When the View icon for a row is clicked in the Summary List page as described in section 3.4, the details of the record in that row is displayed as illustrated in the following: + +[Image Removed] + +Figure 3 – Sample Record View Screen with Labelled Areas + +[Image Removed] + +Figure 4 – Sample Record History + +| | | +| --- | --- | +| Box | Description (Refer to figure 3 and figure 4) | +| | * This area display the name of the module with the record status and record primary key. | +| | * Clicking on the “Copy” button brings up the view described in section 3.10. This feature provides a convenient means by which to create new records by changing existing records. The “Copy” feature is provided only for selected functions where a “Copy” action is practical. * Clicking on the “Edit” button, the fields are displayed with details of the record in that row, awaiting user input to amend the details. * Clicking on the “Delete” button brings up the pop-up to user confirm the deleted action. | +| | * The function accessed is displayed as a tab. * If the function has data which can be categorised separately in a logical way, each category is displayed as a different tab. * This area shows the tabs available and clicking on the tab brings up the display for that category of data. | +| | * This area shows the details of the record. | +| | * The panel on the right/bottom displays supplementary data relating to the record in the main display area (area 5). The details in the right panel vary depending on the function. | +| 7 | * Clicking on the “Back” button brings the view back to the Summary Listing page. | +| 8 | This area shows when the record was last changed, and by whom. * Every time a record is updated or approved, the user id that last made the change and the user id that last approved a change are logged with the record, together with the date and time of the action. * This information is always shown at the bottom of the record details screen display. * Only records with Status = “A” for Active are taken into account during transaction processing: if a record status is not active it will not be taken into account for any transaction processing. * The “Last Updated By” field shows the user id of the user who last updated this record. If the record is updated by a batch process, this field will contain the Batch Id. * The “Last Updated Date” field shows the date and time when the record was last updated. * The “Last Approved By” field shows the user id of the user who last approved this record. For updates by programs (batch processes and online transactions), this field is empty. * The “Last Approved Date” field shows the date and time when the record was last Approved. For updates by programs (batch processes and online transactions), this field is empty. | +| 9 | This area shows when the action records may can be changed * Clicking on the “History” records will bring up the display described as in area 4. * By choose the 2 version and clicking the “Compare” button will bring up the display described in section 3.8: Record History. Feature allows for easy browsing of the changes made to the record | + +## Add/ Edit Screen + +1. When the Edit /add for a row is clicked in the Summary List page, the details of the record in that row is displayed in the edit form for editing, as illustrated in the following: + +[Image Removed] + +Figure 3 – Sample Record Edit Form with Labelled Areas + +1. Each row in the following describes the correspondingly numbered area in Figure 3: + +| | | +| --- | --- | +| Box | Description (Refer to Figure 3) | +| | This area shows the function for which the edit form is being displayed. | +| | This is the main edit form. * Mandatory input fields have a coloured border on the left. * If the edit form is displayed as a result of the “Add” button being clicked in the previous screen, the fields will be displayed empty, awaiting user input * If the edit form is displayed as a result of the “Edit” button being clicked in the previous screen, the fields are displayed with details of the record in that row, awaiting user input to amend the details. | +| | * The “Create”/”Update” button will save the changes or in the case of the “Add” action, the input data, in the database as a new record with record Status = “Pending”. Note that the record being changed (“original record”) will remain unchanged. | +| | * The Cancel button causes any input or change made to be discarded and the display will return to the previous summary listing page. | + +## Approve Pending Record + +1. When a new record is first added, or when an existing record is “Changed” or “Deleted”, the new or modified record is inserted in the database with a Status set to “Pending”. +2. The original record remains active. +3. The “Pending” records must first be “Approved” by a user who has the rights to the “Approve” action for that function before the change becomes effective. +4. To “Approve” a record, the record must first be located by clicking for records with the “Pending ” tab as illustrated here: + +[Image Removed] + +Figure 4 – Search for Pending Records + +[Image Removed] + +Figure 5– Pending Record Listing + +1. In change mode, the record values with and without the change are both displayed for comparison.The previous value (before change) and the modified value,that pending approval are displayed side by side, with modified fields displayed in a font of a different color, as illustrated: + +* Red text highlights changes of the active record, ~~Red text~~ highlight with strikethrough effect for the deteled data. +* Green text highlights changes of the pending record. +* **Black text** denotes unchanged information in both record versions. + +[Image Removed] + +Figure 6 – Pending Record Displayed Side-by-side with Currently “Active” Record + +1. At this point, it is possible to click on the Modify button to edit the record and save it back into the Pending list. The user who edits the record will not be able to “Approve” the change. +2. Click on the “Approve” button to put the record into active use. +3. Click on the “Reject” button to return the record to the Reject list for follow-up and correction. +4. Users can “Approve/Reject” record from detail view mode or by clicking on the “Approve/Reject” button from listing page. + +## Record History + +1. The “History” feature is for scanning through historical versions of a record. +2. When in the Record Detail view, clicking on the “History” Tab will bring up the all version of the record. +3. When the “Compare” button is clicked, the display will show details of two chosen version as following: + +[Image Removed] + +Figure 7 – Sample Display of a Record’s History + +| | | +| --- | --- | +| Box | Description (Figure 7) | +| | Drop-down lisitng all history version inclues currently version. Users can change version to compare by select the verion to compare. | +| | Details displayed in the change history of two selected versions by the version in the drop-down list in area 1. * Red text highlights changes of the record in the red drop-down in the area 1. * Green text highlights changes of the redcoed in the green drop-down in the area 1. * **Black text** denotes unchanged information in both record versions. | + diff --git a/docs/specs/archive/onecatalogue.md b/docs/specs/archive/onecatalogue.md new file mode 100644 index 0000000..5a414bc --- /dev/null +++ b/docs/specs/archive/onecatalogue.md @@ -0,0 +1,377 @@ +--- +title: "OneCatalogue" +type: OpenSpec +status: Draft +--- +# OneCatalogue + +## About Redemption Item in OLS system + +### Overview + +1. The catalogue is used to set up items for online (web site, Mobile App) redemptions. +2. Redemption items such as Cash-back rebates, frequent flyer miles conversion and merchant vouchers can be set up in the redemption catalogue. +3. Front-end systems access the catalogue through web services to display available items. +4. Front-end systems accept user requests to redeem and send these requests to OLS for authorization (deduction of the relevant points) and to generate the fulfilment files for sending to designated recipient systems. +5. Catalogues are managed through the browser-based administration screens, which update the catalogue in real-time. Once “Approved” the item is available commencing on the Start Date. +6. Functions include adding catalogues to the system, adding items to catalogues, setting price rules and processing redemption requests from front-end systems. +7. OLS also provides an administration function for back-office staff to redeem items through the administration screens directly on behalf of customers. + +## Catalogue + +### Requirement Definition + +* + - 1. A Catalogue must be defined and all items to be included in the Catalogue must be tagged with the Catalogue code before customers access the items. + 2. A Catalogue code is tagged against each Item Master record. + 3. More than one Catalogue can be configured at the same time, but each Catalogue must have its own set of Item master records. + 4. Each Catalogue has a Start / End date range and items in the Catalogue will be picked for presentation to customer only if the current date falls in the Start / End date range for that Catalogue. + +### Process Flow + +==tbd== + +### Trigger + +* + - * 1. If an item is to be tagged to a Catalouge that has not yet been defined. + +### Pre-Conditions + +1. Users have to have access rights in “Catalogue” screen under “OneCatalouge” module. +2. Depending on the user's access rights, they can view, add, edit, or approve catalogue records. + +### Wireframe + +[Image Removed] + +### Business Rules + +1. Click on Catalouge icon in navigation panel under OneCatalouge to get a listing of existing catalogs. +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Catalouge is illustrated in section 7.2.5. +3. **Descriptions** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **General Information /Thông tin chung** | | | | +| | Catalogue Code \*/Mã nhóm danh mục | User-specified code identifying the catalogue. Used by front-end system when requesting for item information. | ~~X(20)~~ X(10) | +| | Description\*/ Mô tả | A description of this catalogue. For user reference only. Default description which will be used in case there is no specific description for chosen language. | X(50) | +| | Effective From Date \*/Có hiệu lực từ ngày | Catalogue is effective only when the processing date is between Start Date and End Date, inclusive. | Date | +| | Effective To Date \*/Có hiệu lực đến ngày | Date | +| | Icon/ Biểu tượng | Allow to upload/remove the icon of catalogue | Image | +| **Content Configuration: This step is used to setup the description of catalogue follow each language.** **This is optional step** | | | | +| | Select Language /Chọn ngôn ngữ | Click to add specific description | Button | +| | Language \*/Ngôn ngữ | A drop-down list to select the language which need to be setup specific description. | Drop-down Select one Get from master data | +| | Description\*/Mô tả | A description of this catalogue. For user reference on MP only. | X(100) | + +### Post- Conditon + +The Catalouge information for each item can be returned to the front-end during an Item Enquiry response message for the front-end to use in searching the catalogue for items. + +### Exception Flow + +N/A + +## Category + +### Requirement Definition + +A catalog is the main folder to organize categories and items for materials. A category is a group within a catalog that contains items. All items to be included in the Catalogue must be tagged with the Category code. Multiple Categories can be linked to form a hierarchy of categories. The hierarchy of categories is used on Member site. + +### Process Flow + +### Trigger + +If an item is to be tagged to a catagory that has not yet been defined. + +### Pre-Conditions + +1. Users have to have access rights in “Category” screen under “OneCatalouge” module. +2. Depending on the user's access rights, they can view, add, edit, or approve category records. + +### Wireframe + +[Image Removed] + +### Business Rules + +1. Click on the category icon in the navigation panel under OneCatalouge to get a listing of existing catalogues. +2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for the category is illustrated in section 7.3.4. +3. **Descriptions** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **General Information /Thông tin Chung** | | | | +| | Category Code \*/Mã danh mục vật phẩm | User-specified code identifying the category. Used by front-end system when requesting item information. | ~~X(20)~~ X(10) | +| | Description\*/ Mô tả | A description of this category. For user reference only. Default description which will be used in case there is no specific description for the chosen language. | X(100) | +| | Effective From Date /Có hiệu lực từ ngày | Category is effective only when the processing date is between the Start Date and the End Date, inclusive. If an effective date is not provided then this is a non-expire category. | Date | +| | Effective To Date /Có hiệu lực đến ngày | Date | +| | Parent Category | Multiple Categories can be linked to form a hierarchy of categories. | Drop-down Select one The parent categories value from master data. | +| | Display Ordering /Thứ tự hiển thi | The display ordering sequence on the Member Site. | 9(3) | +| | Icon/ Biểu tượng | Allow to upload/remove the icon of the category. | Image | +| | Image group /Nhóm hình ảnh | Drop-down list to select the image group | Drop-down Select one | +| | Image /Ảnh vật phẩm | Condition field This field is only active and required when the image group is selected | Drop-down Select one Lookup value from Image Stock screen by selected image group. | +| | Preview | Preview of selected image | Image | +| | Add image/Thêm mới ảnh vật phẩm | Quick add feature to support user add image from this screen. The new image will be automatiom approved when the category is approved | Button | +| **Content Configuration: This step is used to setup the description of catalogue follow each language.** **This is optional step** | | | | +| | Select Language /Chọn ngôn ngữ | Click to add specific description | Button | +| | Language \*/Ngôn ngữ | A drop-down list to select the language which need to be setup specific description. | Drop-down Select one Get from master data | +| | Description\*/Mô tả | A description of this category in the choosen language. For user reference on MP only. | X(100) | + +### Post –Condition + +### Exception Flow + +## Item master + +### Requirement Definition + +Describe details about a particular item: e.g. prices, quantities, availability dates, terms and conditions, etc. Item Master Records cannot be created unless the Stock Code is in place. + +### Process Flow + +### Trigger + +New items need to be defined. + +### Pre –Condition + +1. Users have to have access rights in the “Item Master” screen under the “OneCatalouge” module. +2. Depending on the user's access rights, they can view, add, edit, or approve Item Master records. + +### Wireframe + +[Image Removed] + +### Business Rules + +1. Click on Item Master icon in navigation panel under OneCatalouge to get a listing of existing catalogs. +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Item Master is illustrated in section 7.4.4 +3. **Description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **General information: Mandatory Step** | | | | +| | Catalogue Code\*/Nhóm vật phẩm | The Catalogue for which this item is being configured. | Drop-down Select one | +| | Category/Danh mục vật phẩm | Select the category under which this item is to be tagged, to facilitate searching in the customer-facing page – e.g. Retailer Vouchers, Frequent Flyer Points, Cash Rebate, etc. | Drop-down Multiples select | +| | Item Code\*/Mã vật phẩm | Enter the item code to be added to the catalogue. This is Item identify. | X(10) | +| | Item Name \*/Tên vật phẩm | Short description field used by customer-facing application for display for Catalogue item. The text can include control characters. This is default name in case there is no specific item name of chosen language in the member site. | X(50) | +| | Redemption From Date From\*/Có hiệu lực từ ngày | “**From Date**” & “**To Date**” specify the period within this item is available and may be included in the Catalogue display and when after which it becomes unavailable and is excluded from the Catalogue display. OLS will reject the Start Date and End Date if they are outside the Catalogue/Category Start Date and End Date period. Once the item has been started for redemption, only End date will be allowed to modify. | Date | +| | Redemption To Date \*/ Có hiệu lực đến ngày | Date | +| | Redemption Store /Đối tác | Supplier of this item. The merchant (Store) that has to be configured appropriately in order for straight-through settlement processing. | Drop-down Select one | +| | Redemption Transaction Code\*/Mã giao dịch đổi thưởng | OLS TC used for redemption processing and logging. | Drop-down Select one | +| | Award Transaction Code/Mã giao dịch tặng thưởng | OLS TC If selected, the **OLS** **Transaction Code”** used to locate any award campaign rules to be executed as a result of the catalogue item redemption. | Drop-down Select one | +| | Item Type \*/ Loại vật phẩm | The type of item Choose one of following types : * + 1. Miles 2. Physical 3. eVoucher 4. Donation 5. Cash rebate 6. Other | Radio button Item type list from master data | +| | Voucher Code /Mã voucher | Condition field A drop-down to select voucher code This field is only active and required when item is an eVoucher | Drop-down Select one | +| | Face value/ Partner Point / Giá trị vật phẩm | Condition field This field is only active and required for Cash rebate/eVoucher/Miles item. This is the value of the cash rebate/voucher /miles that customer sees. This value is not used if the Face Value is also specified in the Item Price set-up | 9(14,2) Should be positive value | +| | Display on Member Site | Turn off to restrict this item in member site. | Switch button Default ON | +| | Hot item /Vật phẩm hot | Condition field This field is active only when this item is displayed on the member site Choose to indicate this is a hot item. Used to display on Member Site. | Switch button Default OFF | +| | Display Ordering/ Thứ tự hiển thị | Condition filed This field is active only when this item is displayed on the member site The ordering sequence to display on member site | 9(3) Should be greater than 0 if provided | +| | Track Quantiy on Hand/ Theo dõi số lượng vật phẩm | ON mode if the item is an item and that requires inventory control: the “Quantity-on-Hand” is updated for such items during redemption. If this is a Voucher Code item, this field is force-set to Yes and cannot be changed. | Switch button Default OFF | +| | Initialize Quantity of Stocks/ Số lượng ban đầu | Condition filed This field is only active and required if track quantity on hand. Canot edit this value if this item has been redeemed. This field is not activated for the Evoucher item due to the number of voucher being generated by another feature (via the Voucher Code screen or batch file). | 9(9) Should be positive value. In case item has been redemmed, then not allow to modify this field. Just display only | +| **Item detail : Mandatory step** **This step involves configuring the details of each item in multiple languages. By doing so, the system can utilize the specific details tailored to each language.** | | | | +| | Select Language /Chọn ngôn ngữ | Click to add specific item detail. | Button | +| | Language \*/Ngôn ngữ | A drop-down list to select the language which need to be setup specific description. | Drop-down Select one Get from master data | +| | Item name\*/Tên vật phẩm | Specific item name in the choosen language. | X(50) | +| | Item Description/Mô tả vật phẩm | Specific item description in the chosen language. | X(100) | +| | Item content/Thông tin chi tiết | The content of item in the choosen language | X(2000) | +| | How to use /Cách sử dụng | The way to use the item in the choosen language | X(2000) | +| | Term and Conditon/ Điều khoản | Term and Conditon Free text to be returned in the Terms and Conditions field in the Web Service message and in redemption output template letters and email. | X(2000) | +| **Item Image /Ảnh vật phẩm** Optional step | | | | +| | Select image | Click to add image for item | Button | +| | Image group /Nhóm hình ảnh | Drop-down list to select the image group | Drop-down Select one | +| | Image /Ảnh vật phẩm | Condiiton field This field is only active and required when image group is selected | Drop-down Select one Lookup value from Image Stock screen by selected image group. | +| | Sort Order | The display odering sequence on Member Site. | 9(3) Should be greater than 0 if provided | +| | Preview | Preview of selected image | Image | +| | Add image/Thêm mới ảnh vật phẩm | Quick add feature to support user add image from this screen. The new image will be automatiom approved when the category is approved | Button | +| **Contact and Address information** Optional step | | | | +| | Add Address | Click to add item address where we can to use this item | Button | +| | City\* | The drop-down to select the city where can use this item | Drop-down Select one | +| | Address | Address detail | X(200) | +| | Email | Email address | X(100) | +| | Phone | Phone number | X(20) | + +### Post-Conditions + +* + 1. The newly created item should have all required fields populated with valid data. + 2. The system should add/updated items in the database. + 3. Other screen which lookup to item screen must be able to use new item. + +### Exception Flow + +## Item price + +### Requirement Definition + +* + - 1. Outlines the specifc criteria, functionalities and parameter that determine and manage item prices in the OLS: + 1. Point valuation: Define the conversion rate between reward points and redemption quanity (e.g 100 point = 1 Ticket movie voucher) to establish the baseline for item redemption. + 2. Criterions pricing: specify if different pricing tiers will be available for customer based on their account type or redemption channel or specific criterions such as gender, redemption quantity,etc. + 3. Redemption options: Define the types of items price available for redemption, including using point only or both cash and points. + +### Process Flow + +[Image Removed] + +### Trigger + +* + - 1. New item is defined and must define item price to process redemption processing for this item. + 2. If an item is to be tagged to a price that has not yet been defined. + +### Pre-Conditions + +1. Users have to have access rights in “Item Master” screen under “OneCatalouge” module. +2. User have to have access rights in “Item Price” Screen under “OnCatalouge” module. +3. Depending on the user's access rights, they can view, add, edit, or approve Item Price records. + +### Wireframe + +[Image Removed] + +### Business Rules + +1. Click on Item Master icon in navigation panel under OneCatalouge to get a listing of existing item master. +2. Click to view detail any active item master records to bring up the “Item Price” screen as a new tab under item master detail record. +3. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Item Price is illustrated in section 7.5.5 +4. **Edit Screen Description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **General information** | | | | +| | Item Code \*/ Mã vật phẩm | Item code | Display if configure item pirce under specific item. Drop-down list to select an item code to configure the item price | +| | Price Code\*/Mã giá | The identify of the item price For user refrence only | X(10) | +| | Pirce Name \*/Tên giá | Default name of the price For user reference only | X(100) | +| | Effective Start Date \*/ Hiệu lực từ ngày | **From Date**” & “**To Date**” specify the period within this price. | Date | +| | Effective End Date \*/ Hiệu lực tới ngày | Date | +| | Redemption Channel \*/Kênh đổi thưởng | The drop-down to select the redemption channel. Supported channels are: Call Center Mobile Application Internet Banking Etc | Drop-down Select one | +| | Account Type Group/Nhóm loại tài khoản | Optional filed If Account Type or Account level is selected then account type group is blocked and vice versa. | Drop-down Multi-select | +| | Product Account Level /Hạng tài khoản | Optional field The drop-down to select the Account level (Card Level) to this this price applies. Leave as empty if all Account level are applies to this prce. If Account type group are selected in previous step then this field is blocked and vice versa | Drop-down Select one | +| | Product Account Type/Loại tài khoản | Optional field Optional field Multi-select drop-down to select the Account Type (Card Type) of selected account level in previous step which will be applies to this price. Leave as empty if all account types of selected PAL are applies to this price. If Account type group are selected in previous step then this field is blocked and vice versa | Drop-down Multi-select | +| | Redemption Pool\*/Pool đổi thưởng | Select the Pool from which to deduct points for redeeming this item | Drop-down Select one | +| | Use Only Points from Selected PA Type/Chỉ sử dụng điểm từ các loại nhóm tai khoản được chỉ định | Restrict the use of points for redemption of this item at this price to only points earned by the selected account Type/ATG | Switch button Default OFF | +| | Face value /Trị giá vật phẩm | If transacting Customer/Account meets the criteria in this set-up, what the Customer receives is this “Face Value”. E.g. if this is 500 KrisFlyer Miles, Customer receives 500 KrisFlyer Miles for redeeming one of this item. | 9(12,2) Should be greater than 0 if provided | +| | Price in point \*(Full redemption) / Giá trị điểm | Price of item if paid for fully in points from the selected Pool | 9(12,2) Should be greater than 0 if provided | +| | Original price /Giá gốc | The original price of the item For user reference only | 9(12,2) Should be greater than 0 if provided | +| | Partial Redemption Allowed/Cho phép đổi thưởng 1 phần | If allowed, customer can use a mix of points and cash to pay for this item. The number of points and amount of cash are derived from “Price in Cash Value-per Point” and “Minimum Partial Redeem Points”. See the description for these fields. | Swith button Default OFF | +| | Minimum Partial Redeem Points/Số điểm tối thiểu | Condition field This field is only active and required when Partinal Redemption is allowed. Customer must use at least this number of points to redeem this item. | 9(12,2) Should be greater than or equal to 0 if provided 0 for full cash redemption | +| | Cash per point/ Số tiền chi trả | Condition field This field is only active and required when Partinal Redemption is allowed. This is used to calculate the amount of cash required to redeem this item after taking into account the points redeemed, if any. | 9(12,2) Should be greater than 0 if provided | +| | Appliable Taxes | The drop-down list to select the tax rate to be applicable. | Drop –down Select one Get data from “Tax Rate Maintenance” Screen | +| **Price detail :** **Optional step. If not provide then use default item price name to display if needed** | | | | +| | Select language /Chọn ngôn ngữ | Click to add item price detail on each language For user reference only | Button | +| | Language \*/Ngôn ngữ | The drop-down to select the language to setup the specific item price detail | Drop-down Select one | +| | Item price Name \*/Tên giá | The specific name of chosen language For user reference only | X(100) | +| | Description/ Mô tả | The description of the price For user reference only | X(500) | +| **Item criteria** A part to add criteria to meet the price The approach the same as Rule criteria but just display all criteria which be tagged to “Item price “ module only | | | | +| | | [Image Removed] | Click to add new criteria | +| | | [Image Removed] | Depended on the purpose of each campaign rule and the criterions list need to be setup to allocate and arrange all criterions into only one or many group. Click on “[Image Removed]” button to create new group. | +| | | [Image Removed] | This button is used to exclude all the coming transaction meet the rule criteria. Switch NOT button are applied on combinaiton of all group OR on all criteria on each group. | +| | | Right panel | List all active criteria on the system. Each criteria per category will be defined as an attribute and to be tagged for “Item Price “ module | +| | | Drag/Drop criteria | Each criteria can be drag one more time on each CP rule. The operator and filler value for each criteria will be display base on data type of selected criteria. | +| | | [Image Removed] | Click to delete criteria | +| | | [Image Removed] | Operator between difference groups on the same campagn rule OR operator between difference criterions on the same group per each Campaign Rule. | + +### Post-Conditions + +With the item price configuration then here is the flow to get item price. + +Valid price + +[Image Removed] + +What is the price of the transaction + +[Image Removed] + +### Exception Flow + +## Voucher Code + +### Requirement Definition + +1 If the Item to be set up is for distribution of Voucher Numbers to customers, and these Voucher Numbers are from external partner merchants, then the Voucher Numbers must first be set up in OLS by uploading/creating the stock of Voucher Numbers. + +2 This voucher upload file must contain the Voucher Code (which identifies what this voucher is for – e.g. “$5 Lazada Voucher”), the period within which the vouchers are accepted at the partner merchant, and the individual voucher serial numbers (Voucher Numbers). + +3 The file format is set out later (to be decided). + +4 This upload can be done using the “Upload” functions in this screen. + +### Process Flow + +### Trigger + +N/A + +### Pre-Conditions + +1. Users have to have access rights in “Voucher Management” screen under “OneCatalouge” module. +2. Depending on the user's access rights, they can view, add, edit, or approve Voucher records. + +### Wireframe + +* + - 1. **Create/Edit mode** + +[Image Removed] + +* + - 1. **View mode** + +[Image Removed] + +1. Listing page +2. **Voucher Detail view** + 1. Listing Page + +[Image Removed] + +* 1. View + +Click to any record on the listing page to bring up the detail view as following: + +[Image Removed] + +### Business Rules + +1. Click on Voucher icon in navigation panel under OneCatalogue to get a listing of existing Voucher Code as illustrated in section Wireframe. +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Voucher is illustrated in section Wireframe. +3. Double click on any existing record in Active Tab then the Voucher Detail listing is illustrated in section 7.6.5. +4. The system just allow to view the Voucher detail only. +5. Can not allow deleting the voucher Code if voucher have been redeemed. +6. **Screen description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Screen 1: Voucher Code** | | | | +| | **Voucher statistic / Tổng hợp thông tin voucher** **This is displayed for active record only** | | | +| | Total Voucher /Tổng voucher | Total the serial number voucher belong to the choosen voucher code | Display as interger format | +| | Available Vouchers /Số voucher khả dụng | Total the valid voucher and ready to use: The voucher has not yet been redeemed and non- expired. | +| | Redeemed Vouchers/ Voucher đã đổi thưởng | Total the numner of the successfully redeemed vouchers. | +| | Cancelled Vouchers/ Voucher đã hủy | Total the number of the fail redeemed vouchers which is cancelled by customers/system by specific reason. | +| | Expired Vouchers/Voucher đã hết hạn | Total the number of expired voucher that has not yet been redeemed. Use processing date to compare with expiry date of the voucher. | +| | **Voucher Code Detail information** | | | +| | Voucher Code\*/Mã voucher | Identifies the voucher. | ~~X(20)~~ X(10) | +| | Description /Mô tả | The description of the voucher. For user reference only. | X(100) | +| | Supplier / Nhà cung cấp | The partner/ organization that issues or provides the voucher | Drop-down Select one | +| | Expiry Policy \*/ Hạn sử dụng | A drop-down list with the following choices: * Fixed Date: Voucher will expire after the date specified in the “Expiry Date” parameter. * N days from Transaction Date: Voucher will expire after N days from Redemption Date (Transaction Date). * N days from Post Date: Voucher will expire after N days from redemption transaction is posted on the OLS. * N Months from Transaction Date: Voucher will expire after N months from redemption Date. * N months from Post Date: Voucher will expire after N moths from the moment a redemption transaction is posted on the OLS. | Drop-down Select one | +| | Expiry Date / Ngày hết hạn | Condition field This field is only active and required when the expiry policy is “Fixed Date”. **A transaction which redeem this voucher is not allowed to have Transaction Date later than this date.** Can not allow editing the policy (including the relative field that be used to determine expiry date of the voucher) | Date | +| | N Param/ Tham số N | Condition field This field is only active and required when the Expiry Policy selected in the previous step requires a parameter N param. e.g. “N days from Transaction Date” | 9(3) Should be greater than or equal to 0 if provided | +| | Generate Voucher /Khởi tạo voucher | Turn on when the voucher is generated by OLS instead partner. The system will automation create the number of vouher which user will provide on next step. This field can’t be changed if the voucher have been redeemed. | Swith button Default OFF | +| | Quantity /Số lượng | Condition filed This filed is only active and required if “Generate Voucher” in the previous step under ON mode. Specifies the number of voucher codes to be generated. **When a voucher code record is approved in the system, the system should automatically generate voucher numbers corresponding to the entered quantity.** This field can’t be changed if the voucher have been redeemed. In case users want to change then it should be “re-stock”/ “void” voucher use case instead. | 9(5) Should be greater than 0 if provided | +| | This is a promo code/ Đây là mã khuyến mãi | Turn on when this is a promo code. For user reference only | Swith button Default OFF | +| | ~~Voucher Type/Loại voucher~~ Promotion Type/Loại khuyến mãi | Conditon filed This field is only active and required when this voucher is a promo code. A drop-down list with the following choices: * Fixed Percentage Discount: This type of voucher offers a discount as a percentage of the total purchase amount. * Fixed Monetary Value Discount: Instead of a percentage, this voucher provides a fixed monetary discount. * Cashback Voucher: For this type of voucher, the customer receives a certain percentage of the purchase amount back as cashback to use on future purchases. * Gif Voucher: This type of voucher is often purchased as a gift for someone else. It typically has a fixed monetary value that the recipient can use towards their purchases. | Drop-down Select one | +| | Value /Giá trị | The specific value which customer can get from chosen voucher type. Condition field This field is only active and required when “Fixed Monetary Value” / “Fixed Percentation Discount” are selected on the previous step. | 9(14,2) Should be greater than 0 if provided | +| **Screen 2: Voucher Detail** **Each voucher No is displayed under one detail record in listing page** **Voucher detail is introduced as a subtab of Active voucher record.** | | | | +| | Voucher Code | Choosen voucher code | Display | +| | Voucher No | The serial voucher number of choosen voucher | +| | Redemption Date | The date when voucher is redeemed | +| | Expiry Date | Expiry date of the voucher number which is based on choosen expiry policy of the choosen voucher | +| | Redemption Indicator | One of following values: * No: If voucher is not used for any redemption transaction. * Yes: If voucher have been redeemed by customer. | +| | Fulfillment Status | One of following values: * New: When voucher is created/uploaded in OLS then the fuillment status should be new to indicator that voucher to be availbale to redeem. * Issued: The FFS is changed into Issued when voucher is successfully redeemed in the OLS. * **Fulfilled: The FFS is changed into Fulfilled when voucher is successfully redeemed and partner accept this voucher.** * Cancelled: FFS is changed intpo “Cancelled” if the customer cancels the transaction or if there are issues with the voucher that prevent its redemption. * Rejected: The vendor has rejected the voucher due to some reasons such as term and conditions, policy changes.etc. The fufillment status is updated when fulfilment status is changed. | + +* + - 1. User who can create new voucher can use “upload” function to upload the voucher file into OLS + +### Post-Conditions + +### Exception Flow + diff --git a/docs/specs/archive/onemarketing.md b/docs/specs/archive/onemarketing.md new file mode 100644 index 0000000..4435d02 --- /dev/null +++ b/docs/specs/archive/onemarketing.md @@ -0,0 +1,751 @@ +--- +title: "OneMarketing" +type: OpenSpec +status: Draft +--- +# OneMarketing + +## Overview + +OneMarketing Module includes 2 function modules: + +* **Marketing Message:** Manage (CRUD features) all message templates that are used in the system. +* **OneMarketing Request (OMR):** Filter the target customers who satisfy the set-up-criteria to send messages or get reward transactions. +* **A/Bn Testing:** to compare at least two versions of a SMS, email, or other marketing elements to determine which one performs better. +* **Frequency Capping:** The function to practice of controlling the frequency and volume of notifications or channel delivered to customers to avoid overwhelming them +* **Blacklist:** A list of customer who will be blocked for reward/promotion notification from a business. +* **Whitelist:** A list of customer who has given their consent to receive specifc types of marketing message from business. + +## Marketing message + +### Requirement Definition + +1. The marketing message module is used to define a communication message that will be sent to the target list. +2. A Message Template can be built based on a message with pre-defined parameters or HTML file. +3. User can build different messages for different marketing channels (e.g: SMS / Notification Push/ Email/ OTT …). + +### Process Flow + +[Image Removed] + +### Trigger + +N/A + +### Pre-Conditions + +1. Users have to have access rights in “Marketing Message” module to able to access this screen. +2. Depending on the user's access rights, they can view, add, edit, or approve manually message template. +3. Assume that all OMR criteria are defined as attribute and appear in right panel in message content part to user can drag/drop to setup. + +### Wireframe + +* + - 1. Message summary listing page + +[Image Removed] + +* + - 1. Filter + +[Image Removed] + +* + - 1. SMS + +1. Create SMS + +**Step1 : Choose message chanel : SMS and choose create new or re-use existing message template** + +[Image Removed] + +**Step 2: Step up “General information”** + +[Image Removed] + +**Step 3: Set up message content** + +[Image Removed] + +[Image Removed] + +**Finish by save.** + +1. SMS detail view + +[Image Removed] + +* + - 1. **Email** + +1. Create Email message + +**Step 1: Choose message chanel : Email and choose create new or re-use existing Email template** + +[Image Removed] + +**Step 2: Set up “General information”** + +[Image Removed] + +**Step 3: Set up “Sender information”** + +[Image Removed] + +**Step 4: Setup Email content** + +[Image Removed] + +**Upload email template** + +[Image Removed] + +[Image Removed] + +* + - 1. **Push notification** + +Create Push notification message + +**Step 1: Choose message chanel : Push and choose create new or re-use existing Push template** + +[Image Removed] + +**Step 2: Update “Generate information”** + +[Image Removed] + +**Step 3.1: Message content configuration for “Richer push”** + +[Image Removed] + +**Step 3.2: Message content for “Carousel push”** + +[Image Removed] + +**View mode** + +[Image Removed] + +### Business Rules + +1. OLS system can send a message to target customer through a notification on the app, an email, an SMS, and so on. These varied media used for message delivery are known as “channels”. +2. In this version, OLS support to user can test message enable previewing the message to make sure the message appear exactly the way it was meant to. Just enter the email adress or phone number user wish to check the message preview. +3. Besides, OLS support to user can setup message template to re-use in the furture. +4. Click on the “Marketing Message” in Main icon to bring up the screen for accessing the Markting Message listing page. The detail as illustrated in the [wireframe](#_Wireframe_10). +5. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for marketing message screen is illustrated in the [wireframe](#_Wireframe_10). +6. **Screen description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Create /Edit mode** | | | | +| **SMS message** | | | | +| | **Step 1: General Information** | | | +| | Message ID \* | Unique identifier of the Message. Not allow special characters | X(10) | +| | Message Description \* | Description of message | X(100) | +| | SMS Type | Drop-down to select SMS type: Promotion/Marketing Transaction | Check box type Select one value only Lookup value “Code Management” table where type code is “OMR-type”. Refer to ‘list-by-code-type’ API under Master Data. | +| | Effective Date From \* | The start date of the effective period of the message | Date Date time format must respect the date configuration format | +| | Effective End Date \* | The end date of the effective period of the message | Date Date time format must respect the date configuration format | +| | **Step 2: SMS Content Configuration** | | | +| | SMS Brand Name \* | Drop -down to select SMS Sender | Drop-down Lookup value from master data | +| | Message \* | The message content of the SMS. The list of message parameters are included to be used. User can drop/drag message paramters into message. Assumation that the list of message parameters are defined as attribute (the same approach as Rule criteria) to able to drop/drag into message. SMS message don’t support : 1. Images 1. A subject line 2. Attachments **SMS messages are written in Unicode (non –GSM standard). Standard single message or multi-part message are credited based on the message content.** | X(5000) | +| | Message parameters | The message parameter list. [Image Removed] | Tree list | +| | Preview | The message will be automation displayed in the preview part. | Displaya | +| | The number of characters in the message\* | This value will be automatically upadated when the user update the message content. | Display as number format | +| | Send sample | This functions to support user can test message enable previewing the message to make sure the message appear exactly the way it was meant to. * + - 1. A textbox to user can enter a phone number is dispalyed 2. When user click on “Send sample” a confirm message is display. It use to user confirm that the system will send a testing message into inputed phone number. User can choose “OK” or “Cancel”. If user click on “OK” button the system will send a sms message into inputed phone number. 3. Mobile phone number should be required when user click on” Send sample”. If not found should reject with error message | Button | +| **Email message** | | | | +| | **Step 1 : General Information** | | | +| | Message ID \* | Unique identifier of the Message. Not allow special characters | X(10) | +| | Message Description \* | Description of message | X(100) | +| | Email Type | Drop-down to select Email type: **Promotion/Marketing** **Transaction** | Checkbox Allow to select only one value. Lookup value “Code Management” table where type code is “OMR-type”. Refer to ‘list-by-code-type’ API under Master Data. Lookup value from master data | +| | Effective Date From \* | The start date of the effective period of the message | Date The date format must adhere to the configured format | +| | Effective End Date \* | The end date of the effective period of the message | Date The date format must adhere to the configured format | +| | Use type \* | 2 options to config email message : * + 1. Use messge. 2. Upload template. | Checkbox Allow to select only one value. Lookup value “Code Management” table where type code is “email-use-type”. Refer to ‘list-by-code-type’ API under Master Data. | +| | **Step 2: Sender information** | | | +| | Sender Name\* | The name of sender | X(100) | +| | From email\* | The email addess used to send email to target customer | Display This email is configured. | +| | Subject\* | Subject of email | X(100) | +| | Preview Text | Preheader of Email Preheader can help user connect with customer and increase customer’s open rate. If Prejeader is not provided then the first line of email content will be display instead | X(100) | +| **3.** | **Step 3: Email content figuration** | | | +| | Message | Conditon field The message content of the Email. If “Use message” is selected then this field is actived. System must allow to edit HTML format. The system should support to generate into text format. System must allow to put image/url… as message content. The list of message parameters are included to be used. User can drop/drag message paramters into message. Assumation that the list of message parameters are defined as attribute (the same approach as Rule criteria) to able to drop/drag into message. | Character | +| | Message parameters | The message parameter list. [Image Removed] | Tree list | +| | Upload file | This filed is actived when “Use template” is selected. [Image Removed] Allow users to drag and drop an HTML template file, or they can choose a file from their computer to upload it into the system. After uploading, the system displays message content based on the uploaded file and allows the user to review and make modifications. | Button | +| | Re-Upload | Use this button to re-upload the email template. | Button | +| | Preview the email | The message will be automation displayed in the preview part. Sender / Subject and Preheader will be displayed here. If Preheader is not provided then the first line of message will be display instead. | Display | +| | Send sample | This functions to support the user can test message enable previewing the message to make sure the message appear exactly the way it was meant to. * + - 1. A textbox to user can enter an email address. This entry should adhere to the email format field. 2. When click on “Send sample” a confirm button to user confirm that the system will send a testing message into inputed email address. User can choose “OK” or “Cancel”. If user click on “OK” button the system will send a test email into inputed email address. 3. The email address should be required when user click on” Send sample”. If not found should reject with error message. | Button | +| **Notification Push** | | | | +| | **Step 1: General information** | | | +| | Message ID \* | Unique identifier of the Message. Not allow special characters | X(10) | +| | Message Description \* | Description of message | X(100) | +| | Notification Type | Drop-down to select Notification type: Promotion/Marketing Transaction | Check box Allow to select only one value. Lookup value “Code Management” table where type code is “email-use-type”. Refer to ‘list-by-code-type’ API under Master Data. | +| | Effective Date From \* | The start date of the effective period of the message | Date The date format must adhere to the configured format | +| | Effective End Date \* | The end date of the effective period of the message | Date The date format must adhere to the configured format. | +| | **Step 2: Notification Content configuration** | | | +| | Message Title \* | The primary text that appears at the top of the notification | X(50) | +| | Message \* | The main content of the notification, providing additional information, context, or details related to the notification's purpose. The list of message parameters are included to be used. User can drop/drag message paramters into message. System must allow to put image/url as message content. | Text Area | +| | Message parameters | The message parameter list. [Image Removed] | Tree list | +| | Image type\* | Drop- down to selcte image type: SingerEicheer push (No image ) Richer Push (one image) Carousel Push (One or more than one image) | Drop- down Select one only Lookup value “Code Management” table where type code is “image-type”. Refer to ‘list-by-code-type’ API under Master Data. | +| | Upload Image | Condition field * + - 1. This field is not actived for Single Push 2. Image URL : Click on the Image URL field and type or paste the URL of the image 3. Upload: Drag/Drop image or click the uploaded from computer. If the Image type is 'Carousel Push,' then users can upload more than one image. The sequence sorting will be the same as the sequence displayed in the mobile app. Users can rearrange the images to adjust the sortinng. Image is required for “Richer push” and “Carousel Push”. | | +| | Preview the notification | The message will be automation displayed in the preview part: content/ image. Preview on IOS or Android | Display | +| | Link URL \* | Enter or paste the URL to which the user needs to navigate to. | X(100) | +| | Send sample | This functions to support user can test message enable previewing the message to make sure the message appear exactly the way it was meant to. * + - 1. A textbox to user can enter a CIF Number. From CIF Number the system will locate device's registration token, a device group's notification key, or a single topic. 2. A confirm message to user confirm that the system will send a testing message into inputed email address. User can choose “OK” or “Cancel”. If user click on “OK” button the system will send a test notification. 3. The token or key or something else which one the system used determine destination of the push message should be required when user click on” Send sample”. If not found should reject with error message. | Button | + +### Post -codition + +* + 1. All message which will be sent to target customer are availble to config on following modules : + ++ Marketing Request + ++ Campaign Rule + ++ Item master …. + +### Exception Flow + +* + 1. Input data are not passed all validations and then the user choose cancel the action then use case ends in failure. + +## Marketing Campaign + +### Requirement Definition + +* + - 1. Marketing Campagin Module is used to filter out a list of target customers that satisfy the marketing criterions. + +### Process Flow + +[Image Removed] + +### Trigger + +N/A + +### Pre- Conditon + +1. Users have to have access rights in “Marketing Request” module to able to access this screen. +2. Depending on the user's access rights, they can view, add, edit, or approve manually marketing request. +3. All OMR citerions must to be defined as an attribute for each criterion to user can drop/drag to determine target audience. +4. To send marketing messange when an envent is triggered (real time events or batch events + ) then : + 1. Pre-Defined Event: Define the action to indentify when event triggers: such as login/ Get balance detail view/ leave feedback on portal app. + 2. FE Events: APIs or services can be used to initiate the action and make a call to the backend (BE) to determine whether the event has been triggered; if so, the assigned message for this event should be sent. + 3. Batch job: marketing message can be automatically sent by the system via batch jobs. + +### Wireframe + +* + - * 1. Marketing request summary listing page + +[Image Removed] + +1. Filter + +[Image Removed] + +1. Create/Edit mode + 1. Step 1: General information + +[Image Removed] + +* 1. Step 2: Run schedule + +[Image Removed] + +[Image Removed] + +* 1. Step 3: Targeting + +[Image Removed] + +4. Detail view + +### Business Rules + +1. The same approach as Campaign Rule Criteria, each of marketing criterions are accessed directly by drag/drop on the right **Criteria** panel as illustrated in the [wireframe](#_Wireframe_12). +2. OLS system will use Query Builder to build query for marketing criteria. +3. All criterions will be listed on selection criteria panel (right panel). User can drag/drop criteria from right panel to set up rule. Criterion list will be defined as attribute so that user can define needed criteritions. +4. OLS system support AND or OR condition between difference criteria groups on the same request. The relationship operator on each group will be applied for all criteritions on the group. User can setup only one or many group on the same rule but OLS system just support the same operator condition bettwen groups such as all are OR conditons or all are AND conditions. + +*For example:* + +*Rule 1:* + +*Group 1* ***OR*** *Group 2* ***OR*** *Group 3* + +*Rule 2:* + +*Group 1* ***AND*** *Group 2* ***AND*** *Group 3.* + +1. Introduce NOT toggle switch to support exclusion criteria. +2. Click on the “Marketing Request” in Main icon to bring up the screen for accessing the Marketing Request listing page. The detail as illustrated in the [wireframe](#_Wireframe_12). +3. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Marketing Request screen is illustrated in the [wireframe](#_Wireframe_12). +4. **Screen description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Step 1: General Information** | | | | +| | Request ID \* | Unique identifier of the OneMarketing Request Not allow special characters | X(20) | +| | Description \* | Description of the OneMarketing Request | X(100) | +| | Effective Date From\* | The start date of Effective period of the marketing request | Date The date format must adhere to the configured format | +| | Effective Date To \* | The end date of Effective period of the marketing request | Date The date format must adhere to the configured format | +| | Marketing Function \* | * Including 2 main functions of OneMarketing Request: + Notification [N] - The message template set up at section [Marketing Message](#_Marketing_message) is sent to target customers + Triger Campain Rule [TCR] - A campaign is applied to add/redeem/adjust points to target customers based on Transaction Code. | Check box Allow to select only one value Lookup value from “Code\_Management” table where type code is ‘OMR-function’. Refer to ‘list-by-code-type’ API under Master Data Master. | +| **Step 2: Run schedule and message content** | | | | +| | Trigger method \* | Two methods to select when message will be sent to target customer: Schedule Event trigger | Radio button Lookup value from “Code\_Management” table where type code is ‘OMR-function’. Refer to ‘list-by-code-type’ API under Master Data Master. | +| | Run Schedule \* | * This field is activated and required when “Schedule” method is selected only. * Schedule to run OneMarketing Request Batch, include: *[O] – Once Time [D] - Daily* *[W] - Weekly [M] - Monthly* *[A] - Annually* | Radio button Lookup value from “Code\_Management” table where type code is ‘run-schedule’. Refer to ‘list-by-code-type’ API under Master Data Master. | +| | One time | [Image Removed] * 1. This option includes following fields: 1. Fixed date\*: This field is only active and required when “One time” schedule is selected. This field is date format (Date time format must respect the date format configuration). This field is actived and required when “Schedule” method is selected only. 2. Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. 2. Request will occur only one time when process date is equal to the fixed date at the selected time. | | +| | Daily | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\*: The drop-down list to select the frequency on every n day where n from 1 to 100. This is select one field. 2. Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. 1. Request will occur on every n day at the selected time. | | +| | Weekly | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\*: The drop-down list to select the frequency on every n week where n from 1 to 52. This is select one field. 2. Day of the week: The drop -down list to select the day of week the request will be occurred. The list includes list of day of week (from Monday to Sunday). This is multiple select field. 3. Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. 1. Request will occur on every n weeks on selected day of the week and at the selected time | | +| | Monthly | * 1. Option 1 [Image Removed] This option includes following fields: * + - Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. - Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the.”Each” is selected. - Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. This field is activied and required only when “Each” is selected on “Repeat on the” filed. This is multiple select field. - Last day of month: This field is activied and required only when “Each” is slected on “Repeat on the” filed. This is checkbox field with default as uncheck. If this field is checked then in case the last day of month is less than the “Day of month” then request will be occurred on last day of month instead. - Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. Request will occur on every n month on each selected day of the month and at the selected time. * 1. Option 2 [Image Removed] This option includes following fields: * + - Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. - Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the. “On the” is selected. - In : The drop-dow to select the specific day of the week. The list includes : First/ Second/ Third/ Fouth/ Last. This filed is actived and required only when “On the” is selected. This is select one field. - Day of the week: The drop-down list to select day of the week. The list includes: Monday … Sunday. This is multiple field. - Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. Request will occur on every n month on each selected period of day of the weeek and at the selected time. | | +| | Annually | [Image Removed] This option includes following fields: * + - Repeat every: The drop-down list to select the frequency on every n year where n from 1 to 5. This is select one filed. - Month of year: Drop-down to select month of year. The list includes 12 months of year from 1 to 12. - Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. - Time of day to excute request\*: The time to OMR batch job running to trigger this request. This field is time format field. Request will occurred every n year on the selected day and selected month. | Drop-down Select one | +| | Business Event | This filed is actived and requied when “Event trigger” method is selected. A drop-down list is used to select the event. When the event occurs, a request is triggered to send a message to the target customer. | Drop-down Multiple select. | +| | Message template\* | This filed is actived and required only when “Notification” marketing function is selected. | Drop-down Lookup value from martketing message screen. | +| | OLS Transaction Code | This filed is actived and required only when “Trigger Campaign Rule” marketing function is selected. | Drop-down Lookup value from OLS Transaction Code screen. Refer “OLS Transaction Code” API under Campaign Management | +| **Step 3: Targeting** **This step is used to config the conditions to get target customer.** | | | | +| | Trigger method \* | There are two options to setup targeting. * + - OMR Criteiria - Upload file | Radio button Lookup value from master data. | +| | **OMR Criteira is selected** | | | +| | [Image Removed] | Depended on the purpose of each OMR request and the criterions list need to be setup to allocate and arrange all criterions into only one or many group. Click on “[Image Removed]” button to create new group. | Button | +| | [Image Removed] | This button is used to exclude all the coming transaction meet the rule criteria. Switch NOT button are applied on combinaiton of all group OR on all criteria on each group. | Switch button | +| | Right panel | List all active criteria on the system. Assumed that Each criteria per category will be defined as an attribute. [Image Removed] | View only | +| | Drag/Drop criteria | Each criteria can be drag one more time on each request. The condition and filler value for each criteria will be display base on data type of criteria. See more detail on [Campaign Rule](#_Campaign_Rule_Criteria) Criteria. [Image Removed] | Action | +| | **“Upload file” is selected** [Image Removed] | | | +| | Browse File | Allow users to drag and drop an upload file, or the user can choose a file from their computer to upload it into the system. Use the 'Upload file' option when users have a specific targeting list that they want to use for the campaign. | Button | + +* 1. “Save as draft” and “Save as template” feature are applied on this screen. + 2. **OMR batch job will trigger marketing request as following processing:** + +OMR job (OMR) just trigger effectived marketing requests based on Effective period of each request compare with processing date (batch date/ sysdate). From effectived request list the batch job find the valid job which have run schedule on the day batch job is running. + +OMR creates notification messages to be sent to customers selected based on criteria configured by users in the step 3 -OMR criteria – e.g., to send an SMS message to customers whose birthday is due in the next N days. + +OMR can also be configured to trigger awarding batches generated by extracting transactions from Transaction log table. + +OMR can be configrured to trigger CP rule for the customer selected based on based on criteria configured by users in the step 3 -OMR criteria – e.g., to award 100 cash back to customers whose birthday in Tet holiday. + +OMR will stop send message when limit is reached. The limit based on frequency capping configurued by user in step 4- Frequency capping. + +| | | +| --- | --- | +| Batch id | OMR job ==tbd== | +| Description | Processes OneMarketing Requests (OMR) on the configured schedule | +| File Id | Nil | +| Input file | Nil | +| input staging table | ==TBD== | +| Tables read | Its depending in OMR criteria list which should be defined as an attribute for each criteira. == TBD==== | +| Tables updated | =TBD=== | +| Output staging table | Nil | +| Output file | Nil | +| Unwind job | ==TBD== | + +### Post – Condition + +* + - 1. Marketing content is sent to target customer or Target customer trigger CP rule. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Marketing Frequency Cap + +### Requirement Defintion + +* + - 1. By controlling frequency capping, business can provide a more personalized customer expirence. Beside, frequency capping can provide a high level overview of the need for a notification capping system and the expected benefits for the business and its customers. + 2. Business able to setup the daily, weekly, monthly capping per customer. + 3. The system should automaticly enforcement of notification caps across different communication channels. + +### Process Flow + +### Trigger + +### Pre-Conditions + +1. Users have to have access rights in “Frequency Capping” module to able to access this screen. +2. Depending on user’s access right to user can modify the frequency capping of the marketing campaign. + +### Wireframe + +* + - * 1. Listing page + +[Image Removed] + +* + - * 1. Edit mode + +[Image Removed] + +* + - * 1. View mode + +[Image Removed] + +### Business Rules + +1. This step is used to set up a limit to the number of times a message has been sent to per uniquie customer on specific period. +2. This step is also used to setup a limit the number of message that a business allow to send to customer through specific message channel. +3. Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Listing page** | | | | +| | Notification Channel/Kênh thông báo | The name of the notification channel | Display | +| | Effective Date From /Hiệu lực từ ngày | The start date of the cap | Display as date format. The display format should respect the configured format. | +| | Effective Date To/Hiệu lực tới ngày | The last effective date of the cap | +| | Frequency Cap/Giới hạn tần suất | The frequency cap on each channel. Each period unit is displayed as a separate record with the cap | Display | +| | Include White List/Bao gồm danh sách trắng | Whitelist who are excluded from the cap or not | Display | +| **Edit mode** | | | | +| | Frequency Cap Id\*/ Id giới hạn tần suất | The Record inditifier | X(10) | +| | Notification Channel\*/Kênh thông báo | Marketing Frequecny Capping identifier A drop-down to select one channel to apply the capping rules. A list incluse following channel: * + - SMS - Email - Push Notifications | Drop-down Select one | +| | Effective Date From \*/ Hiệu lực từ ngày | The start date of the effective period of the cap | Date The system should only have one effective cap applied on each channel at any given time | +| | Effective Date To\*/Hiệu lực tới ngày | The end date of the effective period of the cap | +| | **Frequency Cap/ Giới hạn tần suất** **Require at least one period unit** | | | +| | + Add Period Unit/ Thêm chu kì | Click to add new period unit to limit for chosen channel. | Button | +| | Capping Period \*/Chu kì | A drop-down to select the following period: * + 1. Daily: Maximum number of notifications per day. 2. Weekly: Maximum number of notifications per week 3. Monthly: Maximun number of notifications per month. | Drop-down Select one Each period should only be configured with one cap value at the same time. | +| | Maximum number \*/Số lần gửi thông báo tối đa | The maximum the number of times a message has been sent to per uniquie customer. | 9(12) | +| | Include Whitelist/Không bao gồm danh sách trắng | This option disallows/allows the white customer list allow to receive a higher notification than normal customer for spefic scenario. | Swith button Defaut OFF | +| | Customer list /Danh sách khách hàng | A drop-down to select the white customer list. This allows the system to recognize the white list customers and ignore the frequency capping rules. This is a condition filed and only active and required if the capping rules include the white customer list. | Drop – down Multiple select | +| | Description /Mô tả | The description of the capping. For refer only | X(100) | + +* 1. Frequency Capping are applied to all marketing campaigns in the system for customer level. + 2. The system should automaticallytrack the number of notifications a customer has received across all notification channels as well as the period unit. + 3. If the customer has reached the notification cap then the notification is not delivered to customer. + 4. The white list who are excluded from the frequency cap rules should be tracked also. + +### Post –condition + +### Exception Flow + +## A/Bn Testing + +### Requirement Definition + +* + - 1. This function is used to evaluate and optimize various elements of the marketing program to improve customer engagement, retention, and overall performance. + 2. OLS support both A/Bn content testing and A/Bn target customer testing. + 3. For A/Bn content testing, one variation (content A) of the marketing request is sent to a subset of target customers, and one or more different variations (content sample B/ content sample n) are sent to the same subset of target customers. The goal is to identify which content in the marketing request yields the best results. + 4. Unlike A/B content testing, A/Bn target customer testing focuses solely on the target customers. In the same testing request, one variation is designated for 'target customer A,' while one or more variations are designated for 'target customer B' or 'target customer n.' The goal is to identify which OMR criteria in the marketing request will reach more customers. + +### Process Flow + +[Image Removed] + +### Trigger + +N/A + +### Pre-Conditions + +* + - * 1. For A/Bn messsage content testing, result testing must be provied from third-party to OLS can collect data and analyze result to introduce report which user can use to make decision which on is better. + 2. Users have to have access rights in “A/Bn Testing” module to able to access this screen. + 3. Depending on the user's access rights, they can view, add, edit, or approve manually marketing request. + 4. All OMR citerions must to be defined as an attribute for each criterion to user can drop/drag to determine target audience. + +### Wireframe + +Summary listing page + +[Image Removed] + +* 1. Filter + +[Image Removed] + +* 1. Content marketing testing configuration + +**Step1: Choose testing type is “Content message testing”** + +[Image Removed] + +Step 2: Setup general information + +[Image Removed] + +Step 3: Choose target customer + +[Image Removed] + +Step 4: Setup variant content message + +[Image Removed] + +Step 5: Set up run schedule + +[Image Removed] + +* 1. Target customer testing configuration + +Step 1: Choose “Target customer testing” + +[Image Removed] + +Step 2: Set up general information + +[Image Removed] + +Step 3: Setup variant target customer + +[Image Removed] + +Step 4: Setup run schedule + +[Image Removed] + +### Business Rules + +1. The same approach as Campaign Rule Criteria, each of marketing criterions are accessed directly by drag/drop on the right **Criteria** panel as illustrated in the wireframe. +2. OLS system will use Query Builder to build query for OMR criteria when user setup target customer. +3. All criterions will be listed on selection criteria panel (right panel). User can drag/drop criteria from right panel to set up rule. Criterion list will be defined as attribute so that user can define needed criteritions. +4. Click on the “A/Bn Testing” in Main icon to bring up the screen for accessing the A/Bn Testing listing page. The detail as illustrated in the [wireframe](#_Wireframe_16). +5. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for A/B testing screen is illustrated in the [wireframe](#_Wireframe_16)s. +6. **Screen description:** + +**Create/Edit mode** + +| | | | | | +| --- | --- | --- | --- | --- | +| **Index** | **Field** | | **Descriptions** | **Data type** | +| * + - * 1. **A/B message content testing** | | | | | +| **Step 1: Campaign information** | | | | | +| | | Campaign ID \* | Marketing Campaign ID Unique and Not allow specical characters | X(20) | +| | | Campaign Description | Description of Marketing Campaign ID | X(100) | +| | | Effective Date From | The start date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | | Effective End date\* | The end date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | | Message channel \* | SMS Email Push | Checkbox Allow to select only one value Lookup from master data. | +| **Step 2: Choose target customer** The OMR criteria list must be the same as the OMR criteria list on “[Marketing request”](#_Marketing_Request). | | | | | +| | [Image Removed] | | Depended on the purpose of each OMR request and the criterions list need to be setup to allocate and arrange all criterions into only one or many group. Click on “[Image Removed]” button to create new group. | Button | +| | [Image Removed] | | This button is used to exclude all the coming transaction meet the rule criteria. Switch NOT button are applied on combinaiton of all group OR on all criteria on each group. | Switch button | +| | Right panel | | List all active criteria on the system. Assumed that Each criteria per category will be defined as an attribute. [Image Removed] | View only | +| | Drag/Drop criteria | | Each criteria can be drag one more time on each request . The condition and filler value for each criteria will be display base on data type of criteria. See more detail on [Campaign Rule](#_Campaign_Rule_Criteria) Criteria. [Image Removed] | Action | +| **Step 3: Set up varial content** [Image Removed] | | | | | +| | Variant A Users can rename and should be unique value on one each campaign | | Depending in Message channel : SMS/ Email/ Push notification, this tab is display as step 2 of Marketing message screen according to each message channel. See more on [Marketing message](#_Business_Rules). Content varial A will be added here. | Tab | +| | Varial B Users can rename and should be unique value on one each campaign | | Depending in Message channel : SMS/ Email/ Push notification, this tab is display as step 2 of Marketing message screen according to each message channel. See more on [Marketing message](#_Business_Rules). Content varial B will be added here. | | +| | Add | | Click to add to introduce new tab to create new content varial. System will automation populate varinant name as default and users can rename and should be unique value on one each campaign. | Button | +| **Step 4: Running schedule** | | | | | +| | Run Schedule \* | | * This field is activated and required when “Schedule” method is selected only. * Schedule to run OneMarketing Request Batch, include: *[O] – Once Time [D] - Daily* *[W] - Weekly [M] - Monthly* *[A] - Annually* | Drop-down Select one Lookup value from master data | +| | One time | | [Image Removed] * 1. This option includes following fields: 1. Fixed date\* : This field is activated and required when “One time” schedule is selected. This field is Date format . This field is actived and required when “Schedule” method is selected only. 2. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will run only one time when process date is equal to the fixed date at the selected time. | | +| | Daily | | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\* : The drop-down list to select the frequency on every n day where n from 1 to 100. This is select one field. 2. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campign will run and repeat on every n day at the selected time. | | +| | Weekly | | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\* : The drop-down list to select the frequency on every n week where n from 1 to 52. This is select one field. 2. Day of the week: The drop -down list to select the day of week the request will be occurred. The list includes list of day of week (from Monday to Sunday). This is multiple select field. 3. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campign will run and repeat on every n weeks on selected day of the week and at the selected time | | +| | Monthly | | * 1. Option 1 [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. 2. Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the.”Each” is selected. 3. Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. This field is activied and required only when “Each” is slected on “Repeat on the” filed. This is multiple select field. 4. Last day of month: This field is activied and required only when “Each” is slected on “Repeat on the” filed. This is checkbox field with default as uncheck. If this field is checked then in case the last day of month is less than the “Day of month” then request will be occurred on last day of month instead. 5. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat on every n month on each selected day of the month and at the selected time. * 1. Option 2 [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. 2. Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the. “On the” is selected. 3. In : The drop-dow to select the specific day of the week. The list includes : First/ Second/ Third/ Fouth/ Last. This filed is actived and required only when “On the” is selected. This is select one field. 4. Day of the week: The drop-down list to select day of the week. The list includes: Monday … Sunday. This is multiple field. 5. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat on every n month on each selected period of day of the weeek and at the selected time. | | +| | Annually | | [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n year where n from 1 to 5. This is select one filed. 2. Month of year: Drop-down to select month of year. The list includes 12 months of year from 1 to 12. 3. Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. 4. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat every n year on the selected day and selected month. | Drop-down Select one | +| **II: A/B target customer testing** | | | | | +| **Step 1: General information** | | | | | +| | Campaign ID \* | | Marketing Campaign ID Unique and Not allow specical characters | X(20) | +| | Campaign Description | | Description of Marketing Campaign ID | X(100) | +| | Effective Date From | | The start date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | Effective End date\* | | The end date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| **Step 2: Set up variant target customer** | | | | | +| | Variant A User can rename and should be unique value on one each campaign | | This tab display the all OMR criteria to user can drag/drop to config the criterios to get the target customer. The OMR criteria list must be the same as the OMR criteria list on “[Marketing request”](#_Marketing_Request). Target customer varial A will be added here. The system will use all OMR criteria configuration on this tab to conduct and get target customer A. | Tab | +| | Varial B User can rename and should be unique value on one each campaign | | This tab display the all OMR criteria to user can drag/drop to config the criterios to get the target customer. The OMR criteria list must be the same as the OMR criteria list on “[Marketing request”](#_Marketing_Request). Target customer varial B will be added here. The system will use all OMR criteria configuration on this tab to conduct and get target customer A. | Tab | +| | Add | | Click to add to introduce new tab to create new target customer varial. The OMR criteria list must be the same as the OMR criteria list on “[Marketing request”](#_Marketing_Request). System will automation populate variant name as default and User can rename and should be unique value on one each campaign. | Button | +| **Step 3: Running schedule** | | | | | +| | Run Schedule \* | | * This field is activated and required when “Schedule” method is selected only. * Schedule to run OneMarketing Request Batch, include: *[O] – Once Time [D] - Daily* *[W] - Weekly [M] - Monthly* *[A] - Annually* | Drop-down Select one Lookup value from master data | +| | One time | | [Image Removed] * 1. This option includes following fields: 1. Fixed date\* : This field is activated and required when “One time” schedule is selected. This field is Date format. This field is actived and required when “Schedule” method is selected only. 2. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. * Campaign will run only one time when process date is equal to the fixed date at the selected time. | | +| | Daily | | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\* : The drop-down list to select the frequency on every n day where n from 1 to 100. This is select one field. 2. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campign will run and repeat on every n day at the selected time. | | +| | Weekly | | [Image Removed] * + - 1. This option includes following fields: 1. Repeat every\* : The drop-down list to select the frequency on every n week where n from 1 to 52. This is select one field. 2. Day of the week: The drop -down list to select the day of week the request will be occurred. The list includes list of day of week (from Monday to Sunday). This is multiple select field. 3. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campign will run and repeat on every n weeks on selected day of the week and at the selected time | | +| | Monthly | | * 1. Option 1 [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. 2. Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the.”Each” is selected. 3. Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. This field is activied and required only when “Each” is slected on “Repeat on the” filed. This is multiple select field. 4. Last day of month: This field is activied and required only when “Each” is slected on “Repeat on the” filed. This is checkbox field with default as uncheck. If this field is checked then in case the last day of month is less than the “Day of month” then request will be occurred on last day of month instead. 5. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat on every n month on each selected day of the month and at the selected time. * 1. Option 2 [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. 2. Repeat on the: The drop-down list to select the repeat type. The list includes : Each /On the. “On the” is selected. 3. In : The drop-dow to select the specific day of the week. The list includes : First/ Second/ Third/ Fouth/ Last. This filed is actived and required only when “On the” is selected. This is select one field. 4. Day of the week: The drop-down list to select day of the week. The list includes: Monday … Sunday. This is multiple field. 5. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat on every n month on each selected period of day of the weeek and at the selected time. | | +| | Annually | | [Image Removed] This option includes following fields: * + 1. Repeat every: The drop-down list to select the frequency on every n year where n from 1 to 5. This is select one filed. 2. Month of year: Drop-down to select month of year. The list includes 12 months of year from 1 to 12. 3. Day of month: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. 4. Time of day to excute request\* : The time to OMR batch job running to trigger this request. This field is time format field. Campaign will trigger and repeat every n year on the selected day and selected month. | Drop-down Select one | + +**Content marketing testing view mode** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| | Campaign ID | Campaign ID | X(20) | +| | Campaign Description | Description of Marketing Campaign ID | X(100) | +| | Message chanel\* | Push or Email or SMS | Display | +| | Effective Date From | The start date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | Effective End date\* | The end date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | OMR criteria | View as Rule criteria view mode for this part | Display | +| | Variant A | View as Message Template view mode for message content part | Tab | +| | Variant B | View as Message Template view mode for message content part | Tab | +| | Variant N | View as Message Template view mode for message content part | Tab | +| | Result | =TBD== It is depened on the third-party partner and the goal. We can want to see the total result on each content variation or detail result for each target customer on each content variation. | ==tbd== | + +**Targeting marketing testing view mode** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| | Campaign ID | Campaign ID | X(20) | +| | Campaign Description | Description of Marketing Campaign ID | X(100) | +| | Message chanel\* | Push or Email or SMS | Display | +| | Effective Date From | The start date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | Effective End date\* | The end date of the effective period of the A/Bn testing request | Date The date format must adhere to the configured format | +| | Variant A | View as Marketing request view mode for OMR criteria part. | Tab | +| | Variant B | View as Marketing request view mode for OMR criteria part. | Tab | +| | Variant N | View as Marketing request view mode for OMR criteria part. | Tab | +| | Result | One gird to view the customer list on each variation | | | | | | | --- | --- | --- | --- | --- | | **Variation** | **Total number of customers** | **Total Female customer** | **Total male customer** | **….** | | Variation A | 100 | 10 | 90 | | | Variation B | 150 | 100 | 50 | | | Variation n | 140 | 50 | 90 | | | ==tbd== **Which criteria should be summarized??** | + +* 1. **A/Bn batch job will trigger marketing request as following processing:** + 1. A/Bn testing job (ABn) just trigger effectived A/Bn testing requests based on effectived period of each request compare with processing date (batch date/ sysdate). From effectived request list the batch job find the valid job which have run schedule on the day batch job is running. + 2. For content testing, ABn creates A/Bn message content selected based on the variation content configured by user. These message to be sent to the same customers selected based on criteria configured by users. E.g to send 3 promotion messages to customers whose birthday is due in the next N days. The result testing should be provied by parter so that OLS can provide the report to user can decide which content messge is better. + 3. Regarding to target customer testing, A/Bn locates the target customer based on criteria configured by users. User can verify the result testing after batch job is completed. + 4. For A/Bn SMS content testing, we can track click-through rates if SMS includes links or calls to action. By including unique links for different messages or recipients, we can measure how many people clicked on those links to interact with each content. From this result we can have the temporary open rate to user can decide which one is better. + 5. For A/Bn Email content testing, open rate = (Number of opens / Number of delivered emails)/100. Number of opens is provided by third-party or we have to send email is in HTML format, as tracking pixels work with HTML emails. The number of opens willl be is the number of times the tracking pixel was downloaded when recipients opened the email. + 6. ==tbd== + +### Post-Conditions + +### Exception Flow + +## BlackList + +### Requirement Definition + +* + - 1. The business need to exclude specific customer or groups from marketing campaigns for strategic reasons, such as fraud customers. + 2. Ensuring marketing efforts are focused on the most relevant and engaged audience to improve efficiency and return on investment. + 3. A set of customer who will be blocked for reward/promotion notification from a business wil be pre-definiton in this module. + +### Process Flow + +### Trigger + +* + - * 1. The customer who has fraud behaviors will need to be added into black list. + +### Pre-Conditions + +* + - * 1. Users have to have access rights in “Black List” module to able to access this screen. + 2. Depending on the user's access rights, they can view, add, edit, or approve manually marketing request. + +### Wireframe + +Listing page + +[Image Removed] + +Edit mode + +Step 1: Generral Information + +[Image Removed] + +Step 2: Customer List + +[Image Removed] + +[Image Removed] + +[Image Removed] + +Detail Mode + +[Image Removed] + +### Business Rules + +Users are able to upload a list of customers who will be blocked from the marketing campaign by uploading a file into the system. + +Additionally, users are able to assign customers to the blacklist by selecting a list of cif number belong to OLS system. + +Users are able to review the customer list or download the customer list that they have already uploaded to the system. + +Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Listing page** | | | | +| | ID / ID | Blacklist indentifier | Display | +| | Name List/ Tên danh sách | The name of the black list. | Display | +| | Description/Mô tả | More description for this blacklist. | Display | +| | Customer List/Danh sách khách hàng | A list of customer that inputted by user or uploaded by user. Use ellipsis (…) to indicate that the customer list is too long to display in full. Mouseover to see full list. | Display | +| | [Image Removed] | By clicking here to download the customer list. This should be orginal file if this file is uploaded by the user. A file containing a list of customers entered by the user will be generated by the system. This file should under the CSV format as upload sample file. | Button | +| **Edit mode** | | | | +| | **General Information** | | | +| | ID \*/ ID | Blacklist indentifier For refer only | X(10) | +| | Name List\*/ Tên danh sách | The name of the black list. For refere only | X(50) | +| | Description/Mô tả | More description for this blacklist. For refer only | X(200) | +| | **Customer List** | | | +| | Input Type\*/ Kiểu nhập dữ liệu | Users can choose one of following option : * + - Input from screen - Upload file | Radio | +| | Customer List/ Danh sách khách hàng | A drop-down to select the customer who will be blocked from the marketing campaign if “input from screen” is selected in previous step. | Drop-down Multiple select To avoid performance issue, user should enter at least 4 digit of CIF number to select the customer | +| | Upload file/Tải file | This option allow users upload file from their divice. The file shoud follow system’s format. Just allow CSV, xls, xlsx extension and file size should less than or equal to 50 MB. User can drag/drop or choose browse fiel from their device. | Button | +| | Customer List | If file upload successful then the customer list will be display here | Display | + +Users review and approve the record in the same manner as on other screens + +### Post-Conditions + +The blacklist is stored and accessible to another module. + +### Exception Flow + +If the file type or size is not valid, the system displays an error message and prompts the customer to select a different file. + +The system should clearly display the upload processing status to the user. + +## Whitelist + +### Requirement Definition + +* + - 1. The business need to exclude a list of customers that are excluded from the standard frequency cap rules. + 2. The whitelist ensures your top customers continue receiving your marketing messages without limit. We can use the whitelist for testing and optimizing campaign purposes. We can aslo use the whitelist for user who have shown strong interest in your marketing campaigns. + +### Process Flow + +### Trigger + +* + - * 1. A set of customers needs to be added to the whitelist to exlcuse them from the frequency cap rules. + +### Pre-Conditions + +* + - * 1. Users have to have access rights in “Whitelist” module to able to access this screen. + 2. Depending on the user's access rights, they can view, add, edit, or approve manually marketing request. + +### Wireframe + +Listing page + +[Image Removed] + +Edit mode + +Step 1: Generral Information + +[Image Removed] + +Step 2: Customer List + +[Image Removed] + +[Image Removed] + +[Image Removed] + +Detail Mode + +[Image Removed] + +### Business Rules + +Users are able to upload a list of customers who will be excluded from the frequency cap rules by uploading a file into the system. + +Additionally, users are able to assign customers to the whitelist by selecting a list of cif number belong to OLS system. + +Users are able to review the customer list or download the customer list that they have already uploaded to the system. + +Screen description + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Listing page** | | | | +| | ID / ID | Blacklist indentifier | Display | +| | Name List/ Tên danh sách | The name of the black list. | Display | +| | Description/Mô tả | More description for this whitelist. | Display | +| | Customer List/Danh sách khách hàng | A list of customer that inputted by user or uploaded by user. Use ellipsis (…) to indicate that the customer list is too long to display in full. Mouseover to see full list. | Display | +| | [Image Removed] | By clicking here to download the customer list. This should be orginal file if this file is uploaded by the user. A file containing a list of customers entered by the user will be generated by the system. This file should under the CSV format as upload sample file. | Button | +| **Edit mode** | | | | +| | **General Information** | | | +| | ID \*/ ID | Blacklist indentifier For refer only | X(10) | +| | Name List\*/ Tên danh sách | The name of the whitelist. For refere only | X(50) | +| | Description/Mô tả | More description for this blacklist. For refer only | X(200) | +| | **Customer List** | | | +| | Input Type\*/ Kiểu nhập dữ liệu | Users can choose one of following option : * + - Input from screen - Upload file | Radio | +| | Customer List/ Danh sách khách hàng | A drop-down to select the customer who will be excluded from the frequency cap rules if “input from screen” is selected in previous step. | Drop-down Multiple select To avoid performance issue, user should enter at least 4 digit of CIF number to select the customer | +| | Upload file/Tải file | This option allow users upload file from their divice. The file shoud follow system’s format. Just allow CSV, xls, xlsx extension and file size should less than or equal to 50 MB. User can drag/drop or choose browse fiel from their device. | Button | +| | Customer List | If file upload successful then the customer list will be display here | Display | + +Users review and approve the record in the same manner as on other screens + +### Post-Conditions + +The whitelist is stored and accessible to another module. + +The whitelist is excludes from the frequency cap rules as default. If there is any cap rules should need to include the whitelist then the user should indicate those whitelist. + +### Exception Flow + +If the file type or size is not valid, the system displays an error message and prompts the customer to select a different file. + +The system should clearly display the upload processing status to the user. + diff --git a/docs/specs/archive/onetargeting.md b/docs/specs/archive/onetargeting.md new file mode 100644 index 0000000..60ffa34 --- /dev/null +++ b/docs/specs/archive/onetargeting.md @@ -0,0 +1,146 @@ +--- +title: "OneTargeting" +type: OpenSpec +status: Draft +--- +# OneTargeting + +## Segmentation Definiiton + +### Requirement Definition + +* 1. Segmentation is one proessing to divide a customer base into smaller, that provides a way to narrow down the target audience based on the types of products or services the customers have previously purchased. + 2. This screen allows businesses to create more personalized and effective marketing strategies for each segment, rather than adopting a one-size-fits-all approach. + 3. In the system sides, segement is one combination of more than one criteria, that allows same criteria set may be re-used many times. The most importantly, it allows a more efficient way to setup the targeting customer. + +### Process Flow + +### Trigger + +* + 1. User access to the OneTargeting Module to create/update new segment. + +### Pre-Conditions + +1. Users have to have access rights in “Segmentation” module to able to access this screen. +2. Depending on the user's access rights, they can view, add, edit, or manually approval. +3. Assume that all criteria are defined as attribute and appear in right panel in message content part to user can drag/drop to setup. + +### Wireframe + +* + - 1. Create /Edit mode + +[Image Removed] + +[Image Removed] + +* + - 1. View mode + +### Business Rules + +1. The same approach as Campaing Rule Crireria screen, OLS system will use Query Builder to build query for this screen. +2. Refer to [Rule Criteria](#_Business_rules_1) section to get more detail about the business rule of this screen. The criterion list are described in the #3. +3. Here are some way that business segment their targeting customer : + +| **Index** | **Segement Group** | **Criteria Group** | **Combination by following Criteia** | **Segment Example** | +| --- | --- | --- | --- | --- | +| | Demographic Segmentation | Customer Profile | Age | Life Cycle segment: Children: 0 -14 Youth: 15- 24 Adults: 24- 64 Seniors: 65 and above | +| Last Name | | +| First Name | | +| Income | **Income segment**: High-Income Customer Middle –Icome Customer Low-Income Customer | +| Gender | Male customer Female customer | +| Marital Status | Singel customer Married customer | +| DOB | **Generation segment:** Gen Z: Year DOB from 1997 – 2012 Gen Y: 1981 – 1996 Gen X: 1965 – 1980 Gen W (Baby Boomers): 1946- 1964 | +| Location: Country/State/City/Zip Code | **Geography segement:** International customer Urban customer Suburban customer Mountain Customer | +| Customer’s Tenure | **Customer’s Tunure** **Segment** (Use Customer Registration) : New customer: under 1 year Early- tenured customer: 1- 2 years Mid-Tenured customer: 2- 5 years Long - tenured customer: above 5 years | +| Account ‘s Tenure | **Account’s Tunure** **Segment** (use AOD) : New customer: under 1 year Early - tenured customer: 1- 2 years Mid-Tenured customer: 2- 5 years Long tenured customer: above 5 years | +| Account’s Status | | +| Next AOD | | +| Customer’s staus | Used in the many segment that | +| | Behavior Segmentation | Transaction | Last transaction /Integration | **Churned customer :** E.g Last transaction is more than 6 months ago and customer status is active | +| Transaction Frequency: Should be tracked in the specific period such as day/week/month / Quarter/Year/Custom period to determine for following criteria : * + 1. **Total number txn frequency on the specific period.** 2. **Avegare txn frequency** | **Customer Segment:** High-Value Customers: frequency range depend on each business rule Medium-Value Customers: frequency range depend on each business rule Low-Value Customers: frequency range depend on each business rule | +| Customer Recency: When was the last transaction/ integration. | +| Total spending value: How much customer spends (total nett transaction amount) | +| Transaction Date | **Peak –Time customer:** E.g Transaction date is on special day Transaction date on weekend (day of the week) Midnight transaction (Time of the transaction) **Consistent-Time Customers**: E.g Transaciton do on each the first day of the month **Flexible-Time Customers** E.g Transaciton is on specific day | +| Transaction Time | +| Merchant: Coporation/Chain/Store/MCC | Use with another crieteria or itself only to create specific segment | +| Merchant Group: Coporation/Chain/Store/MCC Group | +| Transaction Description | +| Transaction Category | +| Transaction Gross Amount | +| Transaction Nett Amount | +| | Flexible segment | Attribute | Attribute Criteria | | +| | Psychographic Segmentation | Item | Favorite Category | **Life Style segment** **Interest segment** **Opinion segment** | +| Favorite Item | +| To be added when implement onedisplay so that we can have the data source for collect the Psychographic Segmentation from survey to decision the marketing strategy | + +### Post-Conditions + +* + - * 1. Each segment are used to define the targeting customer on the marketing module. + +### Exception Flow + +## Audience Upload + +### Requirement Definition + +Provide a user –friendly interface to marketers to manage audience uploads. + +### Process Flow + +### Trigger + +### Pre-Conditions + +1. Users have to have access rights in “Audience Upload” module to able to access this screen. +2. Depending on the user's access rights, they can view, add, edit, or manually approval. + +### Wireframe + +### Business Rules + +Users are able to upload a customer data for targeted marketing campaigns by uploading a file into the system. + +The system should allow users map data from their source files to the required platform fields by accepting the CSV, excel spreadsheets. + +The system validates the uploaded data to ensure all required fields are present and in the correct format + +Screen descrition + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data Type** | +| **Listing page** | | | | +| | Audience Name /Tệp khán giả | Name of the audience | Dipslay | +| | Description /Mô tả | Audience description For use refer only | Display | +| | File size /Dung lượng tệp | The file size | Display as number format | +| | [Image Removed] | By clicking here to download the audience. This should be orginal file tha user already uploaded. | Button | +| **Create/Edit Mode** | | | | +| | File ID \*/ ID tệp | Audience identifier For system refer only | X(10) | +| | Audience Name \*/ Tệp khán giả | The name of the audience Should be uniquie value in the system. | X(50) | +| | Description /Mô tả | Audience description | X(200) | +| | Upload file \*/ Đăng tệp tin lên | This option allow users upload file from their divice. The file shoud follow system’s format. Just allow CSV, xls, xlsx extension and file size should less than or equal to 50 MB. User can drag/drop or choose browse file from their device. | Button | +| | | | | + +### Post-Conditions + +### Exception Condition + +## Customer Audience + +### Requirement Definition + +### Process Flow + +### Trigger + +### Pre-Conditions + +### Wireframe + +### Business Rules + +### Post-Conditions + +### Exception Flow + +End of Document \ No newline at end of file diff --git a/docs/specs/archive/reference.md b/docs/specs/archive/reference.md new file mode 100644 index 0000000..de034e6 --- /dev/null +++ b/docs/specs/archive/reference.md @@ -0,0 +1,55 @@ +--- +title: "Reference" +type: OpenSpec +status: Draft +--- +# Reference + +| Ref# | Description / File Name | +| --- | --- | +| R01 | | +| R02 | | +| R03 | | +| R04 | | +| | | + +Change History + +| **Version** | **Change Description** | **Date** | **Updated by** | +| --- | --- | --- | --- | +| | The first version including: Customer Management Campaign Management Draft OMR module | 14/12/2023 | Trangdth Maivt | +| | 1. Customer 360: Add more detail for Account/Card information 2 Section 5.1 Add filter, Add/update some fields in the screen Section 5.5 Card: Update description and logical Section 5.9 and 5.10: Update label | 18/12/2023 | Trangdth | +| | 1. Update the Pool Conversion Rate module 2. Update data type DD/MM/YYYY into "Date" to respect the date time configuration format 3. Update the Card logically: Add more detail when updating the card 4. **Update customer Management module section 5: an update based on Sang's requirement (Customer/Account/dashboard/transaction history/attribute/counter)** Update Vietnamese fields and some cosmetic issues | 20/12/2023 | Trangdth | +| | 1. Update customer block data type from X(20) into X(10) 2. Section 5.4 update the card activation date from mandatory to optional 3. Section 5.2.6: Update the logic of most items 4. Section 4.7- Pool Conversion Rate: update field name and logic for pool conversion rate 5. Section 4.12 Campaign Rule Criteria: Correction some typos and add more detail for txncat criteria 6. Pool Definition: remove the item code field (move to Rule setup). Add some validations(red line) 7. Add CEP rule type | 27/12/2023 | Trangdth | +| | 1. Add REP Rule 2. Update Pool Definition Screen: screen and logical 3. Update Counter Defintion to match with PMS and add more detail. | 02/01/2024 | Trangdth | +| | 1. Update API information for REP rule 2. Update API information for CEP Rule 3. Add document for Formula (UI+ Logical) | 10/01/2024 | Trangdth | +| | 1. Add Section 5.15 Awward Transaction Entry Screen 2. Update Section 4.8 Counter Definition: Add Late txn posting option. Update logical on post-condition 3. Update Pool Defintion: add more detail for ATG field 4. CEP/REP: Update API for run schedule | 16/01/2024 | Trangdth | +| | 1. Counter definition: Update: Active "First start date is fixed" for "Days from COD" period unit 2. Pool conversion rate: Update code from X(03) into X(05) 3. Card - Update data type and logic for Old Card number - Update the relationship of Account type and Account number 4. Add Campaign : Add description for CP module | 24/01/2024 | Trangdth | +| | 1. Add section 4.12 Campaign Rule logical for Award/redem/Adjust rule type 2. Add section 4.9 Transaction Category module | 25/01/2024 | Trangdth | +| | 1. Campaign: change data type and add alidation for Campaign type 2. CEP: Update data type for Run schedule and change the sequence order in Layout 3. REP: Update data type for Run schedule and change the sequence order in Layout | 30/01/2024 | Trangdth | +| | Section 4.17 : CEP : Update API information of following fields: - Account with blocked Card - Post Transactions under PA Account selected based on | 19/02/2024 | Trangdth | +| | Section 4.12.6 : Campaign Rule/Business Rule : Update validation of "Apply after Cap value " field | 21/02/2024 | Trangdth | +| | 1. Correction typo 2. Section 4.13: Rule criteria: Update more detail and req 3. Section 5.11 Adjustment : Add field and update logical of quick view | 05/03/2024 | Trangdth | +| | 1. Correction typo 2. Section 5.11 Adjustment: Update Vietnamese label and correction logical 3. Section 5.12 Transfer Balance: Add fields, Update logical, Add User Stories and Accepted Criterions 4. Section 5.13 Re-instatement : Add fields, Update logical , Add User Stories and Accepted Criterions | 07/03/2024 | Trangdth | +| | 1. 5.2.6.3: Account/Card information: Update logical and data entities 2. 5.11 Adjust: Add US and AC 3. 5.12 Award Transaction: Add fields, Update logical , Add User Stories and Accepted Criterions 4 5.5 Pool Balance Detail: Correction and Add User Stories and Accepted Criterions | 11/03/2024 | Trangdth | +| | 1. Section 4.15 contributor setting: Update data type of "Contributor Percentage" field 2. Section 4.14 Campaign Rule formula: Remove validation of F5/Multiplier | 12/03/2024 | Trangdth | +| | 1. Section 7: Added OneCatelogue module, including: Item master/ Catalogue/Category/Voucher management 2. Section 4.12 Campaign Rule: Added Post-condition for Amount to Use feature (Transaction Processing with Amount to use). 3. Secttion 4.6 Pool Definition: Remove CP Rule name and change data for "List Of Campaign" listing page. | 20/03/2024 | Trangdth | +| | 1. Add section 7.5: Item Price 2. Update section 5.14 Item redemption to match onecatalogue logical 3. Update quick view of Adjust/transfer balance/Re-instatement/Award. Take note that I just remove redundant information and update the description to be more clearly. The logical is not changed. | 25/03/2024 | Trangdth | +| | 1. Added section 2 (2.1/ 2.2/2.3/2.4) OneAccess module, including Overview, User Group, Permission Management and User Profile 2. 4.6 Pool Definition: Correction typo 3. 4.13 Rule Criteria: Correct index of operator on each data type 4. 4.14 Campaign Formula : Update Formula logical on TP sides | 03/04/2024 | Trangdth | +| | 1. Correction typo 2. Section 4.13 Rule Criteria: Update logical of String data type (TP sides only) (change in red text) | 12/04/2024 | Trangdth | +| | 1. Section 5.6 Transaction History: Update sketch, Update US and AC, update Business rule 2. Section 5.11 Adjustment: Update sketch. Update US and AC, update business rule 3. Section 5.15 Award : Update US and AC | 15/04/2024 | Trangdth | +| | 1. Section 4.18 Added Item Redemption Rule Type | 16/04/2024 | Trangdth | +| | 1. Section 7: OneCatalogue: Typ0 correction and update section 7.6 Voucher Code module 2. Section 4.12.7 CP rule : Add Award limit use case in FSD | 19/04/2024 | Trangdth | +| | 1. Section 5.6 Transaction History: Added "Pool Unit Amount" on Award quick view. 2. Section 5.15 Item Redemption: update business req/ Flow and post condition 3. Section 7.5 Item Price Update flow/ post condition / add effective date | 26/04/2024 | Trangdth | +| | 1. Section 4.6 Pool Definition : Add validation for Card entity level field 2. Section 4.13 Campaign Rule Criteria : Correction description of filter value of Number data type 3. Section 5.14 Item Redemption : Correction Wireframe and update business rule 4. Section 7.3 Item master: Add Face value and correction typo | 02/05/2024 | Trangdth | +| | 1. Addded description to clear "Balance detail" quick view of Award and Adjustment Transaction Screen (in red text). 2. Section 5.14 Item redemption : Added User Stories and Acceptance criteria | 06/05/2024 | Trangdth | +| | 1. Section 4.13 Campaign Rule Criteria: Update String data type: Use Input tag instead of delimiter in case there are many filter value if input type as "value" | 09/05/2024 | Trangdth | +| | 1. Section 4.13 Campaign Rule Criteria: Add more description for Date Data type. 2. Section 4.12 Campaign Rule: Add new fields/validation to handle Evoucher Pool and Adjust Rule Type. ( Change in red) | 20/05/2024 | Trangdth | +| | 1. Section 4.6: Pool Definition: Add validation for Precision of Pool 2. Section 7.6: Voucher code: Change field name from Voucher type into Promotion Type 3. Section OneAdmin Overview: Update and correction section 3.1/3.2/3.3 4. Section 7.5 Item price: Add item code to avoid confuse 5. Customer Profile: Add "Address Type: field 6. Section 5.6 Item redemption Entry: Remove redudant field and add validation (Change in red text) | 24/05/2024 | Trangdth | +| | 1. Counter Definition: Add validation for "Bucket period Unit" 2. Campaign rule: Remove API of master data filed Remove Voucher code Add item code | 30/05/2024 | Trangdth | +| | 1. Section 5.9/5.10: Attribute/Counter: Correction and update more detail 2. Section 5.6: Transaction History: Remove Deleted field, correction typo and update detail for quick view 3. Section 5.11/5.12: Adjustment /Transfer balance: Correction process flow and business 4, Section 5.15: Award transaction: Update process flow on TP side 5. Other section: Update and correct to match with the system | 17/06/2024 | Trangdth | +| | All sections: Add more description for number field if needed | 19/06/2024 | Trangdth | +| | 1. Campaign formula /Business rule : Update validation for "Amount " field (F4/F6) 2. Section 5.2.6.2: Customer’s rewards statistic : Remove total spending, Update logical for Points/Cash back All change in red text | 24/06/2024 | Trangdth | +| | 1. Add section 3: Oneadmin: Overview about the OLS system : Search/Filter/Add/View/Edit/Approve/History 2. Add Section 4: Application Parameter 3. Update section 6.2.6: Customer 360=>Business Rule: Correct typo. Add more detail for pool balance information and most redeemed item | 12/07/2024 | Trangdth | +| | Correction typos | 11/11/2024 | Trangdth | + diff --git a/docs/specs/archive/reward_campaign_management.md b/docs/specs/archive/reward_campaign_management.md new file mode 100644 index 0000000..512803d --- /dev/null +++ b/docs/specs/archive/reward_campaign_management.md @@ -0,0 +1,1742 @@ +--- +title: "Reward Campaign Management" +type: OpenSpec +status: Draft +--- +# Reward Campaign Management + +## Highlights + +1. Business rules controlling reward and redeem transactions are set up as Rules in “Campaigns”. +2. Customers enjoy different reward types depending on the type of card they hold and the details of the transactions. +3. In BLP, a single customer view is maintained such that all of a customer’s product holdings and the corresponding loyalty rewards are linked into a single customer view. This is illustrated in the following: + +Customer + +Account # 1 + +Account # 2 + +Account # 3 + +Smart$ + +Cash Rebates + +UNIRM + +Product Holdings + +Reward Pools PoolsBalances + +Account # 4 + +* Reward Balance for each reward type is tracked at customer level in “Pools” – one Pool per reward type – e.g. Smart$ is a reward type, UNIRM is a reward type + +Loyalty Account Acct + +Figure 9 – Customer View + +1. A merchant acquired by payment card acquiring may participate in one or more reward campaigns and contribute at different rates to different reward campaigns. + 1. Transactions from EDC terminals of acquired merchants can earn rewards entitlements in real-time depending on the reward campaigns in force. + 2. In the same transaction, cash rebates and points earned on past transactions can be used to offset the payment amount in real-time, thus reducing amount charged to card, so customer can earn and redeem in the same payment transaction (either in full or in part as “partial redemptions”) and enjoy a smaller amount charged to card. +2. Transactions from not-acquired merchants and from merchants who are acquired but not participating are received from Card System and can be processed for rewards in the form of cash rebates and points in OneLoyalty™ through batch files. +3. Rewards for a single transaction may be from multiple “contributors”, entities who fund the rewards. +4. A single transaction can trigger multiple concurrent award programs. +5. Groups of outlets can operate their own outlet-specific Campaign Rules with different rules and periods per Campaign Rule. +6. Many short-term, event-specific Campaign Rules can be set up and operated cost effectively with a short time to market with the flexibility of the rewards management module. +7. Points and e-coupons earning and/or redemption can be integrated into the same POS terminal payment transaction or effected through batch processes based on transaction inputs from external application systems. +8. Reward campaigns can be set up with multi-merchant support, including merchant-specific Campaign Rules, as an incentive for merchants to participate. + 1. Rewards can be in various forms and have flexible point and e-coupon expiry policies: + 2. E-coupons (as cash, discount or gift coupons; e.g. a $5 coupon, a 10% discount coupon, a coupon for free access to events, etc.) + 3. Points redeemed for cash-back as part of payments, or for offsetting service fees, points transfer to external point programs, etc. + 4. Lucky Draw chances for deferred electronic lucky draws that may be conducted periodically + 5. Instant discounts (specific to SKU codes i.e. purchased item codes). +9. Point and e-coupon redemption against electronic catalogue are supported through the Internet, IVR, SMS as well as trough call center agents. +10. Seamless integration between magnetic- and chip-card-based loyalty functions allow transfer of points, coupons & other benefits between card and host (both ways). +11. Rewards and incentives (e.g. cash rebates and points) given to customer can be based on criteria such as types of products used, transactions performed, and the value and frequency of transactions, etc. +12. Practically unlimited number of reward campaign rules can be run concurrently. +13. Campaign Rule Criteria, i.e. the conditions under which to give rewards, can be defined based on customer and transaction data available, such as: + 1. Demographic attributes: Age group, Gender, etc. + 2. Date / time of transaction: specific date/time ranges, time period (happy hour), day of week + 3. Location of transaction + 4. Instant transaction amount + 5. Cumulative transaction amount (by user selectable criteria – e.g. at particular merchants, or for spend in particular merchant categories, etc., or user-specified time periods) + 6. Transaction count (number of transactions in a period + 7. Average balance over a specified period, period-end balance over a specified period + 8. Card type (product account type) + 9. Customer’s product holdings (e.g. customer with product account types 1 and 2 gets this reward, customer without the products receives this message, etc) + 10. User-defined attributes associated with customer and / or product accounts, etc. +14. Rewards can be tracked at + 1. Customer level: single reward balance for customer + 2. Product level: rewards tracked as a separate balance per Product Account. +15. Customer can redeem their incentives and rewards through any of the following: + +| | | +| --- | --- | +| * 1. EDC terminals at partner outlets | * 1. Call center | +| * 1. Website, through electronic catalogue | * 1. Interactive Voice Response System (IVRS). | + +## Structure of a Campaign (HAVE TO BE ADJUSTED) + +### Types of Campaign Mechanics + +1. Reward campaigns can be broadly divided into two types or models: + 1. Those that award on every transaction (“Award on Every Transaction”) and + 2. Those that award on the basis of the total spend or total number of transactions performed in a given period (“Award on Cumulative Criteria”), i.e. where the total achieved determines the earning rate or reward +2. Designing a Campaign for set-up in BLP is best done if the generic structure for each of these models is understood: these structures are discussed in the next 2 sections. + +### Award on Every Transaction + +1. In an “Award on Every Transaction” campaign, the process flow is outlined in the following: + 1. The reward is determined at the time the transaction is processed in BLP. + 2. Processing can be in either real-time or in batch mode, and the structure is illustrated in the following: + +[Image Removed] + +Figure 10 – Process Flow for Award Per Transaction + +1. Transaction data is received from external sources (e.g. Card System) or can be internally generated in BLP through the CEP (see section 1.1.1) and REP (see section 4.17) modules + 1. Transaction data may be received in batch mode through the batch transaction interface file (BLPTXN) described in Reference R01. + 2. Transaction data may also be received through online interfaces such as the POS Manager interface to payment terminals and MQ interfaces to front-end systems +2. Campaign Rules are set up as described in the rest of this section 4. +3. Campaign Rules derive the quantity to award and/or redeem from the Reward Pool, the structure of which is described in section 4.2.5. + +### Accumulate Then Award + +1. In an “Accumulate then Award” campaign, the reward depends on the customer’s total spend or number of transactions performed over a period P of – e.g. + 1. If the customer spends between $500 and $1,000 in the month in total to earn a 15% bonus, however if customer spends more than $1,000 in the month customer gets a 20% bonus. + 2. In such a campaign, the award formula parameters cannot be determined until the end of the period P + 1. To achieve this, Campaign Rules are set up to accumulate the required transactions into Counters + 2. Separate Campaign Rules are also configured to extract and process the values in the Counters as transactions for the actual award at the end of the accumulation period P. + 3. The structure and mechanism of how Counters work are described in section 4.2.6. + 3. The Campaign structure of such a Campaign is broadly outlined in the following: + +[Image Removed] + +Figure 11 – Structure of “Accumulate Then Award” Campaigns. + +1. Again, the transaction data may be received from external sources (e.g. Card System) or can be internally generated in BLP through the CEP (see section 1.1.1) and REP (see section 4.17) modules +2. Campaigns to award on Cumulative basis based on internally derived transaction data are described more fully in section 1.1.1. + +### Auto-redemption Campaigns + +1. Some campaigns, such as cash rebate or frequent flyer mile campaigns, require that the awarded quantities (cash rebates, frequent flyer miles or other partner points) be “redeemed” and sent to an external (destination) system – Card, deposits or partner airline, etc – in order to credit the customer’s account in the destination system. +2. Auto-redemption campaigns make use of the “Redeem, Extract and Process” or REP module, described further in section 4.17. + +### Reward Pool Structure & Bucket Deduction Sequence + +1. Earnings (rewards) are tracked in “Pools”, each Pool for a specific type of reward. +2. Pools belong to “Loyalty Accounts” or LAs. +3. One LA is created per Customer (per unique CIF Number). +4. Pools are associated with the Customer’s Loyalty Account (see section **Error! Reference source not found.** for the data entity relationship), where each Loyalty Account can have multiple Pools, each Pool for a reward type – e.g. UNIRM Pool, SMT$ Pool, etc +5. Within each Pool, the earnings are tracked in Pool Buckets segregated by Expiry Date and Account Type. The earnings by an Account are tracked in that Account’s buckets in the Pool. +6. If the earnings fall into different expiry dates, then the earnings of each expiry date are tracked in a distinct bucket for that Account, for each Expiry Date. +7. The following illustrates buckets for 3 accounts A, B and C (where each row is a bucket): + +| | | | | +| --- | --- | --- | --- | +| UNIRM Pool | Account Type | Expiry Date | Balance | +| A | 31-Mar-2015 | 100 | +| B | 31-Mar-2015 | 50 | +| A | 30-Jun-2015 | 110 | +| B | 30-Jun-2015 | 510 | +| A | 31-Sep-2015 | 140 | +| C | No Expiry | 215 | +| TOTAL BALANCE | | 1,125 | + +1. Account Type C earns evergreen points, whereas the other account A & B each earn points which expire on the usual 5-quarters from the quarter of earning. +2. When customer redeems: + 1. Points are deducted in order of ascending Expiry Date (earliest expiring dates first). + 2. If more than one Bucket has the same expiry date, the buckets are further sorted by a pre-configured priority sequence – i.e. buckets of lower priority Account Types will be deducted first. + 3. Redemption from expired buckets is allowed with supervisor approval during item redemption through administration screen. See section **Error! Reference source not found.**. +3. Note that the display in the administration screen will show the buckets as illustrated in section **Error! Reference source not found.**. + +### Counters – Structure and Mechanics + +1. A Counter is a conceptual entity that tracks a quantity over a defined period of time +2. For example, a Counter may track: + 1. Customer’s total spend per month + 1. Use Case example: to award customers who spend more than 1,000 a month + 2. This is a Customer-level monthly spend Counter, i.e. the Entity is Customer, and this Counter is used in the Rule Criteria section to filter out eligible transactions. + 2. The total points earned by an Account in the entire Campaign + 1. Use Case example: to give out not more than 1,000,000 points per Account in the Campaign [Image Removed] + 2. This is an Account-level, single-Bucket Point Counter, i.e. the Entity is Account, and this Counter is used in the Formula Header to cap the formula result. + 3. The number transactions awarded at individual merchants (Store Ids) per month + 1. Use Case example: to award only the first 1,500 transactions in the month per merchant (Store id) in the Campaign + 2. This is a Store-level, monthly frequency Counter, i.e. the Entity is Store, and this Counter is used in the Rule Criteria to filter out the first 1,500 transactions. +3. The key data entities making up Counter are defined in the following table: + +| | | | | | | | | | | | | | | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| | **Data Entity** | | **Description** | | | | | | | | | | | +| | Counter Id\* | X(10) | Unique identifier for a Counter Definition record | | | | | | | | | | | +| | Name\* | X(30) | A text string that describes this counter; it can be used as a unique identifier for this Counter Definition. | | | | | | | | | | | +| | Description | X(100) | A text string that more completely describes this Counter Definition, elaborating on what it is used for (its intended purpose) etc | | | | | | | | | | | +| | Entity\* | X(02) | The Entity level at which a quantity is to be tracked. Valid values are: | | | | | | | | | | | +| | | | * + - * CU – Customer | | | | | * + - * AC – Account | | | * + - * CA – Card | | | +| | | | * + - * ST – Store | | | | | * + - * CH – Chain | | | * + - * CO - Corporation | | | +| | | | * + - * CS – Customer-Store | | | | | * + - * CC – Customer-Chain | | | * + - * SY – System | | | +| | Entity Counted\* | X(02) | The data entity that is to be counted or tracked. Valid values are: | | | | | | | | | | | +| | | | * + - * GA – Gross Amount | | | | | Gross Transaction Amount | | | | | | +| | | | * + - * NA – Nett Amount | | | | | Nett Transaction Amount | | | | | | +| | | | * + - * PT – Points | | | | | Number of points awarded, redeemed or adjusted | | | | | | +| | | | * + - * TX – Transaction | | | | | Number of transactions done | | | | | | +| | | | * + - * QT – Any quantity | | | | | Any numeric quantity indicated by update Formula | | | | | | +| | First Start Date | Date | The start and end date of every Bucket Period is derived relative to the previous Bucket End Date (BED). The BED of the first Bucket is derived relative to the First Start Date (**FSD**) and each subsequent BED is derived relative to the previous BED. BED derivation is described in item xx, following this table. The FSD must be selected to be one of the following: * + - * A Fixed Date (FD) entered as a Counter Definition parameter * First Transaction Date (FTD), i.e. the Transaction Date of the first transaction to update the Counter. The FSD (= FD or FTD, depending on the Counter Definition set-up) is used to derive the BED as described in the following: | | | | | | | | | | | +| | Period Unit\* | X(02) | PU: units by which to count the time length of a period. Valid values are: | | | | | | | | | | | +| | | | DY | Day | | * BSD = FSD * First BED = BSD + N – 1 days * BED = FSD + N\*(1+round down ((TD – FSD)/N)) * Subsequent BED = N days + previous BED * E.g. if FSD = 10-Jan-20, TD = Txn Date, BED = (TD – FSD)/N * for various values of N are illustrated in the following: | | | | | | | | +| | | | | | | Txn Date | | | 09-01-20 | 10-01-20 | | 11-01-20 | 31-01-20 | +| | | | | | | N | TD | | 09-01-20 | 10-01-20 | | 11-01-20 | 31-01-20 | +| | | | | | | 1 | BED | | None | 11-01-20 | | 11-01-20 | | +| | | | | | | 2 | BED | | None | 12-01-20 | | 12-01-20 | | +| | | | | | | 5 | BED | | None | 15-01-20 | | 15-01-20 | | +| | | | QT | Quarter (Q) | | * BSD = 1st day of calendar Q of FSD * First BED = end of N -1 calendar Qs from first Q * Subsequent BED = end of N Qs after previous BED | | | | | | | | +| | | | LT | Days from Last Transaction | | * BSD = First transaction date on or after FSD * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | FD | Fixed Date | | * BSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | WK | Week | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | SA | Semi-annual | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | OD | Days from AOD | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | OA | AOD Anniversary | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | NE | No Expiry | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | MN | Month | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | AN | Annual | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | OM | Months from AOD | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | | | OQ | Quarters from AOD | | * FSD = 1 day after last statement date * First BED = N statement cycle(s) after FSD * Subsequent BED = N statement cycles after previous BED | | | | | | | | +| | Period Length\* | 9(04) | Period Length P is the number of Period Units making up one Bucket Period | | | | | | | | | | | +| | First Start Date | D(08) | The start and end date of every Bucket Period is derived relative to the previous Bucket End Date (BED). The BED of the first Bucket is derived relative to the First Start Date (**FSD**) and each subsequent BED is derived relative to the previous BED. BED derivation is described in item 4, following this table. The FSD can be selected to be one of the following: * + - * A Fixed Date (FD) entered as a Counter Definition parameter * First Transaction Date (FTD), the Transaction Date of the first transaction to update the Counter. The FSD is derived as described in the following: | | | | | | | | | | | +| | | | **Period Unit** | | **Derivation of Start Date (SD) of First Bucket** | | | | | | | | | +| | | | DY | | SD = FSD | | | | | | | | | +| | | | MN | | SD = Start of Month of FSD | | | | | | | | | +| | | | QT | | SD = Start of calendar Quarter of FSD | | | | | | | | | +| | | | YR | | SD = start of calendar Year FSD | | | | | | | | | +| | Reset Value | 9(16,2) | | | | | | | | | | | | +| | Keep Remainder on Reset | X(01) | “Y” if the remainder (modulus) is retained in Counter Balance at time of reset on hitting Reset Value.. “N” if remainder is not retained. | | | | | | | | | | | + +## About Loyalty Marketing Campaigns (HAVE TO BE ADDED) + +## External Transaction Code + +### Requirement Definition + +* 1. In general, every incoming transaction from external sources carries an External Transaction Code (TC) on OLS system. + 2. The External System TC is the first key is located OLS TC for processing the transaction. + 3. The TC values will be agreed with users at the time of setting up the system. + 4. Each External Transaction Code must have an OLS Transaction Code associated with it. + +For example: If source system send purchase transaciton to OLS under TC4000 then in this case it is necessary to define one external TC TC400 in OLS. + +### Process Flow + +[Image Removed] + +### Trigger + +* 1. New transaction code coming from external system then user have to define new external TC in OLS. + 2. Some description should be adjusted then user have to modify. + 3. User need to review one or all External Transaction Codes which added on OLS then user go to this screen to review. + +### Pre-Conditions + +* 1. Users have to have the access right on this screen in order to accesss this screen. + 2. Depending on user’s access rights, they can view / add/edit or approve External Transaction Code records. + +### Wireframe + +* 1. Summary listing page + +[Image Removed] + +* 1. Detail view + 2. Detail view + +[Image Removed] + +* 1. Record status and history + +[Image Removed] + +* 1. Create/Edit form + +[Image Removed] + +### Business Rules + +1. If Source TC required has not been defined, click on External Transaction Code icon in Main Menu to bring up the summary list as illustrated in section 4.4.5 +2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Transaction Code is illustrated in section 4.4.5 : +3. **Screen descriptions** + +| | | | | +| --- | --- | --- | --- | +| **No** | **Field** | **Description** | **Data tye** | +| 1 | External Transaction Code\*/ Mã giao dịch hệ thống ngoài | Enter the Source System Transaction Code to be defined. | X(10) | +| 2 | Description \*/ Mô tả | A 30-character description of the source transaction code. This is intended for user reference so that the transaction code can be easily recognised. | X(30) | + +1. A new/edit External Transaction Code will display in pending Tab and display in Active tab after user approve the TC. +2. Repeat for each TC to be added/Edited. + +### Post-Conditions + +1. User able to proceed to OLS Transaction Code screen. See in section 4.5 + +### Exception Flow + +1. Input data are not passed all validation and then the user chooses to cancel the action then the use case ends in failure. + +## OLS Transaction Code + +### Requirement Definition + +1. Every transaction processed against Campaign Rules must have an OLS Transaction Code (TC) associated with it. The OLS TC is the first key by which relevant Campaign Rules are located for processing the transaction. +2. In general, every OLS transaction carries an external TC. In some cases, the transaction being processed is internally generated in OLS. This is especially for bonus award campaigns. +3. For example: + 1. If OLS is configured to award bonus points for customers who achieve a certain level of spend at the end of the month, the award transaction is generated in OLS and has no external TC associated with it. + +### Process Flow + +[Image Removed] + +### Trigger + +1. New transaction code coming from external system then the user has to define new OLS TC also. +2. New OLS transaction coming from internal transaction. +3. Some detailed information should be adjusted then the user has to modify it. +4. The user needs to review one or all OLS Transaction Codes that are added to OLS then the user goes to this screen to review. + +### Pre-Conditions + +1. Users have to have the access right on this screen in order to access this screen. +2. Depending on user’s access rights, they can view/add/edit or approve OLS Transaction Code records. +3. An external TC is required if this OLS TC is used to trigger CP rule for transaction coming from external system. + +### Wireframe + +1. Summary listing page + +[Image Removed] + +Figure 1 – Summary listing page + +[Image Removed] + +Figure 2 – Filer and quick search + +1. Detail view + 1. Detail view + +[Image Removed] + +* 1. Record status ( History) + +[Image Removed] + +1. Create/Edit form + +[Image Removed] + +### Business Rules + +1. If the OLS TC required has not been defined, click on the OLS Transaction Code icon in the Main Menu to bring up the summary list as illustrated in section 4.5.5 +2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for the OLS Transaction Code is illustrated in section 4.4.5 : +3. **Screen descriptions** + +| | | | | +| --- | --- | --- | --- | +| **No** | **Field** | **Description** | **Data tye** | +| 1 | OLS Transaction Code\*/Mã giao dịch OLS | Enter the OLS Transaction Code to be defined. | X(10) | +| 2 | Description\*/Mô tả | A 30-character description of the source transaction code. This is intended for user reference so that the transaction code can be easily recognized. | X(30) | +| 3 | External Transaction Code/ Mã giao dịch hệ thống ngoài | The TC that comes from the transaction external system, which is to be mapped to the OLS Transaction Code. Each External TC must be assigned to only one OLS TC. One or more Exteranl TCs to be mapped to the OLS TC. | Multiple select Drop-down Lookup data from the “External Transaction Code’ screen Refer to “ External Transaction Code” API under Campaign Management | +| 4 | Reversal Indicator/Chỉ báo đảo chiều | Indicates transaction code is for a reversal or a normal transaction. | Check box Default unchecked | + +1. A new/edit OLS Transaciton Code will display in pending Tab and display in Active tab after user approve the TC. +2. Repeat for each TC to be added/edited. + +### Post-Conditions + +1. User able to proceed to Campaign Rule Set-up. See section>>>>> + +### Exception Flow + +1. Input data are not passed all validation and then user choose cancel the action use case ends in failure. + +## Pool Definition + +### Requirement Definition + +1. All stored value such as rewards and cash balances or lucky draw chances are tracked in Pools. +2. Each Pool tracks a particular reward type, which is also associated with a Currency Code which represents the units of the stored value. E.g. a cash pool is used to store the Gift Card cash pool, and a Currency Code is assigned to represent the cash Currency Code - e.g. in Viet Nam this would be VietNam Dong and the Currency Code is VND. +3. Each stored value Pool tracks the stored value in Buckets. Each time the stored value balance in the Pool is incremented, at the time of incrementing the Pool balance, the Expiry Policy selected for this Pool is used to determine the date by which the stored value is to expire. The stored value is then added to the Pool in a bucket which would expire on the given expiry date as determined by the Expiry Policy. +4. Pools belong to “Loyalty Accounts” (LA) or Account (ASN) or Card (PSN). It is defined by pool entity level. +5. One LA is created per Customer (per unique CIF Number). One ASN is created per Account (per unique Account Number/ Account Level). One PSN is created per Card (per unique Card Number). +6. Pools are associated with the Customer’s Loyalty Account, where each Loyalty Account can have multiple Pools, each Pool for a reward type – e.g. Poiint Pool, Cash rebate Pool, etc + +### Process Flow + +[Image Removed] + +### Trigger + +1. Reward pool is not existing in OLS or have some informations need to be corrected. + +### Pre-Conditions + +1. Users have to have the access right on this screen in order to view/update or approve these records. +2. Pool conversion rate which apply for new reward pool have to be actived on OLS. See section [Pool Conversion Rate](#_Pool_Conversion_Rate). +3. Account type group which is assinged to reaward pool have to be actived on OLS. See section [Account Type Group](#_Account_Type_Group). +4. If reward pool requires velocity control to restrict the number of redemption points/earned points/ adjustment points then Message template and Recipient Group are required and have to be actived on OLS. See section =>>>>> (OMR) + +### Wireframe + +1. Summary listing page + +[Image Removed] + +Figure 1- Empty page + +[Image Removed] + +Figure 2- Listing page + +[Image Removed] + +Figure 3- Filter + +1. Detail view + 1. Pool detail + +[Image Removed] + +* 1. Record history + +[Image Removed] + +* 1. Pending record + +[Image Removed] + +1. Create/Edit form + 1. General information + +[Image Removed] + +* 1. Product Specific Expiry + +[Image Removed] + +[Image Removed] + +* 1. Velocity Control + +[Image Removed] + +[Image Removed] + +### Business Rules + +1. If the reward pool required has not been defined, click on the Pool Definition icon in the Main Menu to bring up the summary list as illustrated in section 4.5.5 +2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for Pool Definition is illustrated in section 4.4.5 : +3. **Screen descriptions** + +| Seq | Field (EN /VN) | Description | | Type | +| --- | --- | --- | --- | --- | +| **Statistic information** | | | | | +| | Period /Chu kì | The choices are: * + - This month - Today | Drop-down Select one Default today | | +| 2. | Balance for use/ Số dư khả dụng | The total available balance of the pool Use the Expiration date and start date of the balance bucket to compare them with the selected period. Based on sysdate to determine the date range of each period. Get data to get the balance of the pool from the LAB table. One balance bucket is available to use when it is eligible for Redemption. Use the start date and expiration date of the balance bucket to compare with a selected period. | Display Number | | +| 3. | Expired balance /Số dư quá hạn | Total expired balance of pool which have xpiring date of balance bucket less than selected period. Based on sysdate to get determine date range of each period. If Period is “This month” then get all balance bucket which will be expired on currently sysmonth. If Period is “to day” then get all balance bucket which will be expired on currently sysdate. | Display Number | | +| | Earned points/ Điểm thưởng | Total earned points of pool on selected period. Use the system to determine the period. Total earned points on each period based on the post date of the transaction. | Display Number | | +| | Redeemed points/ Điểm đã đổi thưởng | Total redeemed points of the pool on selected period. Use the system to determine the period. Total earned points on each period based on the post date of the transaction. | Display Number | | +| **Step 1: General information** | | | | | +| | Pool Id\*/ Pool ID | * Mandatory. System-generated * A Pool ID is used to identify a Rewards Pool and the Pool ID will be stored in all its dependent modules and transaction logs for reporting and reference. | | ~~X(05)~~ X(10) | +| | Pool Name\*/ Tên Pool | * Mandatory Field * Any printable ASCII character * Represents the name of the rewards pool. This will be used for drop-downs, reports, etc. | | X(30) | +| | Pool Description / Mô tả pool | * Optional Field * Any printable ASCII character * Describes the purpose of the Pool, for user reference. Not used in processing. | | X(200) | +| | Pool Type\*/ Loại Pool | * Mandatory Field * Pool Type indicates the type of rewards (value) stored in this Pool. A Pool Type should be one among the following values and meanings: + Points - Pool Units in Point Pools are “points” and each “point” has a cash value as set in the Currency Rate table. “Cash” is the currency that is pre-set in the OLS instance. + Cash Rebate - Pool Units in Cash Rebate Pools are “cash” and each “point” is equivalent to cash on a one-to-one basis. Cash Rebates are typically values to be credited to an external system. The Currency Rate is set to 1 to 1 for cash. + Lucky Draw chances - Lucky Draw Pools contain the number of chances a customer has earned through campaign Rules. A different Pool can be set up for each Draw program independently of other Pools. The Currency Rate is ignored. + EVoucher - A eVoucher Pool Unit is contain the number of evoucher a customer has earned through campaign Rules.”Evoucher” earned is formula result. * Lookup value from “Code management” with code\_type =’pool-type”. Refer API “Get list-by-code-type” under Master Data. * Don’t allow to edit if found the balane bucket record of this pool. | | Drop-down Select one | +| | Expiry Policy/ Chính sách hết hạn | * Condition field. Inactive for Evoucher pool and required and active for remaining pool. * An Expiry Policy determines how the system computes the expiry date for the reward earned during transaction processing. * If Pool Type selected is “Evoucher” then this field is inactive. There is non-expire for Evoucher pool type. * More detail are described in step 2. * Do not allow editing of the expiry policy (including the related field used to determine the expiry date of the balance bucket) if a balance bucket record for this pool is found. | | Drop-down Select one Lookup value from “Code management” with code\_type =’ pool-expiry-policy”. Refer API “Get list-by-code-type” under Master Data. | +| | Pool Expiry Policy Parameter N / Tham số chính sách hết hạn N | * Conditional field. * A number value that is taken to be the value of the Policy Parameter N, of the selected Expiry Policy * If the policy selected in the preceding field “Pool Expiry Policy” expects a parameter N, then this field is active and mandatory and a number value is expected. * If the policy selected in the preceding field “Pool Expiry Policy” expects a date parameter, then this field is inactive. | | 9(5) Should be greater than or equal to 0 if provided | +| | Expiry Date/ Ngày hết hạn | * Conditional field. * If the policy selected in the preceding field “Fixed Date” then this field is active and mandatory and a valid date is expected. * Otherwise, this field is inactive. | | Date | +| | Ripening Period/Kì hạn được đổi thưởng | * Condition field. Inactive for Evoucher pool and active for remaining pool. * The Ripening Period is the number of days from the transaction date after which the reward will be eligible for Redemption. * The reward earned on day 1 will only be available for redemption after Ripening Period days from the date of earning. * By default, the reward ripens on the day of transaction, i.e. the reward is available for redemption immediately. * The Ripening Period is used to determine start date of balance bucket. If Ripening Period is 0 or empty then the sysytem default start date of balance bucket as 19000101 ( This value should be configurable value instead hardcoding) * Just active if **Expiry Policy** is actived. Otherwise, this field is inactive. | | 9(5) Should be greater than or equal to 0 if provided | +| | Pool Conversion Rate Code\*/Mã tỉ lệ chuyển đổi pool | * Condition field. Inactive for Evoucher pool and active for remaining pool. * Currency representing a unit of reward in this Pool. This is a drop-down based on values in Pool cconversion Rate table. | | Drop-down Select one Lookup value from “Pool Conversion Rate “ screen ( Pool\_Conversion\_Rate table) Refer to “Pool Conversion Rate” API under ”Campaign Management” | +| | Allow Negative Balance on Cancel/Refund/Ad-just / Cho phép số dư âm do giao dịch hủy hoặc điều chỉnh | * Condition field. Inactive for “Evoucher” pool. * Defaulted to “Do Not Allow”. In this mode, the amount that cannot be deducted because of insufficient Pool Balance will be posted as two adjustment transactions – one positive and one negative, with the Adjustment Reason set to “Negative Balance Adjustments”. * If set to “Allow”, indicates the Pool Balance is allowed to go negative during adjustment and cancellation/reversal processing. * Does not apply to redemption processing: redemptions declined if there is insufficient balance | | Switch button Default OFF | +| | Precision (Number of Decimal Places) /Độ chính xác (Số thập phân) | * Condition field. Inactive for Evoucher pool and required and actived for remaining pool. * Defaulted to “2” decimal places * This represents the number of decimal places that is required to store the rewards in the Reward Pool. * Precision cannot be amended downwards to lower precision after transactions have been posted into the Pool (Found LAB records). * Show confirm message when user wants to change the precsion in case it is allowed to change such as “ The change in precision will be applicable only to new updates to the Pool Balance going forward. Existing pool balance data will retain the previous precision. Proceed with change?”/ “Thay đổi độ chính xác của số thập phân chỉ áp dụng cho việc cập nhập số dư mới tính từ thời điểm thay đổi. Số dư hiện tại vẫn theo độ chính xác số thập phân trước đó. Bạn có muốn thay đổi không?” | | Drop-down Select one Lookup value from “Code management” with code\_type = ’precision-scale’. Refer API “Get list-by-code-type” under Master Data. | +| | Account type group / Loại nhóm tài khoản | * Optional field * **If Account Types are selected for the Pool and ATG logical is appliable,** OLS will only allow transaction of the selected Account Types to earn/Postive adjustment to this Pool. * Don’t allow to edit if found the balane bucket record of this pool. | | Drop-down Select one Lookup distinct ATGid from “Account Type Group” screen (Account\_Type\_Group table). Refer “Account Type Group” API under “Campaign Management” | +| | Grace Period/Kì ân hạn | * Condition field. Inactive for Evoucher pool * The number of months to keep expired buckets before forfeiting the points in the buckets. * This field is defaulted to empty. | | 9(2) Should be greater than or equal to 0 if provided | +| | Entity level\*/ Cấp thực thể | * The Indicator determines whether the Pool balance is tracked at Card, Account or Customer level * Pool with Entity Level set to Account or Customer cannot be amended downwards to Card-level after transactions have been posted into the Pool (Found LAB records) * Pool with Entity level set to Account can be amended into Customer OR Customer pool can amended into Account level regardless transactions have been posted to the pool. * All pool entity level can be amended if there is no balance records on the pool * Pool with Entity level set to Card can not be amended into Customer/Accoutn level after transaction have been posted into the pool (found LAB record ) | | Radio button Lookup value from “Code management” with code\_type = ‘entity-lvl’. Refer API “Get list-by-code-type” under Master Data. | +| **Step 2: Product Specific Policy / Chính sách riêng về tài khoản** * This is an optional step. * Avaiable PA which can be selected will be PA Types to which pool is restricted only. * Each PA Type can be selected only in one row. * More than one Expiry Policy can be added, one per display row, per group of PA Types. * OLS will apply specific expire policy for transaction which have account type in selected PA types. Otherwise apply common Expire policy of the pool. | | | | | +| | Product Account Level\*/ Hạng tài khoản | * Mandatory field * Product account level | | Drop-down Select one Lookup value from “Producar Account Level” screen ( Product\_Account\_Level table). Refer “Product Account Level” API unnder “Code Maintenance” | +| | Product Account Type\*/Loại tài khoản | * Mandatory field * Product account type under selected Product account level. * Account type restricted to this pool only. * Lookup value from “Producar Account Type” screen (Product\_Account\_Type table). Refer “Product Account Type” API unnder “Code Maintenance” | | Drop -down Select one | +| | Expire policy\*/ Chính sách hết hạn | * Every Pool must have a Pool Expiry Policy, even if the policy is to never expire the balance in the Pool. * An Expiry Policy determines how the system computes the expiry date for the reward earned during transaction processing. * OLS provides the following standard polices: * N Months from month of earning: Points earned in month 1 expire at the end of month N+1. N is set in “Expiry Policy Parameter”. E.g. if N = 3, then points earned in January will expire end of April, points earned in February will expire end of May, etc. * N Quarters from quarter of earning: Points earned in quarter 1 expire at the end of quarter N+1. N is set in “Expiry Policy Parameter”. E.g. if N = 2, then points earned between 1-January ’15 and 31st March’15 will expire after 30th September’15, points earned between 1-April’15 and 30th June’15 will expire after 31st December’15 and points earned between 1-July’15 and 30th September’15 will expire after 31st March’16, etc. * Semi-annual, mid- and end-year: Points earned in 1st half of the year expire end of June the following year; points earned in 2nd half of year expire end December the following year. * N Years from year of earning: Points earned in year 1 expire at the end of year N+1. N is set in “Expiry Policy Parameter”. E.g. if N = 1, then points earned between 1-January ’15 and 31st December’15 will expire after 31st December’16, points earned between 1-January’16 and 31st December’16 will expire after 31st December’17 and points earned between 1-January’16 and 31st December ’16 will expire after 31st December’17, etc * Anniversary of membership: Points earned will expire on each anniversary of the customer’s membership. E.g. if customer joins on 15th February 2010, points earned before 15th February 2011 expire on 15th February 2011. * Fixed Date: Points will expire on the date specified in the “Expiry Date” parameter. A Campaign Rule which updates this Pool is not allowed to have End Date later than this date. * No Expiry: Points earned are in an ever-green bucket. Expiry Date in bucket will be defaulted to 31-Dec-2999. | | Drop-down Select one Lookup value from “Code management” with code\_type =’ pool-expiry-policy”. Refer API “Get list-by-code-type” under Master Data. | +| | Pool Expiry Policy Parameter N / Tham số chính sách hết hạn N | * Conditional field. * A number value that is taken to be the value of the Policy Parameter N, of the selected Expiry Policy * If the policy selected in the preceding field “Pool Expiry Policy” expects a parameter N, then this field is active and mandatory and a number value is expected. * If the policy selected in the preceding field “Pool Expiry Policy” expects a date parameter, then this field is inactive. | | 9(5) Should be greater than or equal to 0 if provided | +| | Expiry Date/ Ngày hết hạn | * Conditional field. * If the policy selected in the preceding field “Fixed Date” then this field is active and mandatory and a valid date is expected. * Otherwise, this field is inactive. | | Date | +| **Step 3: Velocity control / Kiểm soát hạn mức** 1. This is an optional step 2. This step for editing Velocity Control parameters to define thresholds at which the system will send alerts and generate exception alert reports. 3. Multiple rows of velocity control conditions may be added to the display row 4. The parameters in the edit row collectively form a condition statement: | | | | | +| | Maximum\*/ Tối da | * Mandatory field * The number of Pool Units beyond which alerts are triggered | | 9(10,2) Should be greater than 0 | +| | Transaciton Type\*/ Loại giao dịch | * Mandatory field + - * Award * Redeem * Adjust | | Drop-down Select one Lookup value from “Code management” with code\_type = ‘velocity-txn-type’. Refer API “Get list-by-code-type” under Master Data. | +| | Units\*/ Đơn vị | * Mandatory field + - * Per Pool units * Per transaction | | Drop-down Select one Lookup value from “Code management” with code\_type = ‘velocity-unit’. Refer API “Get list-by-code-type” under Master Data. | +| | Per Entity 1/ Thực thể 1 | * Optional field + - * Customer * Account * Card * If Per entity 1 is not provided then this limitation is applied for whole system. | | Drop-down Select one Lookup value from “Code management” with code\_type = ‘velocity-entity-lvl’. Refer API “Get list-by-code-type” under Master Data. | +| | Per Entity 2/ Thực thể 2 | * Optional field + - * Corporation * Chain * Store * Terminal If Per entity 1 is not provided then this limitation is applied for whole system. | | Drop-down Select one Lookup value from “Code management” with code\_type = ‘velocity-merchant’. Refer API “Get list-by-code-type” under Master Data. | +| | Per period\*/ Chu kì | Mandatory field * + - * Quarter * Month * Week * Day | | Drop -down Select one Lookup value from “Code management” with code\_type = ‘velocity-period’. Refer API “Get list-by-code-type” under Master Data. | +| | Alert Template\*/ Mẫu cảnh báo | * Madatory field The template containing the alert message to be sent when velocity control conditions are met. | | Drop -down Select one ==tbd== | +| | Alert Group\*/Nhóm cảnh báo | * Mandatory field * The group of recipients to receive the alert message. * This can be an SMS group or an Email group or a mix of both | | Drop-down Select one ==tbd== | +| **Effected Campaign Rule listing linked this reward pool** [Image Removed] | | | | | +| | Campaign /Mã chiến dịch | Campaign which reward rule belong to the choosen pool | | Display Lookup value from CAMPAIGN\_RULE table | +| | Rule /Mã quy tắc | Campain Rule which trigger to reward pool | | Display Lookup value from CAMPAIGN\_RULE table | +| | Transaction Code/ Mã giao dịch | Transaction Code linked to campain rule | | Display Lookup value from CAMPAIGN\_TC\_LINKAGE table | +| | Start Date / Ngày bắt đầu | The start date of effected period Campaign Rule | | Display Lookup value from CAMPAIGN\_RULE table | +| | End date/ Ngày kết thúc | The end date of effected period Campaign Rule | | Display Lookup value from CAMPAIGN\_RULE table | + +1. A new/edit reward pool will display in pending Tab and display in Active tab after user approve the TC. +2. Repeat for each reward pools to be added/edited. + +### Post-Conditions + +1. User able to proceed Campaign Rule setup/ Item price setup / Post new transaction/PwP setup….any where pool id is required. +2. A pool with Card-level setting will be updated with one Pool bucket per unique pair of Card number + period (start date and expiry date). The balance in each Bucket in the Pool can only be redeemed by the Card that earned the balance in that bucket. +3. A pool with Account-level setting will be updated with one Pool bucket per unique pair of Account & period (start date and expiry date). The balance in each Bucket in the Pool can only be redeemed by the Account (and any Card of that Account, depending on the redemption criteria) that earned the balance in that bucket. +4. A pool with Customer-level setting will be updated with one Pool bucket per unique pair Account & period (start date and expiry date). The balance in each Bucket in the Pool can only be redeemed by the Customer, using any Account/Card of the Customer (depending on the redemption criteria) that earned the balance in that bucket. +5. Within each Pool, the earnings are tracked in Pool Buckets segregated by Expiry Date and Account Type. The earnings by an Account are tracked in that Account’s buckets in the Pool if pool entity level is Customer or Account level. The earnings by a Card are tracked in that Card buckets in the Pool if pool under Card level. +6. If the earnings fall into different expiry dates, then the earnings of each expiry date are tracked in a distinct bucket for that Account/Card, for each preiod (The start date and expiry date of the bucket). + +### Exception Flow + +1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Pool Conversion Rate + +### Requirement Definition + +1. The Pool Conversion Rate table is a look-up to associate a description text to each Pool Conversion Rate Code for easy user reference in displays and reports. +2. Reward types are tracked in Pools. Each Pool is associated with a Pool Conversion Rate. The Pool Conversion Rate Code is associated with a Pool Conversion Rate set in the Currency\_Rate table. When processing reward and redeem/adjustment transactions, the Currency Rate for the Pool is used. + +### Process Flow + +[Image Removed] + +### Trigger + +1. Pool conversion rate is not existing in OLS or have some informations need to be corrected. + +### Pre-Conditions + +1. Users have to have the access rights in both Pool Converion Rate and Currency Rate moudles in order to can view/update or approve these records. +2. User must select a record in pool conversion rate listing page to bring up Curreny Rate tab. + +### Wireframe + +1. Summary listing page + +[Image Removed] + +Figure 1 – Pool Conversion Rate + +[Image Removed] + +Figure 2- Currency Rate + +1. Detail view + 1. Detai view + +[Image Removed] + +Figure 1 - Pool Conversion Rate + +[Image Removed] + +Figure 2- Currency Rate + +* 1. Record status + +[Image Removed] + +Figure 1- Pool Conversion Rate + +1. Create/Edit form + +[Image Removed] + +Figure 1- Pool Conversion Rate + +[Image Removed] + +Figure 2 – Currency Rate + +### Business Rules + +1. Click on the Pool Conversion Rate icon in the navigation panel under Campaign Management to get a listing of the existing Pool Conversion Rate, as illustrated in section 4.7.5. +2. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for Pool Conversion Rate is illustrated in section 4.7.5. +3. Double click on any existing record in Active Tab then the Currency Rate listing is illustrated in section 4.7.5 +4. Click on the Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) and then clicking on the Edit icon (!) also brings up the same edit form. The edit form for Pool Currency Rate is illustrated in section 4.7.5. +5. **Screen descriptions:** + +| Seq | Field (EN/VN) | Description | Type | +| --- | --- | --- | --- | +| **Pool Conversion Rate Code/ Mã tỉ lệ chuyển đổi** | | | | +| 1 | Pool conversion Rate Code\*/ Mã tỉ lệ chuyển đổi pool | * A code to represent the pool conversion rate. * To contain at least one alphabet. | ~~X(3)~~ X(10) | +| 2 | Description\*/ Mô tả | * Description of the currency code. This description will be shown in the drop-downs, reports etc. | X(30) | +| **Pool conversion Rate / Tỷ lệ chuyển đổi** | | | | +| | Pool Conversion Rate Code\*/Mã tỉ lệ chuyển đổi pool | * This is the Pool Conversion Rate whose Rate against the Base Currency is being configured. | View only | +| | Buy Rate\*/ Tỉ giá mua | * This is the amount of Base Currency required to purchase 1 unit of the Currency Code (i.e. 1 Pool Unit). * This is used to calculate the value of a point awarded transaction for posting to GL for award. This is also used to calculate the value of a point adjustment transaciton for posting to GL for positive adjustments. * The rate used is the effective rate at the time of transaction. | 9(6,2) Should be greater than 0 | +| | Sell Rate\*/ Tỉ giá bán | * This is the amount of Base Currency that will be received in exchange for giving away one Pool Unit of the Pool that is assigned to this Currency Code. * This is used to calculate the value of a point redemption transaction for posting to GL for non-catalogue item redemptions. This is also used to calculate the value of a point adjustment transaction for posting to GL for negative adjustments. * The rate used for deriving costs is the effective rate at the time of transaction. | 9(6,2) Should be greater than 0 | +| | Effective From Date\*/ Ngày bắt đầu | * Start Date is the date on and after which the Rates in this record are effective * End Date is the date after which the Rates in this record is no longer effective. * The end date must greater than or equal to start date. * During the period between Start Date and End Date, the record is an “Effective Record”. * If there is more than one Effective Record for a Currency Code at any one time, then rates in the Effective Record with the latest Start Date are used. | Date The date format must adhere to the configured format | +| | Effective End Date\*/ Ngày kết thúc | + +### Post-Conditions + +* 1. User able to proceed Pool Definition setup. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Counter Definition + +### Requirement Definition + +* The system makes use of Counters to track totals – e.g. total spend, total earned, total redeemed – within given time periods. +* The Counters can then be referenced in Campaign Rules are criteria. +* Counters are updated only upon fulfilling the Rule Criteria, and hence be used to track transactions that fulfill particular conditions – e.g. only transaction so $100 or more, only transactions done on Wednesdays, etc. +* A Counter is structured + + Counters can track totals by periods – e.g. monthly totals, quarterly totals, etc. + + The cut-over from one period to the next can be: + - 1. Automatic based on the Transaction Date or the Batch Date, or + 2. Forced, by setting a Counter “State” when it is decided that a period total should be closed and a new one started. This is a “State Counter” +* A “State Counter” tracks the total in the same bucket until a process (e.g. a Campaign Rule) specifically updates the State of the bucket to “close” the bucket. + + After the State of the bucket is updated to “Closed”, further updates to the Counter goes into a new “current” bucket. + + Every update to the Counter thereafter updates the “current” bucket until its State is updated to “closed” + + A new “current” bucket is automatically created by subsequent updates. +* Use Case: the campaign is to reward customers with a 5% bonus on top of the month’s total earnings from regular campaigns if customer’s total spend in that month is more than $1,000 + + Customer’s earnings from regular campaigns are updated into a monthly counter C1 by the regular Campaign Rules + + A separate Campaign Rule is set up to update a monthly spend counter C2 on every spend transaction processed throughout the month + + At the end of the month, all customers whose Counter C2 is more than $1,000 are awarded 5% of the total earnings tracked in C1. + +### Process Flow + +[Image Removed] + +### Trigger + +* If the campaign requires transaction amounts to be accumulated or counted before the award can be determined, then Counters are required. +* If Counter is required and it is not an existing Counter, click on Counter Definition icon in Main Menu to bring up the summary list as illustrated in section 4.7.5 +* For example: + + A Counter may be set up to track the total spend by the card in merchants with selected MCC – such a Counter is a “spend” Counter + + A Counter may be set up to track the number of pool units calculated by Rule Formulae (for award and redeem) – such a counter is a “Pool Units” Counter + + A Counter may be set up to track the number of transactions performed by card at a selected merchant – such a counter is a “frequency” Counter + +### Pre-Conditions + +N/A + +### Wireframe + +* Click on Counter Definition in Main Menu to bring up the summary list as illustrated here: + +[Image Removed] + +* Use the search filter to locate the counter required: + +[Image Removed] + +* Click on Add a Counter in the screen will bring up the same edit form as illustrated in the following + +[Image Removed] + +* Click on a row showing an existing Counter in the display will bring up the view form for that Counter as illustrated here: + +[Image Removed] + +* Click on “Record Status” tab in the view form of counter will bring up the record history for that Counter as illustrated here: + +[Image Removed] + +### Business Rules + +The key data entities making up Counter are defined in the following table: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| | Counter Id\*/ ID bộ đếm | Unique identifier for a Counter Definition record | X(10) | +| | Counter Name\*/Tên bộ đếm | A text string that describes this counter; it can be used as a unique identifier for this Counter Definition. | X(50) | +| | Counter Description/Mô tả bộ đếm | A text string that more completely describes this Counter Definition, elaborating on what it is used for (its intended purpose), etc | X(200) | +| | Effective From Date\*/ Ngày hiệu lực bắt đầu | Start Date is the date on and after which the Counter is effective. | Date. The date format must adhere to the configured format | +| | Effective To Date \*/Ngày hiệu lực kết thúc | End Date is the date after which the Counter is no longer effective. • During the period between Start Date and End Date, the record is an “Effective Record”. End date must equal or greather than start date | Date. The date format must adhere to the configured format | +| | Entity\*/Cấp thực thể | Drop-down, defines the Entity level at which the counter will be kept – this determines, for example, whether the count is tracking spend at customer level or account level, etc. E.g. a Counter at Customer level means there is a unique Counter per Customer. The Entity level at which a quantity is to be tracked | X(05) Drop-down. Select one. Lookup value from "Code\_Management" table where code type is "counter-level". Refer "get-by-code-type" API under master data. | +| | Bucket Period Unit \*/Thời kì đếm | The Counter records data in “Buckets” per “Counter Period” The Counter Period of a Counter defines the time period for which to accumulate in a single bucket in the counter. When a transaction triggers a Counter update action, the Counter Method calculates the Counter Period based on the Counter Definition parameters and the Transaction Date: At the end of the Counter Period, a new bucket is automatically created. A Counter Period is quantified in terms of the Length of Counter Period, which is measured as “N Counter Period Units”, i.e. each Bucket tracks totals for one Counter Period of “N Period Units”; The “Period Unit” can be any one among the following values. | | | | | --- | --- | --- | | * + AOD Anniversary | * + Day Counter | * + Days from AOD | | * + Days from COD | * + Fixed Date | * + Half Year | | * Months from AOD | * + Month Counter | * + Non Expiry | | * + Quarter Counter | * + Quarters from AOD | * + Week Counter | | * + Year Counter | | | **Note:** Following bucket period unit just apply for Account/Card entity-level only: * + 1. AOD Anniversary 2. Days from AOD 3. Months from AOD 4. Quarters from AOD. Besides, the "Days from COD" period unit is applicable for the Card Entity-level only. Other bucket period units are applicable for all entity levels. **For example:** if “Period Unit” is Months, and N is 2, then each Bucket tracks the totals for a period of 2 consecutive months where the “N Period Units” per Bucket takes the value “2 months” per Bucket. If the Counter Period is Month and N is 3, then each bucket tracks the total for 3 months, starting from month of Start Date (see description for the input field “First Bucket Start Date is Based On”) and ending at the end of 3 months after the month of Start Date.. The derivation of the Bucket End Date of each Bucket is therefore based on the parameter “Bucket Period Duration” per Bucket. The derivation algorithms are described in item **8** | Drop-down Select one Lookup value from "Code\_Management" table where type code is "counter-period". Refer "get-by-code-type" API under master data | +| | Bucket End Date/ Ngày kết thúc bộ đếm | Condition field. This field is actived and required only when "Fixed date" Unit is selected | Date. The date format must adhere to the configured format | +| | Bucket Period Duration(N)/ | Condition field. Inactive if Bucket period unit as Fixed date/Non-expiry. Required and active for remaining period unit. counter bucket based on duration as following: * **N-Day Counter:** One bucket is created every N Days, starting from the date of first transaction. E.g. + If first transaction is on 13th March and N is 10, then the first Bucket expires after 23rd March. + All transactions before and up to and including 23rd March updating the Counter will update this Bucket. + A transaction dated 24th March updating the Bucket on 24th March will result in a new Bucket expiring on 3rd April (10 days later). A transaction dated between 4th - 12th April 2018 will update a Bucket with Expiry Date 12th April 2018 N defaults to 0 (the minimum), in which case a Bucket is created everyday there is a transaction –i.e. Bucket Expiry Date is Transaction Date. * **N-Month Counter**: One bucket is created every N Months, starting from the month of first transaction + The month when the first Counter Bucket is created is the Start Month of the Counter. The Bucket Expiry date of the first Bucket is set to end of N months thereafter. E.g. if first transaction month is May, and * + N = 1, then the Bucket Expiry Date is 30-June. + Each transaction updates Bucket with the smallest Expiry Date which is later than Transaction Date. + If there is no Bucket with Expiry Date greater than or equal to Transaction Date, a new Bucket is created with Bucket Expiry Date set to the next end of month which is a multiple of N months from Start Month. N defaults to the minimum of 0, in which case the Expiry Date is the end of transaction Month. * **N-Week Counter**: One bucket is created every N Weeks, starting from the Week of first transaction. + N defaults to the minimum of 0, in which case the Expiry Date is the end of transaction Week Start of Week is entered as a second parameter * **N-Quarter Counter**: One bucket is created every N Quarters, starting from the Quarter of first transaction N defaults to the minimum of 0, in which case the Expiry Date is the end of transaction Quarter * **N-Year Counter**: One bucket is created every N Years, starting from the Year of first transaction N defaults to the minimum of 0, in which case the Expiry Date is the end of transaction year. * **No Expiry** The same Bucket is updated all the time, until the State is specifically updated to * **Fixed Date Period** + This is a single-period Counter period calculation method. The Bucket Expiry Date is set to the Fixed Date. Bucket is updated by all transactions that have a transaction date before the Fixed Date. * **N Days from AOD** * One bucket is created every N Days, starting from the AOD. * **N Months from AOD** * One bucket is created every N Months, starting from the AOD. E.g AOD = 15/July/2022 counter unit = 1 month of AOD Then counter bucket will be: 15/July - 14/Aug, 15/Aug - 14/Sep 15/Sep - 14/Oct... * **N days from COD** (Card Open Date) * One bucket is created every N Months, starting from the COD. E.g COD = 15/July/2022 counter unit = 1 days of COD Then counter bucket will be: 15/July – 15/Jul, 16/Jul – 16/Jul | 9(02) Should be greater than 0 if provided | +| | What to count\*/ Tiêu chí đếm | The data entity that is to be counted or tracked | Drop-down Select one Lookup value from "code\_management" table where type code is "counter-count". Refer "get-by-code-type" API under master data | +| | Reset type\*/Loại cài đặt lại giá trị | The Reset Type choices are as follows: Reset to 0 when Reset Value exceeded/ Reset to remainder when Reset Value exceeded | Drop-down Select one Lookup value from "counter-count" table where type code is " counter-reset-type". Refer "get-by-code-type" API under master data | +| | Reset Value\*/Khi giá trị vượt qua | Defaulted to “999999999”. Must be numeric. Indicates the value at which the counter Bucket End Date will be set to the current date-time and a new bucket is started | 9(14,2) | +| | First Start Date Is Fixed/ Ngày bắt đầu đầu tiên là cố định | Condition field.Inactive for following Buket Period Unit: **Days from AOD, Months from AOD, AOD Anniversary, Quarters from AOD, Fixed Date, No Expiry, Days from COD** | Switch button. Default off | +| | First Start Date/Ngày bắt đầu | Condition field. Active and required only when First Start Date is fixed | Date. The date format must adhere to the configured format | +| | Update State When\*/ Cập nhật trạng thái bộ đếm khi | The Counter Buckets have a default State of “C” (“created”). This State can be updated to “A” to force a stop to the update of the Bucket and cause a new Bucket to be started in the same period. "On ward" when counter is extracted and hit CP rule. "On extract" when counter is extracted regardess to hit or no hit CP rule."Never" mean for Counter state still is C even counter is extracted or not" | Radio button. Lookup value from "Code\_Management" table where type code is "counter-state". Please refer "get-by-code-type" API under master data | +| | Late transaction Posting Option\*/ Đăng giao dịch trễ | This option is used to determine the counter bucket which late transaction posting will update. There are 2 options: * Late counter value: The TP will update counter value into “late counter value” if transaction posted after counter is extracted * Current counter bucket: The TP will update counter value into value of currently counter bucket regardless of Effective Date. Refer to post -condition to get more logical on this one | Radio button Default “Late counter value” Lookup value from “Code\_Management” table with code type is “late-txn-posting”. Refer “get-by-code-type” API under master data. | +| **Validation:** - If the Counter Id already exists counter value (counter\_stock table), please block changes to the Counter Definition record except for the End Date/Counter Name/Description. In this scenario allow End Date to be brought forward (>= current Batch Date) or pushed further into the future. - Cannot delete if counter id already exists in Counter\_stock table. | | | | + +### Post-Conditions + +* + - * 1. The **Expiry Date** (**ED**) of a Counter Bucket to be updated by a transaction with Transaction Date = TD is the Bucket with ED derived as specified in the following link: + +[Update counter (Formula 5) Processing](https://www.figma.com/board/fB9IOr5v0TqV6PDmHTRKjt/Counter-Update-Processing?node-id=0-1&t=dqH5oSLyq0vPxltU-0) + +1. Late counter transaction posting + +**When late transaction is comming:** + +If "Late Transaction Posting Option" = "Update Late Value" + +& State! = C then update + +Else if "Late Transaction Posting Option" = "Update Current Bucket" + +& State! = C --> update Current Bucket (Use post date of the transaction to determine the current bucket to update), regardless of Effective Date. + +**Scenario: [Image Removed]** + +### Exception Flow + +## Transaction Category + +### Requirement Definition + +* 1. Transaction Category help business can define each processed transaction under pre-defined category. + 2. Transaciton Category is one combination of more than one criteria, that allows same criteria set may be re-used many times. The most importantly, it allows a more efficient way to setup Campagin Rule Criteria. + 3. **Business case:** + +3.1 Enrollment Program + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Trasaction Category** | **Campaign Rule Criteira** | **Award rate** | +| | Dining | Dinning transaction AND Local currency and DCC transaction | 1% | +| | Entertaiment | Entertainment transaction AND local currency and DCC transaction | 2% | +| | Dining | Dinning transaction AND Foreign currency and NOT a DCC transaction | 3% | +| | Entertaiment | Entertainment transaction Foreign currency and NOT a DCC transaction | 4% | + +If there is no Transaction Category, we need to have we need to have separate counter ids for these 4 cases so we need 4 Campaign Rules to update these 4 counters. + +Therefore If the 4 conditions are are captured as transaction category then we have: + +TxCat1 = Dining txns, local currency + DCC + +TxCat2 = Entertainment txns, local currency + DCC + +TxCat3 = Dining txns, foreign currency + not DCC + +TxCat4 = Entertainment txns, foreign currency + DCC + +To archive this campaign, when define the transaction category we just need: + +* One counter under Account-TxnCat couter level +* One CEP rule to extract counter value to trigger award rule to get award points/cash back. +* One Campaing Rule using F6 to fulfilment this requirement. + +### Process Flow + +### Trigger + +### Pre-Conditions + +1. Users have to have the access right in the Transaction Category moudle in order to able to view/update or approve these records. +2. Assume that all criteria are defined as attribute and appear in right panel to user can drag/drop to setup + +### Wireframe + +* + - 1. Create/Edit mode + +[Image Removed] + +[Image Removed] + +### Business Rules + +1. Each of these criteritions are accessed directly by drag/drop on the right **Criteria** panel as illustrated in the wirefarme. +2. OLS system will use Query Builder to build query for this screen such as Rule Criteria. +3. All criterions will be listed on selection criteria panel (right panel). User can drag/drop criteria from right panel to set up rule. Criterion list will be defined as attribute so that user can define needed criteritions. +4. OLS system support AND or OR condition between difference criteria groups on the same campagn rule. The relationship operator on each group will be applied for all criteritions on the group. User can setup only one or many group on the same rule but OLS system just support the same operator condition bettwen groups such as all are OR conditons or all are AND conditions. + +*For example:* + +*Rule 1:* + +*Group 1* ***OR*** *Group 2* ***OR*** *Group 3* + +*Rule 2:* + +*Group 1* ***AND*** *Group 2* ***AND*** *Group 3.* + +1. Introduce NOT toggle switch to support exclusion criteria. +2. User can put the key word to search criteria on Right Criteria panel. +3. Each criteria can be used one more time in the same category. +4. **Screen description** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **General information** | | | | +| | Transaction Category Code\*/Mã danh mục giao dịch | Unique identifier for a Txncat record | X(05) | +| | Transaction Category Name\*/Tên danh mụ c giao dịch | Name of transaction category | X(50) | +| | Description/Mô tả | Description for refer only | X(100) | +| **Transaction Category Configuration** **The same approach as Rule Criteria. See more detail in the section** [**Rule Criteria**](#_Business_rules_1)**.** **Note: The Criteria list are the same as Rule Criteria except Transaction Category Criteria** | | | | + +### Post-Conditions + +* + - 1. Transaction category will be used in the Campaign Rule Criteria as a separate criterion. + +### Exception Flow + +## Account Type Group + +### Requirement Definition + +* + - 1. An account type is a combination of Product account level and product account type. + 2. Account Types are put into Account Type Groups (ATG). ATG is groups Account Types (Org + Logo) and orders them in priority for deductions during redemptions and adjustments (Customer-level Pools) + 3. Each reward Pool is assigned an ATG, and only Accounts of the selected ATG can earn/postive adjust into that Pool. + 4. There is no ATG checking for redemption and negative adjustment. + 5. An ATG Sequence number is assigned to each Account Type in an ATG. + 6. When system has to select an Account Type for a transaction, the Account Type with the smallest ATG Sequence is selected. + +### Process Flow + +[Image Removed] + +### Trigger + +1. New account type is coming then need to be added this account under ATG of reward pools. +2. Some points need to be corrected for existing ATG. + +### Pre-Conditions + +1. Users have to have the access right on this screen in order to can view/update or approve these records. +2. Account type which apply for ATG have to be actived on OLS. + +### Wireframe + +* + - * 1. Summary listing page + +[Image Removed] + +Figure 1 – Listing page + +[Image Removed] + +Figure 2- Filter + +* + - * 1. Detail view + 1. Detail view + +[Image Removed] + +* 1. Record status (history) + +[Image Removed] + +* + - * 1. Create/Update form + +[Image Removed] + +### Business Rules + +* + - * 1. The combination ATG id + Account type ( logo+ org) and Sequence No is unique. + 2. If ATG required has not been defined, click on Account Type Group icon in Main Menu to bring up the summary list as illustrated in section [Wireframe](#_Wireframe) + 3. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form for Account Type Group is illustrated in section [Wireframe](#_Wireframe): + 4. **Screen descriptions:** + +| Seq | Field (EN/VN) | Description | Type | +| --- | --- | --- | --- | +| 1. | Account Type Group Id\* / Mã loại nhóm tài khoản | Account type group ID which assingned to rewards pool. The combination of ATGid and Account type is unique. | X(10) | +| 2. | Description\*/ Mô tả | Description to describe this ATG | X(100) | +| 3. | Product Account Level\*/Hạng tài khoản | * 1. An ATSP is a list of Account Type (PA Level || PA Type) 2. Each Account Type (combinnation of PAT and PAL ) in the list is assigned an ATG Sequence Number (ATGSN) unique within the list. | Drop -down Select one Lookup value from “Product Account Level” screen- PAL table Refer to “Product Account Level” API under Code Maintenance | +| 4. | Product Account type\*/Loại tài khoản | Drop-down Select one Lookup value from “Product Account Type” screen- PAT table where PAL is selected PAL Refer to “Product Account Type” API under Code Maintenance | +| 5. | Sequence No\*/ Số thứ tự | The processing sequece number | 9(04) Should be greater than or equal to 0 | +| **Linked Pool / Pool liên kết** This listing page is actived when user click view detail of an ATG record. The listing page includes all pools linked to the selected ATG, as well as the effected campaign rule linked to each pool. [Image Removed] | | | | +| | Pool/Pool | Pool linked to the selected ATG | Display Include Name and Code Lookup value from “Pool Definition” Screen. Lookup Pool\_Definition table where ATG of the pool is selected ATG. | +| | ~~Pool Name/ Tên pool~~ | ~~Pool Name~~ | ~~Display~~ ~~Lookup value from “Pool Definition” screen.~~ ~~Refer to “Pool Definition’ API under Campaign Management~~ | +| | Campaign Rule / Quy tắc chiến dịch | Campaign Rule linked to the reward pool Leave as empty if there is no CP rule linked to this pool e.g New pool | Display Includes name and code Lookup value from Campaign\_Rule table by specific pool Id | +| | ~~Rule Name/ Tên quy tắc~~ | ~~Name of Campaign Rule~~ | ~~Display~~ ~~Lookup value from “Campaign\_Rule” table by specific Campaign Rule ID~~ | +| | Effective Date /Ngày hiệu lực | Effective Date of Campaing Rule Leave as empty if there is no CP rule linked to this pool e.g New pool | Display Includes Effective Start Date and Effective End Date Lookup value from “Campaign\_Rule” table by specific Campaign Rule ID | + +### Post-Conditions + +1. ATG is used for dedection sequency control. When customer redeem/ post negative adjustment transaction under customer pool enity level: + 1. Based on Pool entity level / ATG of pool to locate deducted pool balance bucket. + 2. Points are deducted in order of ascending Expiry Date (earliest expiring dates first). + 3. If more than one bucket has the same expiry date, the bucket are further sorted by start date (earliest starting dates first). + 4. If more than one Bucket has the same expiry date and start date, the buckets are further sorted by a pre-configured priority sequence – i.e. buckets of lower priority Account Types will be deducted first. Account types are not under ATG will have the highest priority sequence. + 5. Redemption from expired buckets is allowed with supervisor approval during item redemption through administration screen. + +* Example of an ATSP comprising 2 Account Types + +ATSP Id PA Level PA Type Sequence Number + +| 11 | | 830 550 | | 10 | + +| 11 | | 830 630 | | 20 | + +When posting transactions where the Entity provided is the CIF Number, an Account of the CIF with lowest ATSN will be selected to be the Transacting Account + +*Example 1*: when transaction in batch transaction file contains CIF Number but not Account Number, an Account of the CIF Number will be selected whose Account Type has the smallest sequence number in the ATG of the Pool of the transaction. + +*Example 2*: when a CEP transaction is posted where the Counter is at Customer level, an Account of the CIF Number will be selected whose Account Type has the smallest sequene No in the ATG of the Pool of the transaction. + +1. ATG is used to find account to post transaction in case transaction is coming with CIF number only. In case ATG is appliable then: + +* A = set of all Acct Types of Cust +* B = set of Acct Type in ATG of Pool +* C = Intersection of A and B + +**Therefore**: + +* If C is null then txn is rejected. +* if C is not NULL, and more than one acct type found in C, TP will get Acct type with smallest seq no in ATG of Pool to post transaction. + +**Example**: Adjustment transaction is posted by CIF number then TP must locate Account which under ATG of pool to post transaction. + +1. ATG is used to validate transacting account/Card/CIF. Transacting Account/Card/CIF number should be under ATG of pool. + +* If incoming transacitons are posted by Account or Card then transacted account type should under ATG of reward pool. If not transaction will be rejected. +* If CIF number is provided only then TP base on following process to find eligible account to process: + +A = set of all Acct Types of Customer + +B = set of Acct Type in ATG of Award Pool + +C = Intersection of A and B + +**Therefore:** + +* If C is null then txn is rejected. +* if C is not NULL, and more than one acct type found in C, TP will get Acct type with smallest seq no in ATG of Pool to continue processing. + +**Example:** Award transaction is posted by CIF number then TP must to locate Account under eligible acccount type to find valid rule and trigger CP rule. + +1. ATG is used to validate blocked transaction. +2. ATG is employed to determine the account type restricted by the reward pool specified in the Pool Definition. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Reward Campaign + +### Requirement Definition + +1. Business rules controlling reward and redeem transactions are set up as Rules in “Campaigns”. +2. Customers enjoy different reward types depending on the type of card (Account/CIF) they hold and the details of the transactions. +3. A single transaction can trigger multiple concurrent award programs. +4. Groups of outlets can operate their own outlet-specific Campaign Rules with different rules and periods per Campaign Rule. +5. Type of campaign in OLS: + +* Award on every transactions: The reward is determined at the time the transaction is processed in OLS. Campaign structure as bellow: + +[Image Removed] + +* Accumulate then Award: In an “Accumulate then Award” campaign, the reward depends on the customer’s total spend or number of transactions performed … over a period. Campaign structure as bellow: + +[Image Removed] + +1. Auto redemption Campagin: Some campaigns, such as cash rebate or frequent flyer mile campaigns, require that the awarded quantities (cash rebates, frequent flyer miles or other partner points) be “redeemed” and sent to an external (destination) system – Card, deposits or partner airline, etc – in order to credit the customer’s account in the destination system. +2. Combination of all above campaign type: Some campaign, such as welcome campaign, require that the awarded from customer’s total spending and the awared quantities be “redeemed” and sent to an external system. + +### Process Flow + +### Trigger + +### Pre-Conditions + +1. Users have to have the access rights in Campaign moudle in order to can view/update or approve these records. + +### Wireframe + +Refer wireframe on figma. + +### Business Rules + +* + - * 1. Click on “Campaign” icon in Main Menu to bring up the summary list as illustrated in section [Wireframe](#_Wireframe_17) + +1. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form Campaign is illustrated in section [Wireframe](#_Wireframe_17) +2. Campagin Rule as a subtab of active campaign when user click to view any active campaign. User can directly create new campaign rule of selected campaign instead. +3. Screen descriptions + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Create/Edit mode** | | | | +| | Campaign ID \*/ Mã chiến dịch | Uniquely identifies the Campaign: system generated or entered by user | X(10) | +| | Campaign Name\*/Tên chiến dịch | Name of the campaign, used in drop-downs. Must include at least 10 non-space characters | X(50) | +| | Campaign Owner/Người sở hữu | Text string for user reference only | X(50) | +| | Campaign Description/ Mô tả chiến dịch | Description for user reference | X(500) | +| | Campaign Type/Loại chiến dịch | Campaigns are either “Base”, which are basic campaigns that generally apply across the board and a core part of the product, or “Tactical” campaigns, which are short-term campaigns with specific objectives – e.g. to boost the month’s spend in foreign currency, etc | Check box Default none. Select one Lookup data from “code\_management” table where code-type is “campaing-type”. Refer "list-by-code-type" API under "Master data" with type code is" campaign-type" | +| | **Campaign Target** | | | +| | Target Active Customer Count / | This is used for Campaign insight The total targeting customer in the campaign. | 9(10) Should be greater than 0 if provided | +| | Target Average Transaction Value/ | This is used for Campaign insight to compare actual value with targeting value. The total targeting total spending in the campaign. | 9(14,2) Should be greater than 0 if provided | +| **View mode: Display all field of create mode and add following fields:** | | | | +| | Campagin Period/Thời gian hiệu lực của chiến dịch | This shows earliest Rule start date and the latest Rule end date in this campaign. These dates are derived from the actual rules in the Campaign and not derived | Display and enable for view mode only | +| | Number of Rules in Campaign/ Số quy tắc trong chiến dịch | Dynamically computed when screen is in display mode, shows the count of number of Rules in this campaign | Display and enable for view mode of active record only | +| | **Campaign Rule tab: A sub tab to include all campaign rule belong to this CP. This appear when view any active CP.** | | | + +### Post-Conditions + +### Exception Flow + +## Reward Campaign Rule + +### Requirement Definition + +* 1. Campaing Rule are used to define the business rules for giving a reward, or defining the conditions for redemption of a reward. Use a campaign rule also to define the rules for Load transactions. + 2. Each campaign rule is comprised of the campaign rule header (as defined in this screen), the campaign rule master where some common parameters for reward calculation are set, and the Campaign Rule Formulas where the actual reward formulas are defined. + 3. The Pool to which the result of the Campaign Rule Formulas are posted is set up in the Pool Relationship tab. The Transaction Link tab is used to link this scheme to all the transactions to which this scheme is to apply. + 4. In this version we support following Campaign Rule type: +* Award +* Redeem +* Adjust +* Item Redemption +* Counter Extract and Process +* Redeem Extract and Process +* Transaction Extract and Process + 1. In this section, we just focus on the rule type which will go through Campaign Rule to check criteria and get reward points: Award/Redeem/Adjust + +### Process Flow + +### Trigger + +### Pre-Conditions + +* + 1. Users have to have the access rights in Campaign Rule moudle in order to can view/update or approve these records. + +### Wirefame + +Refer to Figma. + +### Business Rules + +* + - * 1. Click on “Campaign Rule” icon in Main Menu to bring up the summary list as illustrated in section Wireframe + 2. Click on Add button ([Image Removed]) in the screen to bring up the edit form; clicking on the MoreOutLined icon (⋮) then click on Edit icon (!) also brings up the same edit form. The edit form Campaign is illustrated in section Wireframe + 3. Campaign Rule Screen can be display as a submodule of Campaing module as well + 4. **Screen description for Edit/Create mode** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Choose rule type to configurate campaign Rule** | | | | +| | Choose Rule type | Click on "Create" button to bring up main page. User must to choose"Award/Redeem/Adjust rule type" to go to next step. If Rule type is not selected user must to select existing template to continue otherwise "Next" botton is disbale". If user choose "Award/Redeem/Adjust" rule type then UI/UX of award rule type is displayed. Rule type is getting from | Radio button Rule type is getting from "Code\_Managemnt" table. Refer "list-by-code-type" API under master data with code type is" rule-type" | +| **Step 1: General information** | | | | +| | Campaign ID \*/ Mã chiến dịch | The Id and Campaign Name of the campaign to which this Rule belongs | Display if rule under campaign module. Drop-down if create fromseparately screen. Lookup value from Campaign Table. Refer to "Campaign"API under Campaign Management | +| | Campaign Rule ID\*/Mã quy tắc chiến dịch | Rule identifier. Support system-generated. For reference only | X(10) | +| | Campaign Rule Name\*/Tên quy tắc chiến dịch | Name of this Rule, for easy user reference | X(50) | +| | Description/ Mô tả | Long description of this Rule, for user reference | X(500) | +| | Rule Type\*/ Loại quy tắc | The rule type which user selected on step 0 | Display | +| | Effective Date From\*/ Ngày bắt đầu hiệu lực | Apply this rule only to transactions with Transaction Date/Post Date (depended on effect rule based on between the Start and End Dates (inclusive) – the “Effective Period”. | Date | +| | Effective Date To\*/Ngày hiệu lực kết thúc | All “Effective Periods” defined by “Start Date” and “End Date” always start at 00:00:00 and end at 23:59:59 midnight of the respective dates. To date must equal or greater than from date | Date | +| **Step 2: Rule setting :** If madatory fields in step 1 are not provided then step 2 is blocked **Rule Detail** | | | | +| | Effective Period is Based On\*/ Hiệu lực dựa trên | Determining whether the transaction being processed is within the Rule Effective Period is by using either the Transaction Date in the transaction data, or the system batch date (which is used as the Post Date for transaction processed during the day) | Radio button. Default "Transaction Date". Lookup value from "Code\_Management" table. Refer to "get-by-code-type" API under master data with code type is "date-to-use-txn" | +| | Pool \*/Pool | The Reward Pool on which the result of this rule will be applied (i.e. the Pool awarded to, redeemed from, etc) Evoucher pool is applicable for Award Rule Type only | Drop-down. Select one. Lookup value from "Pool\_Definition" table. Refer "Pool Definition" API under Campaign Management. | +| | Item Code/Vật phẩm | Condition field This is only active and required when Evoucher Pool is selected in the previous step | Drop down Select one Get active eVoucher item from Item master screen. | +| | Message Template ID/Mẫu tin nhắn | Message template containing the message text for sending an SMS or Email if this Rule is hit (depending on the template type) or to return the text from the message template in the response message to and online request. The message templates support a range of placeholders including all data elements in the transaction context, Customer and Account records | Drop-down. Select one API: =tbd= | +| | Stop if criteria met/Dừng tặng thưởng khi thỏa mãn điều kiện | If this is selected to Yes, the current transaction will not be processed against other Rules linked to the TC of the current transaction if the criteria in this Rule are met. | Switch botton. Defaut OFF | +| | Do not update pool/Không cập nhật pool | If this is selected, the Pool Balance is not updated with the Result of Formula calculations of this Rule even if the Criteria are met. This is usually set if the Rule is intended only for Counter Update or Attribute update and not to give the actual reward. | Switch botton. Defaut OFF | +| | **Link Transaction Code** * + 1. At least one transaction code must be provided 2. On the same campaign rule ID then transaction code must be unique 3. One the same combination of Rule Type and Transaction Code then Execution Sequence must be unique. 4. Reversal TC is not allowed for Adjustment Rule Type 5. Reversal TC is not allowed for reward Evoucher Pool In this part the system support “Quick add” feature for Transaction Code to allow a more efficient way to set up rules | | | +| | Add linked transaction code/Thêm mới mã giao dịch liên kết | Click on “Add” button to add linked TC to the rule. Multiple TCs can be linked to the Rule. TCs can be removed from the panel by clicking on the delete button. | Button | +| | Transaction Code\*/Mã giao dịch | This field is for selecting the Transaction Code to trigger this Rule. When a TC is selected, all Rules linked to the TC, if any, will be listed in the panel “View Other Rules linked selected TC”, together with the current Rule, in the Execution Sequence number order. Take note that TC must be unique on each Campaign Rule | Drop-down. Select one. Lookup value from "Transaction\_Code" table. Refer "OLS Transaction Code" API under Campaign Management | +| | Execution Sequence\*/Trình tự thi hành | Execution Sequence of the Campaign Rule. | 9(04) Should be greater than or equal to 0 if provided | +| | View Other Rules linked Selected TC | Click on this option to view all Active Campaign Rule in the system which under the same Rule type linked to the transaction code. | | | | | --- | --- | --- | | **Field (EN/VN)** | **Description** | **Data type** | | Listing page order by Execution Sequence descring. Support paging also | | | | Rule ID/ Mã quy tắc | Campaign Rule ID linked to | Display Refer “Find Campaign Rule Linked By TxnCode” API under Campaign Rule API | | Rule Name/ Tên quy tắc | Name of Campaign Rule | Display Refer “Campaign Rule “API to get rule name. | | Execution Sequence | Excusion sequence of campaign rule | Dislay as format number | | Hyperlink | +| | Add new transaction code/ Thêm mới mã giao dịch | Quick add feature to support user add Transaciton Code from this screen. The new transaction will be automatiom approved when campaign rule is approved | Button | +| **Step 3: Rule Criteria :** If madatory fields in step 2 are not provided then step 3 is blocked **Please refer more detail in FSD section 4.12 Rule Criteria. Take note that we must to support Include Counter Definition/Attribute Definition/Code Maintenance date for in-line editing and approval with the Rule.** | | | | +| **Step 4: Formula setting** | | | | +| | **Amount to use** This is condition step. If campaign rule include award formula (F1, F4, F6, F8) then this step is required. | | | +| | Amount to Use in Formula (A)\*/Giá trị sử dụng (A) | Derives the Amount A to use in Formula *The result of this operation is used as Amount in Formula selected in this Rule* | Drop-down. Select one. The drop-down inclues all numberic attribute AND all active counter (all of current/previous/before last bucket) AND lookup value from "Code\_Management" table where code type is "amt-to-use-formula" | +| | Cap A not more than/A không vượt quá | Caps the Amount A to use in Formula to calculate the Result | 9(14,2) Should be greater than 0 if provided | +| | Cap per/Giới hạn trên | Conditon field. It is required if Cap A not more than is provided | Drop-down. Select one. Lookup value from "Code\_Management" table | +| | Cap-tracking Counter/Giới hạn trên bộ đếm | Condition field. This field is actived and required only when counter is selected on "Cap per" | Drop-down. Select one. Lookup value from "Counter\_Definition" table with currently counter bucket only. Refer"Campaign Counter Definition" API under Campaign Management. | +| | Apply after Cap value/ Áp dụng thưởng sau giá trị giới hạn A | Condition field. This filed is active and required when “Cap per” is provided | Switch button. Default OFF | +| | Formula result is rounded\*/Kết quả của công thức là | Choice of rounding method, select one: Down/To Nearest/ Up | Drop-down. Select one. Lookup value from "Code\_Management" table where code type is"formula-rounded". Refer" get-by-code-type" API under Master data. | +| | **Award limit:** This is optional step. This sets the cap on the sum of Result from the formula set up in Campaign Rules. If the Result from Campaign Rules exceeds this cap, then this cap is used as the Result. | | | +| | Add Award Limit | Click to add limitation of the result *On each Campaign rule just only one “Give at least” limit is applied.* *Can have more than one “Give No more than” limit are applied* | Button Can’t add new limitation if all required field in currently limitation configuration are not provided. | +| | Give\*/Tặng | Drop-down to select the limit type to sets the Cap of sum the result: * At Least * Nore More Than | Drop-down. Select one. Lookup value from "Code\_Management" table | +| | Cap value\*/Giá trị giới hạn | Limit value can be fixed value as numberic format filed or Attribute value of numeric atribute. Must only one value is provided. If fixed value is provied then "attrbite list" is inactive and vice versa | **Fixed value**: 9(14,2) Should be greater than 0 if provided **Attribute value**: Drop-down. Select one Lookup from “Attribute\_Definiton” Table where data type is number” Refer “Attribute Definition” API under Code Maintenance | +| | Limit result to/Giới hạn theo | Condition field. This field is actived and required when give "No more than" only since “At least” if just apply for per campaign Rule only The drop-down list to select the limit result to as following : * Per Campagin Rule * Ask Tracked in Counter | Drop-down. Select one. Lookup value from "Code\_Management" table | +| | Counter Id/Bộ đếm | Condition field. This field is active and required when "As tracked in counter" is selected only | Drop-down. Select one. Lookup value from "Counter\_Definition" table to list all active point counter (filter by "counts" column). Refer "Campaign Counter Defintion" API under Campaign Management | +| | And Triger Alert/Mẫu thông điệp cảnh báo | Condition field. This field is actived when "As tracked in counter" is selected only | Drop-down. Select one. | +| | Sent to/Gửi cảnh báo tới | Condition field. This field is actived when "As tracked in counter" is selected only | Drop-down. Select one. | +| | When Counter reaches/Khi giá trị bộ đếm chạm tới | Send the notification when counter value is reached the inputed value | 9(14,2) Should be greater than 0 if provided | +| | **Formula Detail** Refer [Campaign Rule formula](#_Campaign_Rule_Formula) | | | +| **Step 5: Contributor Details** Optional step Refer [Contributor](#_Campaign_Rule_–) | | | | + +### Post-Conditions + +Amount to use feature with Transaction Processing. + +[Image Removed] + +[Image Removed] + +### Exception Flow + +## Campaign Rule Criteria + +### Requirement Definition + +1. Rule criteria are divided into 5 categories for ease of maintenance: + +| | | | +| --- | --- | --- | +| Customer | Account | Transaction | +| Atttribute | Counter | Merchant | + +1. Campaign Criteria setup is the next step of campaign rule setting if Campaign Rule require transaction through campaign rule to validate criterions. + +### Process Flow + +[Image Removed] + +### Trigger + +* 1. Exsiting Campaign require at least one campagin rule validate criterions. + +### Pre-Conditions + +1. Users have to have the access right in the Campaign Rule moudle in order to able to view/update or approve these records. +2. Assume that all criteria are defined as attribute and appear in right panel to user can drag/drop to setup. ==TBD== + +[Image Removed] + +1. Assume that each criteria has its own data type and condition list as well. Each condition, user can setup according filter value so that when user drag criteria to setup then filter value will be display based on selected data type and selected condition. + +### Wireframe + +[Image Removed] + +Figure 1 - Query builder + +[Image Removed] + +Figure 1 – Rule criteria + +[Image Removed] + +Figure 2- Drag criteria into Rule + +[Image Removed] + +Figure 3 – Rule criteria screen after complete setup + +### Business Rules + +1. Each of these criteritions are accessed directly by drag/drop on the right **Criteria** panel as illustrated in the [wireframe](#_Wireframe_14). +2. OLS system will use Query Builder to build query for Rule Criteria. +3. All criterions will be listed on selection criteria panel (right panel). User can drag/drop criteria from right panel to set up rule. Criterion list will be defined as attribute so that user can define needed criteritions. +4. OLS system support AND or OR condition between difference criteria groups on the same campaign rule. The relationship operator on each group will be applied for all criteritions on the group. User can setup only one or many group on the same rule but OLS system just support the same operator condition bettwen groups such as all are OR conditions or all are AND conditions. + +*For example:* + +*Rule 1:* + +*Group 1* ***OR*** *Group 2* ***OR*** *Group 3* + +*Rule 2:* + +*Group 1* ***AND*** *Group 2* ***AND*** *Group 3.* + +1. Introduce NOT toggle switch to support exclusion criteria. +2. User can put the key word to search criteria on Right Criteria panel. +3. Each criteria can be used one more time in the same campaign rule. +4. **Screen description:** + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| | [Image Removed] | Click to add new criteria | Button | +| | [Image Removed] | Depended on the purpose of each campaign rule and the criterions list need to be setup to allocate and arrange all criterions into only one or many group. Click on “[Image Removed]” button to create new group. | Button | +| | [Image Removed] | This button is used to exclude all the coming transaction meet the rule criteria. Switch NOT button are applied on combinaiton of all group OR on all criteria on each group. | Switch button | +| | Right panel | List all active criteria on the system. Each criteria per category will be defined as an attribute. See more on #9. [Image Removed] | View only | +| | Drag/Drop criteria | Each criteria can be drag one more time on each CP rule. The operator and filler value for each criteria will be display base on data type of selected criteria. See more detail on #10. [Image Removed] | Action | +| | [Image Removed] | Click to delete criteria | Button | +| | [Image Removed] | Operator between difference groups on the same campagn rule OR operator between difference criterions on the same group per each Campaign Rule. | Drop-down | +| | Criteria | **Criteria Structure:** **Take note:** Criteria is getting from Campaign Rule Criteria Definition API Operator follow by data type of each Criteria Input type is getting from Code\_Management table by code type is “criteria-input-type”. Each operator have separately filter value | | + +1. **Right panel** + +In this phase, assume that all criteria has been defining as an attribute. We just focus on query builder for this scope. + +Assumed that data source of each drop-down filter field are defined as pre-condition === tbd=== + +Assumed that data sources which is used to verify whether the incoming transaction meet criteria/doesn’t are taking from data lake/ data warehouse instead get directly from DB as currenlty. That mean for TP proceed validate from incoming transaction with data lake instead directly take from DB as currently. ===TBD==== + +**Some use case for each criteia group:** + +| | | | +| --- | --- | --- | +| **Index** | **Use case** | **Criteria group** | +| | Transaciton is in A transaciton category is combination of more than one transaction criteria. This conditon checks whether the incoming transaction is in any selected Transaction Category. **Use case:** Requirement: On statement cycle: Dining txns, local currency + DCC -- award x1 Entertainment txns, local currency + DCC --award x2 Dining txns, foreign currency + not DCC -- award x3 Entertainment txns, foreign currency + DCC -- award x4 In existing implementation, we need to have separate counter ids for these 4 cases **So we need 4 rules to update the 4 counters.** If the 4 conditions are are captured as TxCats: TxCat1 TxCat1= Dining txns, local currency + DCC TxCat2 = Entertainment txns, local currency + DCC TxCat3 = Dining txns, foreign currency + not DCC TxCat4 = Entertainment txns, foreign currency + DCC We just need one Counter, Entity = Acct-TxCat We just need one CEP to extract the one counter and just need one award Rule, using F6 to fulfilment this requirement. | Transaction criteria | +| | Counter criteria. Note that the Counter criteria list is dynamic and is from Counter Definition with N bucket per each counter. That mean for each counter must include N criterions per each counter bucket (Current Bucket, Previous Bucket, 1 Period Befor Last….N Period Before Last). Since the Counter value is one numeric value, if one counter criterion is selected, then the operator should follow the operator listing of the Number data type. | Counter criteria | +| | Last Transaction Date Customer's Tenure Is Between Transaction was done in(Country, currency) | Transaction criteria | +| | MCC group Store group Chain group Corporation group | Transaction criteria | +| | ATG criteria | Account Criteria | +| | Attribute Criteria Note that the Attribute criteria list is dynamic and is from Attribute Definition. Each Attribute ID have separately data type therefore the operator of attribute ID should follow data type of selected Attribute. | Attribute Criteria | + +1. **Query builder structure** + +*For example:* + +*+ Account type criteria has data type as string and filter value is account type list from PRODUCT\_ACCOUNT\_TABLE.* + +*+ Transaction description criteia has data type as string but filter value is enterted by user.* + +*+ Counter criteria has data type as numberic and filter value is numeric attribute value from ATRIBUTE\_VALUE table OR counter criteria can have filter value is fixed value which is entered by user.* + +| | | | | | +| --- | --- | --- | --- | --- | +| **Index** | **Data type** | **Filter condition** | **Desciptions** | **Filter value Descriptions** | +| | String | Is equal to (=) | This condition checks whether the comparison value equal with the filter value. For example: [Image Removed] | Depened on selected input type then input type of filter value may be text box or drop-down list. Should not be case sensitive. | +| | Is NOT equal to (<> ) | This condition checks whether the comparison is not equal with the filter value. [Image Removed] | +| | Is empty ( NULL) | This condition checks whether the comparison value is empty. [Image Removed] | MUST not display filter value field and input type | +| | Is NOT empty (Not null) | This condition checks whether the comparison value is NOT empty. [Image Removed] | +| | Contains | This condition checks whether the comparison value contains the filter value. [Image Removed] | ~~Should be a textbox for filter value.~~ Depened on selected input type then input type of filter value may be text box or drop-down list. In case input type is “value”, use input tag for each filter value (in case multiple filter value). Use “\*” to match zero or more occurrences of the preceding subexpression (e.g. xy\*z could correspond to ~~"xz",~~ "xyz", "xyyz", etc.) Should not be case sensitive. For example [Image Removed] | +| | Does not contain | This condition checks whether the comparison value DOES NOT contain any filter value. [Image Removed] | +| | Is in | This condition checks whether the comparison value is in one of the filter value. [Image Removed] | 1. Depened on selected input type then input type of filter value may be text box or drop-down list. Should not be case sensitive. In case input type is “value”, use input tag for each filter value (in case multiple filter value) For example [Image Removed] 1. If filter value is drop-down then comparison value must be IN/NOT in selected list. | +| | Is NOT in | This condition checks whether the comparison value is NOT in all of the filter value. [Image Removed] | +| | Begins with | This conditon checks whether the comparison text begins with the filter value. [Image Removed] | In case input type is “value”, use input tag for each filter value ( in case multiple filter value) For example [Image Removed] Should not be case sensitive | +| | String | Ends with | This conditon checks whether the comparison text ends with the filter value. [Image Removed] | +| | Does not begin with | This conditon checks whether the comparison text does not begin with the filter value. [Image Removed] | +| | Does not end with | This conditon checks whether the comparison text does not end with the filter value. [Image Removed] | +| | NUMBER | Is equal to (=) | This condition checks whether the comparison value equal with the filter value. [Image Removed] | Filter value depened on selected input type One number filter value. **The assumption is that filter values can be entered by the user or selected from a drop-down list.** **E.g The number attribute list from Attribute Definition or a fixed value entered by the user** | +| | Is NOT equal to (<> ) | This condition checks whether the comparison value is NOT equal with the filter value. [Image Removed] | +| | Is less than (<) | This condition checks Comparison value is less than filter value. [Image Removed] | +| | Is equal to or less than (<=) | This condition checks whether the comparison value is less than or equal to filter value. [Image Removed] | +| | Is greater than (>) | This condition checks whether the comparison value is greater than filter value. [Image Removed] | +| | Is equal to or greater than (>=) | This condition checks whether the comparison value is greater than or equal to filter value. [Image Removed] | +| | Is between ( Min value <= X <= Max value) | This condition checks whether the comparison value is greater than or equal min filter value AND comparison value is less than or equal to max filter value. If Min value is not provided then this conditoon checks whether the comparison value is less than or equal Max filter value. If Max filter value is not provided then this condition checks whether the comparison value is greater than or equal to Min filter value. [Image Removed] [Image Removed] | Both Min/Max filter value should be number value At least Min or Max filter value should be provided. **The assumption is that filter values can be entered by the user or selected from a drop-down list.** **E.g The number attribute list from Attribute Definition or a fixed value entered by the user** | +| | Date | Is on or before | This condition check whether the comparison date is less than or equal to filter date. [Image Removed] | Fixed filter date. Date picker should be allow to choose past time/current time and in the future time. | +| | Is on or after | This condition checks whether the comparison date is greater than or equal to filter date. [Image Removed] | Fixed filter date. Date picker should be allow to choose past time/current time and in the future time. | +| | Is between date range with date format parameter | * + - * 1. TTwo date picker fields specify the date range of the comparison value must be within in selected date. 1. Third dop-down field is “Date format to Use”. This field is used to locate the format of the comparison date and date range filer before compare. 2. The system will convert all of filter date value and comparison value into selected date format before compare. 3. If Min filter date is not provided then this condition checks whether the comparison date is less than or equal to Max filter value. If Max filer date is not provided then this condition checks whether the comparison value is greater than or equal to Min filter value. The “Date format To Use” is used to locate the format of the comparison date and selected date before compare. * If DTU is Day of month (DD) or Month only (M) or Year only (Y) then just use day/month/year of the source date value and selected date to compare. * If DTU is Day and Month (DM) then just use day and month of the source date value and selected date to compare. * If DTU is Month and Year (MY) then just use Month and Year of the source date value and selected date to compare. * If DTU is Date (D) then use the source date value and selected date to compare * If DTU is Quarter (QY) then use the quarter (including year) of the comparision value and selected date to compare. * Some scenarios that use this operator as following: *For example 1: Account open date from 01/07/2023 to 31/08/2023.* [Image Removed] *For example 2: Customer’s birthday from Jul 01 to Jul 15* [Image Removed] | Both Min/Max filter value should be date value. At least Min or Max value should be provided. Date picker should be allow to choose past /current and in the future time. Max value should be greater than or equal to Min value. | +| | Is fixed date | This condition checks whether the comparison value is equal to filter value [Image Removed] | Fixed filter date. Date picker should be allow to choose past time/current time and in the future time | +| | Is null | The comparison value must be null value | There is no filter value | +| | Is not null | The comparison value must be null value | +| | Is betweenperiod from N (min to max value). | [Image Removed] **1.** This condition checks whether the comparison date (based on selected date format ) is in the time period required from "Compare with date" , where the period can be in days, months ,quarter or years ,as selected in the fourth drop-down field. **2.** The periods can be in future (aways) or in the past (ago) from “Compare with date”. **3.** Date format to use (DTU): The system will convert comparison value and “Compare with date” into selected date format before compare. * If DTU is Day of month (DOM) : Use day only for both source value and “compare with date” * If DTU is Month only (MO): Use Month only for both source value and “compare with date” * If DTU is quarter (QO) then use quarter (including year) for both source value and “compare with date”. e.g: sysdate is 20/05/2024 then use 01/04/2024 to process. * If DTU is Day and Month (DAM) Use day and month for both source value and “compare with date” e.g: Sysdate is 20/01/2024 then use “20/01” to process. * If DTU is Month and Year (MY) Use month and year for both source value and “compare with date”. e.g: Sysdate is 20/01/2024 then use “01/01/2024” to process. * If DTU is Date (DDMMYY) then use full value of source value (depend on selected criteria) and “compare with date. e.g AOD is 20/01/2024 then use “20/01/2024” to process Some examples to use this critera ***Example 1*** *: Post date is on 1 months ago from batch date* [Image Removed] ***Example 2****: Transacting Account Tenure Is Between 1 and 3 years* ago ( from transaction date) [Image Removed] ***Example 3: Next AOD Anniversary is on 10 days away. (From base date)*** [Image Removed] | * + - * 1. WWhen this condition is selected then Min/Max filter field , “Compare with date” drop-down,”Date format “ drop-down and “Period” drop-down are actived and required. Min/Max filter fields are two numeric input fields specify the number of periods. Max/Min value should be integer value. Max value should be equal to or greater than Min value. At least Min or Max value should be provided. 1. The first drop-down is “Compare with date”. This value is used to locate the date will be used to compare with the comparison date before check with period. **Following are compare with date list are avaliable for this condition:** + Base date (Depend on Effected base on in Rule configuration). + Sysdate + Transaction date + Post Date 1. The second drop-down is used to select the date format to use (DTU). The system will convert “Compare with date” value and comparasion date into selected date format before compare. Date format can be : + Day of month + Month only + Year only + Quarter only + Day and Month + Month and Year + Date 1. The next filed is Period drop-down. **Following are period list are avaliable for this condition:** + Days ago + Months ago + Quarters ago + Years ago + Days away + Months away + Quarters away + Years away 1. “Period unit” is applicable for each selection “Date format to use” fied as following link: | +| | Is the day of week | This condition checks whether the comparison date falls on selected day of the week. [Image Removed] | When this condition is selected then second field is a drop-down that allow multipe from the list day of the week. | +| | Time | Is between | Two time picker fields specify the time range of the comparison value must be within in selected time. If Min filter date is not provided then this condition checks whether the comparison value is less than or equal to Max filter value. If Max filer date is not provided then this condition checks whether the comparison value is greater than or equal to Min filter value. [Image Removed] | Time picker should be allow to choose from 00:00 upto 23:59. At least Min and Max value should be provided. Max value should be greater than or equal to Min value. | +| | Boolean | Is | This condition checks whether the comparison value is equal selected filter value [Image Removed] | When this condition is selected then second field is a drop-down include TRUE/FALSE value. | + +### Post-Conditions + +* 1. User able to proceed next step to complete campagin rule setup. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Campaign Rule Formula + +### Requirement Definition + +1. All most campaign rule formulas are utilized to configure the reward formula that end-users will receive after completing a transaction. +2. Sometimes we was using campaing formula to update the counter value or attribute value as well. +3. In this version, we support Formula 7 as query builder form and introduce drag/drop UI for constructing rules. + +### Process Flow + +### Trigger + +### Pre-Conditions + +### Wireframe + +### Business Rules + +See more detail in attached file + +[Image Removed] + +[Image Removed] + +### Post-Conditions + +### Exception Flow + +## Campaign Rule – Contributor Settings + +### Requirement Definition + +1. In case Campaign Rule does not use the Rate Table, and the earning under the rule is to have funding contributors other than the Merchant of transaction (the retailer) then user use this step to bring up the list of Contributors configured for the Rule. +2. If the payment transaction triggers a reward (campaign rule), and if the merchant is contributing to the funding of the reward, then the merchant is also a “contributor” for that award transaction. + +### Process Flow + +[Image Removed] + +### Trigger + +* 1. Campaign require a list of Contributors configured for the Rule. + +### Pre-Conditions + +1. User have to have the access right in the Campaing Rule moudle to can add/update contributor of the rule. +2. The merchant as a “contributor” of the award transaction should availble on OLS system. + +### Wireframe + +* + 1. Contributor setting + +[Image Removed] + +[Image Removed] + +### Business Rules + +* + - 1. Contributor setting is the last step of campaign rule setting if Campaign Rule require a list of contributor for the rule. + +1. If Contributor required has not been defined, click on next step to bring up the Contributor setting is illustrated in section [Wireframe](#_Wireframe_1). +2. Click on Add button ([Image Removed]) in the screen to bring up the create form; click on Edit button in the screen to bring ip the edit from as illustrated in section [Wireframe](#_Wireframe_1). +3. Screen descriptions + +| | | | | +| --- | --- | --- | --- | +| **Seq** | **Field (EN/VN)** | **Description** | **Type** | +| | Contributor Detail / Chi tiết phân bổ chi phí | This is the Contributor setting panel header. | Display | +| | Add a Contributor/ Thêm mới | This is the edit row for defining a Contributor’s percentage | Button | +| | Contributor\*/ Đơn vị phân bổ | Selecting the Contributor | Drop-down Select one Look up value from Chain screen (Chain table). Refer “Chain” API under Merchant Management. | +| | Contributor Percentage\*/ Phần trăm phân bổ | Entering the Contribution Percentage | 9(5, 2) Should be greater than 0 if provided | +| | Absorb Remainder \*/ Hấp thụ số dư còn lại | Selecting whether this Contributor is to absorb any remainder (TRUE or FALSE) after allocating the amounts by percentage to other Contributors. | Swich button Default OFF | +| | [Image Removed] | Clicking Click on the “[Image Removed]” icon removes the Contributor row | Button | + +1. The total contribution must be 100%. +2. Contributor must be uinique on each campaign rule. +3. If contributors are configured then must have one and only one contributor is “absord remider”. +4. If there is no contributor configured for the Rule then the Chain of the incoming transaction is also a “contributor” for that award transaction. ( Default as Absorb Remainder) + +### Post-Conditions + +* TP posted transaction based on contributor setting. The transaction is split into each Contributor for that transaction. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Counter Extract & Process (CEP) Request + +### Requirement Definition + +* + - 1. Some campaigns require the spend or count (number of transactions) to be accumulated over a period of time and then the total at the end of the period is used to compute the reward entitlement. Such a campaign requires a rule to accumulate spend in a counter, and at the end of each month a rule to use the total spend for the month in the counter to calculate the reward.Such a campaign would involve setting up an accumulation rule (Rule Type = Counter Update), a Rule to extract the Counter based which to form the transaction to compute the award amount (Counter Extract and Process or CEP Rule), and the award/Redeem Rule for specifying the award computation formula. + +### Process Flow + +### Trigger + +### Pre-Conditions + +1. User have to have the access right in the Campaing Rule moudle to can add/update CEP Rule. +2. All drop-down value must avaiable in the system. + +### Wireframe + +Please refer figma to get more detail. + +### Business Rules + +* + - 1. CEP is one of rule type of Campaign Rule. CEP Rule can be created/updated under Campaign Moduel as a parr of campaign or Create from "Campaign Rule" screen under "Campaign Management" module. + 2. Click on Add button ([Image Removed]) in the screen to bring up the create form. User must to choose"Counter Extract and Process" Rule type to go to next step. If Rule type is not selected user must to select existing template to continue otherwise "Next" botton is disbale". Click on Edit button in the screen to brings up the edit from as illustrated in section Wireframe. When the Rule Type in the Rule Header is CEP, the following is displayed for specifying parameters based on which to extract the Counter values and to form transactions for triggering award Rules: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Step 1: Generation information.** This step setup the generation information of CEP rule and mandatory step. Don't. Next step is blocked if all required field in this step are not provided | | | | +| | Campaign ID\*/ Mã chiến dịch | The Id and Campaign Name of the campaign to which this Rule belongs | Display if rule under selected campaign. Drop-down list if create from separately screen. Lookup value from Campaign Table. Refer to "Campaign"API under Campaign Management | +| | Campaign Rule ID\*/Mã quy tắc chiến dịch | Rule identifier. Support system-generated. For reference only | X(10) | +| | Campaign Rule Name\*/Tên quy tắc chiến dịch | Name of this Rule, for easy user reference | X(50) | +| | Description/Mô tả | Long description of this Rule, for user reference | X(500) | +| | Rule Type\*/ Loại quy tắc | Counter Extract & Process [CEP] | Display. Refer "get-by-code-type" API under master data with code type is"rule-type" | +| | Effective Date From\*/ Ngày bắt đầu hiệu lực | Apply this rule only to transactions with Transaction Date/Post Date(depended on effect rule based on between the Start and End Dates (inclusive) – the “Effective Period” | Date The date format must adhere to the configured format | +| | Effective Date To\*/Ngày hiệu lực kết thúc | All “Effective Periods” defined by “Start Date” and “End Date” always start at 00:00:00 and end at 23:59:59 midnight of the respective dates. To date must equal or greater than from date | Date The date format must adhere to the configured format | +| **Step 2: Rule setting** | | | | +| | Log transaction under this store\*/ Ghi nhận giao dịch cho cửa hàng/đơn vị | This value will be defaulted to the "Merchant". All award and adjust transactions arising from this Rule will be logged with this Store as the merchant | Drop-down. Select one. Lookup data from "Store" table. Refer "Store" API under Merchant Management | +| | Counter to extract \*/ Kết xuất từ bộ đếm | The counter to extract, the value of which is to be used as the Transaction Amount in the Formula in this Rule | Drop-down. Select one. Lookup value from "Counter\_Definition" table. Refer "Counter Definition" API under Campaign Management | +| | Bucket to extract \*/Kết xuất từ kho | The choices are: - Current Bucket (default) – will extract the latest bucket of the Counter - Previous Bucket – will extract the bucket ending the previous period, where the period is as defined in the Run Schedule - Period before Last – will extract the bucket ending the period before the last period, where the period is as defined in the Run Schedule Bucket value extracted is used as transaction amount in award Formula | Drop-down.Select one. Lookup data from "Code\_Management" table where code type is "counter-bucket". Refer "get-by-code-type" API under master data | +| | Rule type to process\*/ Loại quy tắc chiến dịch sử dụng | The transaction formed with the parameters in this CEP request are posted with this to system locates the rule type to process | Drop-down. Select one. Lookup value from "Code\_Management" table where code type is "cep-trigger-rule-type". Refer "get-by-code-type" API under master data | +| | Transaction Code \*/Mã giao dịch | The transaction formed with the parameters in this CEP request are posted with this TC: system locates selected trigger Rules linked to this TC to process | Drop-down. Select one. Lookup value from "Transaction\_Code" table. Refer to "OLS Transaction Code" API under Campaign Management | +| | -ve Bal. Adjust. Transaction Code/Mã giao dịch điều chỉnh âm | In the event the counter value extracted (Counter to Extract) is negative, it will be posted as a negative adjustment if this TC is provided, based on the Rule linked to this TC | Drop-down. Select one. Lookup value from "Transaction\_Code" table. Refer to "OLS Transaction Code" API under Campaign Management | +| | Adjustment Transaction Reason/ Lí lo điều chỉnh | Condition field. This field is actived and required when Adjust TC is selected | Drop-down Select one Lookup value from "Reason\_code" table. Refer "Reason Code"API under Code maintenance | +| | Adjustment Transaction Description/ Mô tả giao dịch điều chỉnh | The transaction description of negative adjustment transaction Condition field. This field is actived and required when Adjust TC is selected | X(50) | +| | Account with blocked Card / | The extracted Counters for generating transactions to process will include Counters of PA with Blocked Code or not, depending on the selection in this field. The default is to include. **Condition filed.** **This filed just be actived and required when Account entity counter OR Card entity counter is extracted.** | Radio button **Default Include** Refer “get-by-code-type” API under master data where code type is “cep-ac-block-card” | +| | Account with No Counter in Period | The extracted Counters for generating transactions to process will include a record for PA with no Counter Bucket and with Counter Bucket of balance 0, depending on the selection in this field. The default is to include. **Condition filed.** **This filed just be actived and required when Account entity counter OR Card entity counter is extracted.** | Radio button **Default Exclude** Refer “get-by-code-type” API under master data where code type is “cep-ac -no-counter”. | +| | Post Transactions under PA Account selected based on | **If Counter is a customer-centric Counter and there are multiple PA Types included in the counter bucket extraction**, the PA Type to use in the transaction posting can be selected based on the any of the following: * Account with most recent customer-initiated transaction * Account with highest spend in the past month + month-to-date * Account with lowest spend in the past month + month-to-date * Account based on ATG of Pool **Note: This is conditon filed. Just be actived and required if customer entity counter is extracted.** | Drop-down Select one Refer “get-by-code-type” API under master data where code type is “cep-ac-posted”. | +| | Execution Sequence Number /Thứ tự thi hành | The execution sequence to get the priority to run request. | 9(4) Should be greater than 0 if provided | +| | **Run schedule**: CEP Rules are evaluated for execution by a CEP Batch which is scheduled to run every day as part of the end-of-day batch stream. This parameter determines when this Rule will be executed by CEP Batch The tabs are: Day – Month – Annulaly – N days after AOD – Statement Cycle Lookup value from “Code\_Management” table where type code is ‘Cep-run-schedule’. Refer to ‘list-by-code-type’ API under Master Data Master | | | +| | Day | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n day where n from 1 to 50. This is select one field. - Time of day to excute request\*: This field is time format field. If CEP run as an offline job then it is not used in OLS. 1. Request will occur on every n day at the selected time. | **Repeat every**: Drop-down Select one Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “daily-repeat”. **Time of day to excute request**: Text box with HH:MM format. | +| | Month | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n month where n from 1 to 12. This is select one filed. Refer “get-by-code-type”API under master data where code type is “month-of-year”. - Day of month\*: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31 - Last day of month: This is checkbox field with default as uncheck. If this field is checked then in case the last day of month is less than the “Day of month” then request will be occurred on last day of month instead. - Time of day to excute request\*: The time to CEP batch job running to trigger this request. This field is time format field. If CEP run as an offline job then it is not used in OLS. 1. Request will occur on every n month on each selected day of the month and at the selected time. | **Repeat every**: Drop-down Select one Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “monthly-repeat”. **Day of month**: Drop –down Multiple select Hardcoding from 1- 31. **Time of day to excute request**: Text box with HH:MM format | +| | Annually | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n year where n from 1 to 5. This is select one filed. - Month of year\*: Drop-down to select month of year. The list includes 12 months of year from 1 to 12. . . - Day of month\*: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. - Time of day to excute request\*: The time to CEP batch job running to trigger this request. This field is time format field. If CEP run as an offline job then it is not used in OLS. 1. Request will occurred every n year on the selected day and selected month. | **Repeat every**: Drop-down Select one Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “yearly-repeat”. **Month of year** Drop –down Select one Hardcoding from 1- 12. **Day of month**: Drop –down Select one Hardcoding from 1- 31. **Time of day to excute request**: Text box with HH:MM format | +| | Statement Cycle | * + - 1. This option includes following fields: - Time of day to excute request\*: This field is time format field. If CEP run as an offline job then it is not used in OLS. 2. CEP Batch extracts specified Counter on days when there is a Statement output and extracts only accounts which were statemented on that day, evaluates the value against the award Rule and adds the award to Pool in award Rule. =tbd== | **Time of day to excute request**: Text box with HH:MM format | +| | N days after AOD | * + - 1. This option includes following fields: - N parameter: CEP Batch extracts Counter on N days after the **AOD** of the Account. 9(2) format for N parameter. - Time of day to excute request\*: The time to CEP batch job running to trigger this request. This field is time format field. If CEP run as an offline job then it is not used in OLS. 1. =TBD== | **Time of day to excute request**: Text box with HH:MM format | + +### Post-Conditions + +1. The following is a decision matrix for the possible combinations of “Counter Bucket to Extract” & “Run Schedule” for CEP batch job, where the following notation is used: + 1. “Current Bucket” is the Bucket with the earliest ED greater than the current processing date ==tbd== + 2. “Previous Bucket” is the Bucket with the latest ED smaller than the current processing date ==tbd== + 3. “Bucket Before Previous” is the Bucket with the latest ED smaller than the Previous Bucket ED==tbd== + +| | | | | +| --- | --- | --- | --- | +| | **Counter Bucket To Extract** | | | +| **Run Schedule Choice** | **Current** | **Previous** | **Period Before Last** | +| * Daily | Extract Current Bucket where State = C or is NULL. | Extract Previous Bucket where State = C or is NULL | Extract Bucket Before Previous, where State = C or is NULL | +| * Monthly on Day N of Month | +| * Statement Cycle Date | +| * N Days after AOD | +| * Annually, on Day N of Month M | + +* 1. In all cases, if there is no batch run on the scheduled day, the batch is executed the next day on which there is an end-of-day batch run + 2. Counter state is update when CEP extract based on Counter definition setup : + + If counter state is update on aware then to avoid extracting the same Bucket again in the next run, the rules triggered by the CEP transaction must update the State of the extracted Bucket from “C” to “A” if CEP rule hit CP rule. + + If counter state is update on extract then to avoid extracting the same Bucket again in the next run, the rules triggered by the CEP transaction must update the State of the extracted Bucket from “C” to “E” if CEP trigger CP rule regardess hit campaign rule or not. + + If counter state is never updated then even CEP extract and hit CP rule then counter state still is C. + +### Exception Flow + +N/A + +## Redemption Extract & Process (REP) Rule + +### Requirement Definition + +1. Some campaigns require the reward amount is tracked in a dedicated Pool which is then redeemed and extracted as a cash rebate or partner points (e.g. frequent flyer miles) and output to be credited into a receiving account. +2. This is done using a Rule that is designed to “Redeem, Extract & Process” – i.e. and REP rule. +3. An REP Rule is added to the Campaign by selecting Rule Type as “REP” when adding the Rule in a Campaign set-up. + +### Process Flow + +### Trigger + +* + - 1. The campaigns require the system automation extract the pool balances. + +### Pre-Conditions + +1. User have to have the access right in the Campaing Rule moudle to can add/update REP Rule. +2. All drop-down value must available in the system. + +### Wireframe + +* + - 1. Please help to refer on the figma. + +### Business Rules + +* + - 1. REP is one of rule type of Campaign Rule. REP Rule can be created/updated under Campaign Moduel as a parr of campaign or Create from "Campaign Rule" screen under "Campaign Management" module. + 2. Click on Add button ([Image Removed]) in the screen to bring up the create form. User must to choose"Redeem Extract and Process" Rule type to go to next step. If Rule type is not selected user must to select existing template to continue otherwise "Next" botton is disbale". Click on Edit button in the screen to bring up the edit from as illustrated in section Wireframe. When the Rule Type in the Rule Header is REP, the following is displayed for specifying parameters based on which to extract the balane value: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | **Description** | **Data type** | +| **Step 1: Generation information.** This step setup the generation information of REP rule and mandatory step. Don't. Next step is blocked if all required field in this step are not provided | | | | +| | Campaign ID\*/ Mã chiến dịch | The Id and Campaign Name of the campaign to which this Rule belongs | Display if rule under selected campaign. Drop-down list if create from separately screen. Lookup value from Campaign Table. Refer to "Campaign"API under Campaign Management | +| | Campaign Rule ID\*/Mã quy tắc chiến dịch | Rule identifier. Support system-generated. For reference only | X(10) | +| | Campaign Rule Name\*/Tên quy tắc chiến dịch | Name of this Rule, for easy user reference | X(50) | +| | Description/Mô tả | Long description of this Rule, for user reference | X(500) | +| | Rule Type\*/ Loại quy tắc | Counter Extract & Process [CEP] | Display. Refer "get-by-code-type" API under master data with code type is"rule-type" | +| | Effective From Date \*/ Ngày bắt đầu hiệu lực | Apply this rule only to transactions with Transaction Date/Post Date(depended on effect rule based on between the Start and End Dates (inclusive) – the “Effective Period” | Date The date format must adhere to the configured format | +| | Effective To Date\*/Ngày hiệu lực kết thúc | All “Effective Periods” defined by “Start Date” and “End Date” always start at 00:00:00 and end at 23:59:59 midnight of the respective dates. To date must equal or greater than from date | Date The date format must adhere to the configured format | +| **Step 2: Rule setting** | | | | +| | Pool to Extract\*/Pool kết xuất | Pool to redeem for output as cash rebate or points posting to Destination Account. * The full amount of the Pool balance is deducted from the Pool and output to the destination account or system. For campaigns where the reward is extracted and output to destination account on a scheduled basis, a separate Pool should be defined for each Campaign. | Drop-down Select one Lookup value from”Pool\_Definition” table. Refer “Pool Definition”API under Campaign Management | +| | Minimum Pool Balance | This is an optional field which defines the minimum number of points that a Pool must have before it is to be redeemed by the REP Batch. | 9(12,2) Should be greater than 0 if provided | +| | Trigger Campaign rule | This option to allow REP rule trigger Campaign Rule to check criterion and computer the balance to extract If trigger CP rule option then REP will trigger redeem rule type for criterion validation and the balance to extract is smallest value of available balance and formula result. | Switch button Default OFF | +| | Redeem TC\* | Select TC under which to post this redemption. | Drop-down Select one Lookup value from “Transaction\_Code”table Refer “OLS Transaction Code” API under Campaign Management | +| | Redeem Transaction Description\* | The text to be used in the redemption transaction record Description field. | X(50) | +| | Log Transactions Under This Store\* | The redemption transaction generated by this Rule must be logged with a Store id, based on this selection | Drop-down Select one Lookup value from “Store” API | +| | -ve Bal. Adjust. Transaction Code/Mã giao dịch điều chỉnh âm | In the event the balance value extracted (pool balance to extract) is negative, it will be posted as a negative adjustment if this TC is provided, based on the Rule linked to this TC | Drop-down. Select one. Lookup value from "Transaction\_Code" table. Refer to "OLS Transaction Code" API under Campaign Management | +| | Adjustment Transaction Reason/ Lí lo điều chỉnh | Condition field. This field is actived and required when Adjust TC is selected | Drop-down Select one Lookup value from "Reason\_code" table. Refer "Reason Code"API under Code maintenance | +| | Adjustment Transaction Description/ Mô tả giao dịch điều chỉnh | The transaction description of negative adjustment transaction Condition field. This field is actived and required when Adjust TC is selected | X(50) | +| | Output Redemption As/ | This drop-down contains the list of output types pre-configured in the REP batch properties file. The drop-down text describes the output to be generated from the redemption data. The currently supported outputs are: | | | | --- | --- | | **Output Type** | **File ID** | | * Cash Rebate to Exteranl System | OLSCRTXN | | Drop-down Select one Lookup value from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “output-red-channel”. =tbd== | +| | **Run schedule**: REP Rules are evaluated for execution by a REP Batch which is scheduled to run every day as part of the end-of-day batch stream. This parameter determines when this Rule will be executed by REP Batch The tabs are: Day – Month – Annulaly – N days after AOD – Statement Cycle – N months of AOD Lookup value from “Code\_Management” table where type code is ‘rep-run-schedule’. Refer to ‘list-by-code-type’ API under Master Data Master | | | +| | Day | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n day where n from 1 to 50. This is select one field. - Time of day to excute request\*: There are 2 drop-down to select hour from 0 upto 23 and minutues from 00 upto 59. The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. 1. Request will occur on every n day at the selected time. | **Repeat every**: Drop-down Select one Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “daily-repeat”. **Time of day to excute request**: | +| | Month | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n month where n from 1 to 12. - Day of month\*: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31. - Last day of month: This is checkbox field with default as uncheck. If this field is checked then in case the last day of month is less than the “Day of month” then request will be occurred on last day of month instead. - Time of day to excute request\*: The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. 1. Request will occur on every n month on each selected day of the month and at the selected time. | **Repeat every**: Drop-down Select one Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “monthly-repeat”. **Day of month**: Drop –down Multiple select Hardcoding from 1- 31. **Time of day to excute request**: Text box with HH:MM format | +| | Annually/Hàng năm | [Image Removed] * + - 1. This option includes following fields: - Repeat every\*: The drop-down list to select the frequency on every n year where n from 1 to 5. This is select one filed. - Month of year\*: Drop-down to select month of year. The list includes 12 months of year from 1 to 12. - Day of month\*: The drop-down list to select day of month the request will be occurred. The list includes 31 day from 1 to 31 - Time of day to excute request\*: The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. 1. Request will occurred every n year on the selected day and selected month. | **Repeat every**: Get data from “Code\_Management” table. Refer “get-by-code-type” API under master data with code type is “yearly-repeat”. **Month of year** Drop –down Select one Hardcoding from 1- 12. **Day of month**: Drop –down Select one Hardcoding from 1- 31. **Time of day to excute request**: Text box with HH:MM format | +| | Statement Cycle /Kì sao kê | * + - 1. This option includes following fields: - Time of day to excute request\*: The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. 2. REP Batch extracts specified Counter on days when there is a Statement output and extracts only accounts which were statemented on that day, evaluates the value against the award Rule and adds the award to Pool in award Rule. =tbd== | **Time of day to excute request**: Text box with HH:MM format | +| | N day after AOD/N ngày sau khi mở tài khoản | * + - 1. This option includes following fields: - N parameter: REP Batch extracts Counter during the end-of-day batch for all PA N days after the **AOD** of the PA. 9(2) format for N parameter. - Time of day to excute request: There are 2 drop-down to select hour from 0 upto 23 and minutues from 00 upto 59. The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. 1. =TBD== | **Time of day to excute request**: Text box with HH:MM format | +| | N months from AOD/N tháng từ ngày mở tài khoản | This option includes following fields: * + - N parameter\*: REP Batch extracts balance during the end-of-day batch for all Account after N months from the **AOD** of the Account. - Time of day to excute request\*: There are 2 drop-down to select hour from 0 upto 23 and minutues from 00 upto 59. The time to REP batch job running to trigger this request. This field is time format field. If REP run as an offline job then it is not used in OLS. | **N param** 9(2): Should be greater than or equal to 0 if provided **Time of day to excute request**: Text box with HH:MM format | + +### Post-Conditions + +REP batch job extract balance based on REP rule type configure. + +=tbd== + +### Exception Flow + +## Item Redemtion Rule Type (ITRD) + +### Requirement Definition + +Item redemption Rule Type is used to to evaluate item redemption transactions. + +The same approach as Award rule to evaluate the inputted data but there is no reward pool, formula and contributor on this rule type. + +Redemption pool which be used to redeem wil be configured in item price instead. + +### Process Flow + +Update later + +### Trigger + +If you want to perform an item redemption transaction in the OLS, then an Item Redemption Rule must be created. + +### Pre-Conditions + +1. User have to have the access right in the Campaing Rule moudle to can add/modify Item Redemption Rule. +2. All drop-down value must available in the system. + +### Wireframe + +Please refer Award Rule Type. + +### Business Rules + +* + - 1. ITRD is one of rule type of Campaign Rule. ITRD Rule can be created/updated under Campaign module as a parr of campaign or Create from "Campaign Rule" screen under "Campaign Management" module. + 2. Click on Add button ([Image Removed]) in the screen to bring up the create form. User must to choose"Item Redemption" Rule type to go to next step. If Rule type is not selected user must to select existing template to continue otherwise "Next" botton is disbale". + 3. Click on Edit button in the screen to bring up the edit from as illustrated in section Wireframe. When the Rule Type in the Rule Header is Item Redemption , the following is displayed for specifying parameters based on which to extract the balane value: + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field (EN/VN)** | **Description** | **Data type** | +| **Step 1: General information** | | | | +| | Campaign ID \*/ Mã chiến dịch | The Id and Campaign Name of the campaign to which this Rule belongs | Display if rule under campaign module. Drop-down if create fromseparately screen. Lookup value from Campaign Table. Refer to "Campaign"API under Campaign Management | +| | Campaign Rule ID\*/Mã quy tắc chiến dịch | Rule identifier. Support system-generated. For reference only | X(10) | +| | Campaign Rule Name\*/Tên quy tắc chiến dịch | Name of this Rule, for easy user reference | X(50) | +| | Description/ Mô tả | Long description of this Rule, for user reference | X(500) | +| | Rule Type\*/ Loại quy tắc | The rule type which user selected on step 0 | Display | +| | Effective Date From\*/ Ngày bắt đầu hiệu lực | Apply this rule only to transactions with Transaction Date/Post Date (depended on effect rule based on between the Start and End Dates (inclusive) – the “Effective Period”. | Date | +| | Effective Date To\*/Ngày hiệu lực kết thúc | All “Effective Periods” defined by “Start Date” and “End Date” always start at 00:00:00 and end at 23:59:59 midnight of the respective dates. To date must equal or greater than from date | Date | +| **Step 2: Rule setting :** If madatory fields in step 1 are not provided then step 2 is blocked **Rule Detail** | | | | +| | Effective Period is Based On\*/ Hiệu lực dựa trên | Determining whether the transaction being processed is within the Rule Effective Period is by using either the Transaction Date in the transaction data, or the system batch date (which is used as the Post Date for transaction processed during the day) | Radio button. Default "Transaction Date". Lookup value from "Code\_Management" table. Refer to "get-by-code-type" API under master data with code type is "date-to-use-txn" | +| | Message Template ID/Mẫu tin nhắn | Message template containing the message text for sending an SMS or Email if this Rule is hit (depending on the template type) or to return the text from the message template in the response message to and online request. The message templates support a range of placeholders including all data elements in the transaction context, Customer and Account records | Drop-down. Select one API: =tbd= | +| | Stop if criteria met/Dừng tặng thưởng khi thỏa mãn điều kiện | If this is selected to Yes, the current transaction will not be processed against other Rules linked to the TC of the current transaction if the criteria in this Rule are met. | Switch botton. Defaut OFF | +| | **Link Transaction Code** * + 1. At least one transaction code must be provided 2. On the same campaign rule ID then transaction code must be unique 3. One the same combination of Rule Type and Transaction Code then Execution Sequence must be unique. In this part the system support “Quick add” feature for Transaction Code to allow a more efficient way to set up rules | | | +| | Add linked transaction code/Thêm mới mã giao dịch liên kết | Click on “Add” button to add linked TC to the rule. Multiple TCs can be linked to the Rule. TCs can be removed from the panel by clicking on the delete button. | Button | +| | Transaction Code\*/Mã giao dịch | This field is for selecting the Transaction Code to trigger this Rule. When a TC is selected, all Rules linked to the TC, if any, will be listed in the panel “View Other Rules linked selected TC”, together with the current Rule, in the Execution Sequence number order. Take note that TC must be unique on each Campaign Rule | Drop-down. Select one. Lookup value from "Transaction\_Code" table. Refer "OLS Transaction Code" API under Campaign Management | +| | Execution Sequence\*/Trình tự thi hành | Execution Sequence of the Campaign Rule. | 9(04) Should be greater than 0 if provided | +| | View Other Rules linked Selected TC | Click on this option to view all Active Campaign Rule in the system which under the same Rule type linked to the transaction code. | | | | | --- | --- | --- | | **Field (EN/VN)** | **Description** | **Data type** | | Listing page order by Execution Sequence descring. Support paging also | | | | Rule ID/ Mã quy tắc | Campaign Rule ID linked to | Display Refer “Find Campaign Rule Linked By TxnCode” API under Campaign Rule API | | Rule Name/ Tên quy tắc | Name of Campaign Rule | Display Refer “Campaign Rule “API to get rule name. | | Execution Sequence | Excusion sequence of campaign rule | Dislay as format number | | Hyperlink | +| | Add new transaction code/ Thêm mới mã giao dịch | Quick add feature to support user add Transaciton Code from this screen. The new transaction will be automatiom approved when campaign rule is approved | Button | +| **Step 3: Rule Criteria :** The same approach as Award rule Refer to section 4.13 [Campaign Rule Criteria](#_Campaign_Rule_Criteria_1) | | | | + +### Post-Conditions + +To post item redemption transaction, the item redemption transaction have to pass validation of Item Redemption Rule which linked to the Redemption Transaction code, otherwise the transaction is failed. + +### Exception Flow + +* + 1. Input data are not passed all validations and then user choose cancel the action then use case ends in failure. + +## Transaction Rule Analysis (HAVE TO BE ADDED) + +### Requirement Definition + +### Process Flow + +### Trigger + +### Pre-Conditions + +### Wireframe + +### Business Rules + +### Post-Conditions + +### Exception Flow + +## Campaign Insight + +### Requirement Definition + +* + - 1. Campaign Insight enables to combine data from across multiple data source into single chart in order to track and display customer/campaign activities clearly. + +### Process Flow + +### Trigger + +N/A + +### Pre-Conditions + +1. Users have to have the access right on Campaign Insight module to asssess to these dashboards. + +### Wireframe + +[Image Removed] + +[Image Removed] + +### Business Rules + +1. Clicking on the chart icon at the top of the main Campaign list page will toggle between the Campaign list view and the Campaign Insight view. +2. Campaign Insight update constantly, giving user a real-time view of customer behavior, campaign activities. +3. Click “Campaign Insight” in the menu on OLS ‘s main menu. In the top right-hand on each dashboard enter/select the filter key to generate chart/graph. +4. OLS support following chart: + +#### Top 10 Best customer of the campaign + +* + - * 1. This chart show the total point earn of each customer (on top 10 ) on each selected period of selected campaign. + 2. Dashboard description + +| | | | +| --- | --- | --- | +| **Index** | **Field** | **Description** | +| **Filter key** | | | +| | Campaign | This is a drop-down filter key. Optional and allow multiple select. Lookup active campagin from Campaign table. Refer to “Campaign API” under Campaign Management. Default empty. If Campaign is not provided then get top 10 customer of whole system. | +| | Period | This is drop-down filter key Optional and select one only OLS support following periods: * + 1. This week 2. This month 3. Last month 4. This quarter 5. This year Default as “This month” If period is not selected then get data of whole system. | +| **Layout:** [Image Removed] | | | +| | Customer information | Display top N customer including bellow information: * + 1. Top customer / 2. Customer full name and Registration date 3. CIF Number 4. Total earned point on selected period | +| | View all | Use scroll bar to view full list top 10 best customer. | +| **Data source** | | | +| | Get data from TRANSACTIONS table with transaction type = “Award” of selected campaign to determine the top 10 customer who got top 10 earned point on each period. Pool type should be point pool only…==TBD=== Use transaction date to determine period. | | + +#### Number of enrrolled customers not - eligible because of criteria + +This chart display total number of enrolled customers not -eligible campaing rule on each error code during each selected month. + +Dashboard descriptions + +| | | | | +| --- | --- | --- | --- | +| **Index** | **Field** | | **Descriptions** | +| **I: Layout 1** [Image Removed] | | | | +| **Filter key** | | | | +| | Campaign | | This is a drop-down filter key. Mandatory field and allow select one only. Lookup active campagin from Campaign table If Campaign is not provided then get data of whole system. | +| | Period | | Last 12 months | +| **Layout description** | | | | +| | Vertical axis | | Fixed 12 last months from currenlty month. Currently month on the top of chart. | +| | Horizontal axis | | Total number of enrolled customers not-eligible because of criteria. Use differernce colors to distinguish the difference erorr code on the same month. Should have the description for each error code. Hover over the bar graph to view a count of customers for the error code defined | +| **Data source** | | | | +| | Get data from OLS\_ORPHAN\_TXN\_NO\_HIT table for selected campaign to determine the customer enroll in each month but did not get award because of criteira. The customer should have all transactions which did not hit any award rule (The rule get award points) on this campaign. Use Transaction date time of OLS\_ORPHAN\_TXN\_NO\_HIT table to determine period. | | | +| **II : Layout 2** [Image Removed] | | | | +| **Filter** | | | | +| | Campaign | This is a drop-down filter key. Mandatory field and allow select one only. Lookup active campagin from Campaign table If Campaign is not provided then get data of whole system. | | +| | Period | This is drop-down filter key Madatory and select one only OLS support following periods: * + 1. This month 2. Last month 3. Last 3 months (including curently month) Default as “This month” | | +| **Layout description** | | | | +| | Vertical axis | Total number of enrolled customers not-eligible because of criteria. Each error is separaty column in the chart. Use differernce colors to distinguish the difference months on the same error in case “Last 3 months” is selected”. Hover over the bar graph to view a count of customers for the error code defined | | +| | Horizontal axis | Error code Should have the description for each error code when move mouse on the chart. | | +| **Data source** | | | | +| | Get data from OLS\_ORPHAN\_TXN\_NO\_HIT table for selected campaign to determine the customer enroll in each month but did not get award because of criteira. The customer should have all transactions which did not hit any award rule (The rule get award points) on this campaign. Use last\_update\_date of OLS\_ORPHAN\_TXN\_NO\_HIT table to determine period. | | | + +#### Number of enrolled customers eligibe vs not- eligible because of criteria + +This chart display total number of enrolled customers: not -eligible campaing rule vs eligible campaign rule during each selected month. + +1. Dashboard descriptions + +| | | | +| --- | --- | --- | +| **Index** | **Field** | **Descriptions** | +| **Filter** | | | +| | Campaign | This is a drop-down filter key. Optional field and allow multiple select Lookup active campagin from Campaign table If Campaign is not selected then get all campaigns. | +| | Period | Last 12 months | +| **Layout:** [Image Removed] | | | +| | Vertical axis | Total customer. We have 2 areas, one for enrolled customer eligible and other one for erolled customer not -eligible. Hover over the line graph to view a count of customers for the date range/time frame defined | +| | Horizontal axis | Fixed last 12 months from curenlty month. Curently month on the right side. | +| **Data source** | | | +| | Get data from TRANSACTIONs table to get total number of enrolled customers eligible of selected campaign per each months. Get data from OLS\_ORPHAN\_TXN\_NO\_HIT table to get the total number of enrolled customers NOT-eligible of selected CP per each month. Should there is no customer in intersection of eligible and Not- eligible | | + +#### Earned points Vs redemmed points + +* + 1. This chart used to compare total earned point with total redeemed point during each selected period. + 2. Dashboard description + +| | | | +| --- | --- | --- | +| **Index** | **Field** | **Description** | +| **Filter** | | | +| | Period | This is drop-down filter key Madatory and select one only OLS support following periods: * + 1. This month 2. Last month 3. Last 3 months (including curently month) 4. Last 12 months Default as “This month” | +| **Layout** [Image Removed] [Image Removed] | | | +| | Vertical axis | Total point each selected period. Green line for earned point and red line for redemmed points. | +| | Horizontal axis | Condition data. If Period “Last 12 months” is selected then horizontal axis is including last 12 months from currently month. Total point will be monthly total point If Period “This month” or “Last Month” is selected then horizontal axis is including all day of the month. Total point will be daily total point. If Period “ Last 3 months” is selected then horizontal axis is including last 3 month from currenlty month. Total points will be monthly total points. Hover over the line graph to view a count of redemmed points/earned points for the date range/time frame defined | +| **Data source** | | | +| | Get data from TRANSACTIONS table with transaction type = “Award” for earned point /Transaction type = “Redeem” for redemmed point during each selected month. The transaction should be not cancellation. Use transaction date to determine period. | | + +#### Redemptions point on each channel + +* + - * 1. This chart allow user can see that awared points used for wich purpose: Which channel user customer use to redeem point month. The fluctuation of redeemed point with previous month to user can change the campaign stratery to meet customer’s behaviors. + 2. Dashboard descriptions + +| | | | +| --- | --- | --- | +| **Index** | **Field** | **Description** | +| **Filter** | | | +| | Period | This is drop-down filter key Madatory and select one only OLS support following periods: * + 1. This month 2. Last month Default as “This month” | +| **Layout** [Image Removed] | | | +| | Icon [Image Removed] | Icon for each channel: Item redemption Automation redemption Pay with Points. | +| | Total redemmed points and rate [Image Removed] | #1: Total redemmed points on each channel and Percentage on total redemmed points of all 3 channels. #2: Percentage increase /descrese of redemmed poins which is compared with previous month on each chanel. Red color if #1 less than previous month Ograne color if no change on the ratio between 2 months. Green color if greater than previous month. Take note that “This month” will compare with last month and “Last month’ will compare with before last month. | +| **Data source** | | | +| | Get data from CAT\_CATALOGUE\_TRANS\_DETAILS table for item redemption. Get data from TRANSACTIONS table which posted by REP for Automation redemption. Get data from TRANSACTIONS table which assigned as PwP transactions for Pay with Points . Use transaciton date to determine period. | | + +#### Redemption on each item type + +* + - * 1. This chart allow user can see that awared points used for wich purpose. How many item to be redemmed and the best item which customer prefer to redeem each period: Currently month OR last month. Therefore user can base on this to understand customer’s behaviors and customer’s habit. + 2. Dashboard descriptions + +| | | | +| --- | --- | --- | +| **Index** | **Filed** | **Description** | +| **Filter** | | | +| | Period | This is drop-down filter key Madatory and select one only OLS support following periods: * + 1. This month 2. Last month Default as “This month” | +| **Layout** [Image Removed] | | | +| | Left vertical axis | Total redemmed points Use Bar chart to describe redemmed points per each item type. | +| | Right vertical axis | Total redemption quantity. Use line chart to describe redemption quantity per each item type | +| | Horizontal axis | Item type list which is redemmed on this period. Hover over the line graph to view a count of Redemmed quantity for the each item type. Hover over the bar graph to view a count of redeemed points for the each item type. | +| **Data source** | | | +| | Get data from CAT\_CATALOGUE\_TRANS\_DETAILS table to get total redemmed point and total quanity per each item type. Use transaction date time do determine period. Period based on sysmonth | | + +#### Customer’s activities + +* + - * 1. This dashboard describes the fluctuation of total number of new customer vs churn customer on each month. Based on this chart user can see have/should have implemented a solutution to reduce the churn. + 2. **Dashboard descriptions** + +| | | | +| --- | --- | --- | +| **Index** | **Field** | **Description** | +| **Filter** | | | +| | Month | Last 12 months | +| **Layout** [Image Removed] | | | +| | Left vertical axis | Total number of customers. Per each month we have 2 cloumns : Green column for new customer and Orange column for churn customer. | +| | Right vertical axis | The line chart will describe the customer churn rate. The units of measurement is percentage. | +| | Horizontal axis | Fixed 12 last months from currenlty month. Curently month on the right side. | +| **Data source** | | | +| | New customer = New customer added in OLS system Churn customer = The customer unactive in OLS system Customer churn rate = Number of customer churn /Total customer (including new and churn customer) Use Last\_update\_date in OLS system to determine period. | | + +#### Campagin statistic + +* 1. Use this dashboard to measure the impact of existing campaigns. The information available on the Campaign Statistics screen helps users analyze where you can make campaign changes to improve results. + 2. Dashboard descriptions + +| | | | +| --- | --- | --- | +| **Index** | **Filed** | **Description** | +| **Filter: Just use for detail listing only** | | | +| | Campaign | This is a drop-down filter key. Optional and allow multiple select. Lookup active campagin from Campaign table Default empty. If Campaign is not provided then get data of whole system. | +| | Period | This is drop-down filter key Mandatory and select one only OLS support following periods: * + 1. This month 2. Last month 3. This quarter 4. This year 5. Select custom data Default as “This month” | +| **Layout** [Image Removed] | | | +| | Campagin statistic [Image Removed] | This part display some following indicators: * + 1. Total Campaigns: Total availble campaign in the system 2. Total customer: Total number of enrroled customer. 3. Total new customers on this day. 4. Total spending: Total nett amount for all purchase transactions on these campaigns. 5. Total cash rebate: Total cash rebate which customer got when errolled these campaigns. 6. Total awarded point: Total uni point which customer got when errolled these campaigns. These above value are updated realtime base one sysdatetime. | +| | Detail listing [Image Removed] | * This part includes following fields: + 1. Campaign ID: From selected Campaign 2. Target total spending value: From Campaign’s configuration 3. Actual total spending: Total nett transaction amount 4. Target Active Customer Count: From Campaign ‘s configuration 5. Actual Customer Count: Total number of enrolled customers. 6. New customer: Total number of new enrolled customer on this day. 7. Total rewarded points: Total earned points. * When click on each Campaign ID, the system will bring up to Campaign detail Screen. * Implement scroll bar and paging for campaign listing. | +| **Data source** | | | +| | Get data from TRANSACTIONs table for number of customers/ total spending and awarded points Get data from CAMPAIGN table for target value. Use transaciton date to determine period. | | + +### Post-Conditions + +* + 1. User can use these charts to decide the campaign strategy to meet customer’s demand. + +### Exception Flow + +N/A + +## One tester (HAVE TO BE ADDED) + +### Requirement Definition + +### Process Flow + +### Trigger + +### Pre-Conditions + +### Wireframe + +### Business Rules + +### Post-Conditions + +### Exception Flow + diff --git a/docs/specs/customer_management/account.md b/docs/specs/customer_management/account.md new file mode 100644 index 0000000..224ae0c --- /dev/null +++ b/docs/specs/customer_management/account.md @@ -0,0 +1,46 @@ +--- +title: "Account" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Account + +## Requirement Definition +Manages customer account information, which is either sent from an external system to OLS or added by users manually via the OLS system. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Account" module. +- An account type must exist in OLS before an account of that type can be added. +- The user must select a customer to access the Account tab. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| CIF Number | CIF number of selected customer. | String | Required. Read-only on creation. | +| Product Account Level (PAL) | Product Account Level. | Enum (Lookup) | Required. | +| Product Account Type (PAT) | Product Account Type. | Enum (Lookup) | Required. PAL + PAT = Account Type. | +| Account Number | Product Account Number. | String (20) | Required. Combination of Account No + Account Type must be unique. | +| Account Open Date | Open date of the account. | Date | Required. | +| Account Indicator | Personal [P] or Corporate [C]. | Enum (Lookup) | Required. | +| Account Block Code | Used to block transactions. | String (10) | Optional. | +| Block Code Reason | Reason for blocking. | String (100) | Optional. | +| Block Code Last Update Date | Date block was applied. | Date | Optional. | +| Cycle | Statement cycle date. | Integer (2) | > 0 if provided. | +| Account Status | Status of the account. | Enum (Lookup) | Required. | + +### Execution +- Each account belongs to one Customer. The CIF number cannot be changed via this screen (requires CIF Merge batch). +- Records managed by OLSACCT batch cannot typically be changed from the admin screen. +- On Add: Rejected if Account No + Account Type already exists. Else, record added to PRODUCT_ACCOUNT and LOYALTY_ACCOUNT_PRODUCT created. +- On Update: Must exist in OLS. Original record moved to history. +- On Delete: Rejected if linked to an active Card record. Else, logical delete applied (moved to history). + +## Exception Flow +- Input validation failures stop the action. diff --git a/docs/specs/customer_management/adjustment.md b/docs/specs/customer_management/adjustment.md new file mode 100644 index 0000000..7302495 --- /dev/null +++ b/docs/specs/customer_management/adjustment.md @@ -0,0 +1,53 @@ +--- +title: "Adjustment" +type: OpenSpec +status: Draft +domain: 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. diff --git a/docs/specs/customer_management/attribute.md b/docs/specs/customer_management/attribute.md new file mode 100644 index 0000000..5094a35 --- /dev/null +++ b/docs/specs/customer_management/attribute.md @@ -0,0 +1,51 @@ +--- +title: "Attribute" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Attribute + +## Requirement Definition +Provides a consolidated view of all attributes assigned to a customer, account, or card, populated by batch processes or Campaign Rules. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Attribute" module. + +## Business Rules + +### Data Schema + +#### Attribute Value Detail +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Attribute Group | Group of attribute. | String | Read-only. | +| Attribute ID | Attribute ID. | String | Read-only. | +| Attribute Name | Attribute Name. | String | Read-only. | +| Entity | Client, Product_Account, or Card. | Enum | Read-only. | +| Entity ID | CIF Number, PA Number, or Card Number based on Entity. | String | Read-only. | +| Account Type | Required for Account attribute. | String | Read-only. | +| Attribute Value | Value of the attribute. | String/Number | Read-only. | +| Effective Date From | Start date. | Date | Read-only. | +| Effective Date To | End date. | Date | Read-only. | + +#### Linked Campaign Details +Lists Campaign Rules referencing this attribute. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Campaign ID. | String | Read-only. | +| Campaign Name | Name of Campaign. | String | Read-only. | +| Campaign Rule | Campaign Rules ID. | String | Read-only. | +| Campaign Rule Name | Name of Campaign Rule. | String | Read-only. | +| Effect Date | Effective from and to dates. | Date | Read-only. | + +### Execution +- **View-only screen.** +- Data from `ATTRIBUTE_VALUE` table. +- Filterable by Entity level and effective dates. Only effective records listed by default. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/award_transaction.md b/docs/specs/customer_management/award_transaction.md new file mode 100644 index 0000000..bf21169 --- /dev/null +++ b/docs/specs/customer_management/award_transaction.md @@ -0,0 +1,52 @@ +--- +title: "Award Transaction" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Award Transaction + +## Requirement Definition +Allows users to review, verify, and manually create Award Transactions to grant points/rewards to a customer's account. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in both the "Customer Profile" and "Award Transaction" modules. +- The user must select a customer on the customer profile listing page. +- Dependent on access rights, users can view, add, edit, or approve manual Award Transaction records. + +## Business Rules + +### Data Schema + +#### General Information +| 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. | +| Store | Store of transaction. | Enum (Lookup) | Required. | +| Transaction Date | Transaction date time. | Date | Required. | +| Reason Code | Reason for the award. | Enum (Lookup) | Required. | +| Transaction Code | OLS transaction code. | Enum (Lookup) | Required. | +| Remarks | Additional notes. | String (100) | Optional. | + +#### Award Details +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Pool Id | Pool to be awarded. | Enum (Lookup) | Required. Must respect entity level logic. | +| Award Quantity | Points to award. | Decimal | Required. Must be > 0. | +| Expiry Date | Expiry date of the awarded points bucket. | Date | Required. Defaults based on pool's expiry policy. | + +### Execution +- **Pending/Approve Flow**: New award transactions go to a Pending state. An authorized user must approve them. +- Manual awards act similarly to positive Adjustments but follow the Award business logic path (potentially triggering Campaign Rules if configured). +- Points are added to a new bucket with the specified Expiry Date. + +## Post-Conditions +- Pool balance buckets are updated. +- Transaction is logged in history. + +## Exception Flow +- Validation failures or insufficient permissions. diff --git a/docs/specs/customer_management/card.md b/docs/specs/customer_management/card.md new file mode 100644 index 0000000..854eb44 --- /dev/null +++ b/docs/specs/customer_management/card.md @@ -0,0 +1,47 @@ +--- +title: "Card" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Card + +## Requirement Definition +Manages customer card information. Generally updated in the external system and loaded into OLS, thus often view-only, though manual additions/replacements are supported with strict rules. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Card" module. +- The parent account must exist in OLS before adding a card. +- User must select a customer. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| CIF Number | CIF Number of the card. | String | Required. Defaults to selected customer but can change for Supplement Cards. | +| Account Type | Product Account Level + Type. | Enum (Lookup) | Required. | +| Account Number | Parent Product Account Number. | Enum (Lookup) | Required. | +| Card Number | The card number. | String (20) | Required. Must be globally unique. | +| Masked Card Number | Masked version. | String (20) | Optional. | +| Cardholder Name | Name on card. | String (50) | Required. | +| Card Indicator | Supplement [S], Principal [P], Corporate [K]. | Enum (Lookup) | Required. If Principal, Card CIF must equal Account CIF. | +| Card Status | Card status. | Enum (Lookup) | Required. | +| Card Block Code | Block code for transactions. | String (10) | Optional. | +| Card Activation Date | Date activated. | Date | Optional. | +| Card Creation Date | Date created. | Date | Required. | +| Card Expiry Date | Expiry date. | Date | Required. | +| Old Card Number | For replacements only. | Enum (Lookup) | Required only if adding a replacement card for an existing one. | + +### Execution +- Each Card belongs to one Account and one Customer. Changes to CIF/Account require CIF Merge batch. +- On Add: Rejected if Card Number already exists, or if Account/CIF does not exist. Adds to CARD and CARD_PRODUCT_ACCOUNT_REL. +- On Delete: Logical delete (moved to history). +- Replacement Flow: When replacing an old card, the new card gets the same PSN (Plastic Serial Number). The old card remains active until its status/block code is updated. All attributes, counters, and pool buckets linked to the old card are automatically linked to the new card. + +## Exception Flow +- Validation failures. diff --git a/docs/specs/customer_management/counter.md b/docs/specs/customer_management/counter.md new file mode 100644 index 0000000..f79cd3a --- /dev/null +++ b/docs/specs/customer_management/counter.md @@ -0,0 +1,51 @@ +--- +title: "Counter" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Counter + +## Requirement Definition +Displays all counter buckets for a chosen customer, including Customer-level, Account-level, and Card-level counters, which are updated by Campaign Rules or manually. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Counter" module. + +## Business Rules + +### Data Schema + +#### Counter Value Detail +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Counter | Counter identifier. | String | Read-only. | +| Entity | Cust [CU], Account [PA], Card [CA]. | Enum | Read-only. | +| Entity ID | CIF Number, Account Number, or Card Number. | String | Read-only. | +| What to count | The data entity tracked. | String | Read-only. | +| Counter Value | Counter value. | Decimal | Read-only. | +| Bucket Start Date | Start date. | Date | Read-only. | +| Bucket End Date | End date. | Date | Read-only. | +| Counter State | A: Awarded, C: New. | Enum | Read-only. | + +#### Counter Statistic (History) +Lists transactions that updated this counter bucket. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Reference No | OLS Transaction Reference Number. | String | Read-only. | +| Post Date | Post date of the transaction. | Date | Read-only. | +| Counter Value | Value updated on this transaction. | Decimal | Read-only. | +| Bucket Number | Bucket number of selected counter. | Integer | Read-only. | +| Update Date | System date when updated. | Date | Read-only. | +| Updated By | Batch/User who posted transaction. | String | Read-only. | + +### Execution +- **View-only screen.** +- Values retrieved from `Campaign_Counter` table. +- Filterable by Entity level and bucket periods. Effective records listed by default. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/customer_360.md b/docs/specs/customer_management/customer_360.md new file mode 100644 index 0000000..544c393 --- /dev/null +++ b/docs/specs/customer_management/customer_360.md @@ -0,0 +1,56 @@ +--- +title: "Customer 360" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Customer 360 + +## Requirement Definition +A centralized dashboard providing key information about a customer, giving a real-time view of customer behavior, balances, cards, and transaction statistics. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Customer Profile" module and select a customer to view the dashboard. + +## Business Rules + +### Dashboard Components + +#### 1. Customer Information +- Summarized view of the customer's profile (name, CIF, status, etc.). Allows edit/delete actions from a pop-up. + +#### 2. Customer's Rewards Statistic +- **Points**: Total available points. +- **Cash back**: Total available cash back. +- (Uses system date to determine balance bucket periods). + +#### 3. Account / Card Information +- Lists all of the customer's accounts and cards. +- If there are no cards, it shows just the accounts. +- Columns include: Account Type, Account No, Card No, CIF, Card Status, Indicator, Expiry, Account Block Code, Account Status, Open Date. + +#### 4. Transaction Statistic +- **Line Chart**: Shows fluctuation in balance (Earned/Redeemed/Adjusted) for a selected pool over a specified period (This month, Last month, Last 3/6 months). Data from TRANSACTION table. +- **Combo Chart**: Illustrates relationship between total number of transactions (line) and total transacted merchants (bar) over a specified period. + +#### 5. Customer Activities +- Logs loyalty program actions (enroll, earn, redeem, transfer), feedback/reviews, email engagement, and account management events. +- Filterable by timeframe. + +#### 6. Customer Segmentation +- Shows the demographic (Gender, Age, Marital Status, Income) and behavioral (Frequency, Membership class, Purchase channel, Hobby) segments the customer belongs to. + +#### 7. Most Redeemed Items +- Displays the top N (configurable, default 10) redeemed items of the customer. +- Shows Item Code, Name, Category, Quantity, Points used, Cash amount used. +- Data from CAT_CATALOGUE_TRANS_DETAIL ordered by quantity descending. + +#### 8. Balance Information +- Summary of all Pool balances for the customer. +- Shows Pool ID, Pool Name, Balance (sum of all buckets), Redeemable Balance (non-expired/available), Earliest Expiring Balance and Date. + +## Post-Conditions +- Strategy guide for personalized experiences. diff --git a/docs/specs/customer_management/customer_profile.md b/docs/specs/customer_management/customer_profile.md new file mode 100644 index 0000000..6dc4652 --- /dev/null +++ b/docs/specs/customer_management/customer_profile.md @@ -0,0 +1,62 @@ +--- +title: "Customer Profile" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Customer Profile + +## Requirement Definition +Provides view-only access to Customer details within the OLS administration screens. Customer records are primarily updated from source systems via batch processes. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Customer Profile" module. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| CIF Number | Unique CIF Number assigned to each customer. | String (30) | Required. | +| First Name | Customer First Name. | String (50) | Required. | +| Last Name | Customer Last Name. (First Name + Last Name = Customer Name) | String (50) | Required. | +| Date of Birth | Customer birth date. | Date | Required. | +| Registration Date | Date customer opened an account. | Date | Optional. | +| Gender | Customer Gender. | Enum (Lookup) | Optional. | +| Customer Status | Customer status. | Enum (Lookup) | Required. | +| Customer Block Code | Customer block code. | String (10) | Optional. | +| Marital Status | Customer marital status. | Enum (Lookup) | Optional. | +| ID Type | ID Type of cardholder ID. | Enum (Lookup) | Optional. | +| Cardholder ID | Cardholder ID. | String (30) | Required if ID Type is selected. | +| Country Origin | Customer country origin. | Enum (Lookup) | Optional. | +| Customer Income | Customer income. | Decimal (14,2) | >= 0 if provided. | +| Profile Picture | Uploaded image file. | Image / URL | Optional. | + +#### Contact Detail +Each customer can have more than one contact detail (e.g., customer contact, guardian contact). At least one must be provided. + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Address Type | Home/Business/Shipping/Billing. | Enum | Required. Unique per customer. | +| Phone Number | Phone number. | String (30) | Required. | +| Email Address | Email address. | String (50) | Required. Must be valid email format. | +| Address 1 | Main address. | String (100) | Optional. | +| Address 2 | Other address. | String (100) | Optional. | +| State | State code. | Enum (Lookup) | Optional. | +| City | City code. | Enum (Lookup) | Optional. | +| Zip Code | Postal code. | Enum (Lookup) | Optional. | + +### Execution +- When a new customer is added in OLS, it is added to Client tables, and the corresponding LOYALTY_ACCOUNT is created. +- A request to add a customer whose CIF already exists with an Active status is rejected. +- A request to update/delete a CIF that does not exist or is inactive is rejected. +- Deletion of a CIF linked to an active Account is rejected. Logical delete is used (moving to History). +- Admin screen changes are generally restricted for records managed by the OLSCUST batch. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/item_redemption.md b/docs/specs/customer_management/item_redemption.md new file mode 100644 index 0000000..6ffa560 --- /dev/null +++ b/docs/specs/customer_management/item_redemption.md @@ -0,0 +1,59 @@ +--- +title: "Item Redemption" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Item Redemption + +## Requirement Definition +Allows users (e.g., call center staff) to manually redeem items for customers in real-time, exchanging points (and optionally cash) for catalog items. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Item Redemption Entry" module. +- Real-time catalog configuration and customer balances must be available. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Posted Transaction By | Card, Account, or CIF. | Enum | Required. | +| Card / Account / CIF | Identifier. | String | Required. | +| Redemption Channel | Channel of redemption. | Enum (Lookup) | Required. | +| Redemption Date | Transaction date. | Date | Required. | +| Store | Active store in OLS. | Enum (Lookup) | Required. | +| Applicable Fee | Apply item fee if configured. | Boolean | Default False. | + +#### Item Details +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Catalogue Code | Catalog to redeem from. | Enum (Lookup) | Required. | +| Item | Item code. | Enum (Lookup) | Required. Item must have a matched price. | +| Redemption Mode | Fixed Points or Fixed Partial (Cash + Points).| Enum | Required based on price configuration. | +| Unit Price (Points) | Point cost per item. | Decimal | Required. Fixed for Fixed Points; editable but >= minimum for Fixed Partial. | +| Unit Cash Amount | Cash cost per item. | Decimal | Required for Fixed Partial. Calculated: (Full Price - Unit Price) * Price in Cash. | +| Unit Face Value | Face value of item. | Decimal | Read-only. Base face value or price config face value. | +| Quantity on Hand | Available inventory. | Integer | Read-only. Displayed if tracked by quantity. | +| Redemption Quantity | Amount to redeem. | Integer | Required. Must be > 0 and <= Quantity on Hand. | +| Total Price (Points) | Total points required. | Decimal | Read-only. Unit Price * Redemption Quantity. | +| Total Cash Amount | Total cash required. | Decimal | Read-only. Unit Cash Amount * Redemption Quantity. | +| Delivery Address | Delivery details for Physical/Evoucher. | String | Auto-populated from profile, editable. | + +### Execution +- Transactions cannot be modified after posting. +- Validates block codes and permissions. +- Net transaction value is sum of tax, total fee, and total cash required. +- At EOD, approved items are output to a file for partners to fulfill. + +## Post-Conditions +- Balances and inventory updated. +- Transaction viewable in history. + +## Exception Flow +- Insufficient balance or TP validation failure blocks transaction. diff --git a/docs/specs/customer_management/no_hit_cp_transaction.md b/docs/specs/customer_management/no_hit_cp_transaction.md new file mode 100644 index 0000000..d7e97a3 --- /dev/null +++ b/docs/specs/customer_management/no_hit_cp_transaction.md @@ -0,0 +1,51 @@ +--- +title: "No-Hit CP Transaction" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# No-Hit CP Transaction + +## Requirement Definition +Tracks all incoming transactions that trigger a campaign rule but are not eligible (do not meet criteria) OR transactions that have no linked campaign rule. Helps in troubleshooting why a customer did not receive an expected reward. + +## Process Flow + +### Pre-Conditions +- Incoming transactions trigger campaigns but do not hit the rule criteria. +- Users must have access rights in the "No hit CP- Transaction" module. + +## Business Rules + +### Data Schema + +#### Transaction Detail (Incoming request data) +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| CIF Number | CIF Number. | String | Read-only. | +| Product Account No | Product Account No. | String | Read-only. | +| Card Number | Card Number. | String | Read-only. | +| Invoice No | Generated unique incoming transaction ID. | String | Read-only. | +| Transaction Type | AWD / RED / ADJ. | Enum | Read-only. | +| OLS Transaction Code | Used to locate CP rule. | String | Read-only. | +| Transaction Amount | Gross amount or adjust point. | Decimal | Read-only. | +| Various | Store, Terminal, MCC, Currency, etc. | Various | Sourced from incoming transaction. | + +#### CP Rule Listing (Error Details) +Displays details for each Campaign Rule the transaction triggered but failed to hit. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Campaign ID. | String | Read-only. | +| Campaign Rule | Campaign Rule ID. | String | Read-only. | +| Pool ID | Reward pool. | String | Read-only. | +| Error Code | Error response code from OLS. | String | Read-only. | +| Error Descriptions | Detailed description of why criteria failed. | String | Read-only. | + +### Execution +- **View-only screen.** +- Data is sourced from `OLS_ORPHAN_TXN_NO_HIT`. +- The error description should specify exactly which criteria failed (e.g., MCC didn't match, Minimum amount not met). + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/pool_balance_detail.md b/docs/specs/customer_management/pool_balance_detail.md new file mode 100644 index 0000000..d030372 --- /dev/null +++ b/docs/specs/customer_management/pool_balance_detail.md @@ -0,0 +1,54 @@ +--- +title: "Pool Balance Detail" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Pool Balance Detail + +## Requirement Definition +Provides a summary and detailed breakdown of all reward pools and their balance buckets for a selected customer. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Balance Enquiry" module. + +## Business Rules + +### Data Schema + +#### Pool Balance Summary +Displays a row for each pool the customer interacts with. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Pool ID | Pool ID. | String | Read-only. | +| Pool Name | Pool Name. | String | Read-only. | +| Pool Type | Pool Type. | String | Read-only. | +| Pool Entity Level | Customer, Account, or Card level. | String | Read-only. | +| Balance | Sum of all balance buckets. | Decimal | Read-only. | +| Redeemable Balance | Sum of non-expired, available buckets. | Decimal | Read-only. | +| Next Expiring Balance | The earliest non-expired balance bucket amount. | Decimal | Read-only. | + +#### Pool Balance Detail (Bucket Breakdown) +Displays the individual expiry buckets for a selected pool. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Account Type | Account Type. | String | Read-only. | +| Account No | Account Number. | String | Read-only. | +| Card Number | Card Number (only if Card pool entity level). | String | Read-only. | +| Pool ID | Selected Pool ID. | String | Read-only. | +| Balance | Non-zero balance of the bucket. | Decimal | Read-only. | +| Expiry Date | Expiring date of the bucket. | Date | Read-only. | + +### Execution +- **View-only screen.** No modifications allowed directly. +- Grouping/Visibility is dependent on the Pool Entity Level: + - Customer level: Shows buckets grouped under accounts, even though earned at customer level. + - Account level: Shows buckets earned by the specific Account. + - Card level: Shows buckets earned by the specific Card. +- Expired buckets that have not yet forfeited are shown. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/re_instatement.md b/docs/specs/customer_management/re_instatement.md new file mode 100644 index 0000000..8cd8e75 --- /dev/null +++ b/docs/specs/customer_management/re_instatement.md @@ -0,0 +1,46 @@ +--- +title: "Re-Instatement" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Re-Instatement + +## Requirement Definition +Allows manual re-instatement of expired balance buckets that have not yet been forfeited. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Re-Instatement" module. +- The customer must have expired pool buckets that are within the grace period (not yet forfeited). +- Requires 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. | +| Store | Store of transaction. | Enum (Lookup) | Required. | +| Pool Id | Pool of the bucket to re-instate. | Enum (Lookup) | Required. Lists pools with non-forfeited expired balances. | +| Bucket to Re-instate | Specific expired bucket to reinstate. | Enum (Lookup) | Required. | +| Expiry Date | New expiry date of the reinstated points. | Date | Required. | +| Reason Code | Reason for re-instatement. | Enum (Lookup) | Required. | +| Remarks | Additional notes. | String (100) | Optional. | + +### Execution +- **Pending/Approve Flow**: New requests go to a pending list. Authorised user approves. +- Re-instatement is posted as an Adjustment. +- The expired bucket balance is set to 0. +- If a bucket with the new Expiry Date already exists, the amount is added to it. +- Otherwise, a new bucket is created with the new Expiry Date. + +## Post-Conditions +- Balances updated and logged as adjustments. + +## Exception Flow +- Rejected by TP validation or block code. diff --git a/docs/specs/customer_management/statement.md b/docs/specs/customer_management/statement.md new file mode 100644 index 0000000..5f418e4 --- /dev/null +++ b/docs/specs/customer_management/statement.md @@ -0,0 +1,52 @@ +--- +title: "Statement" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Statement + +## Requirement Definition +Provides a list of all transactions for an account/customer over a set period (usually monthly). Includes earned, redeemed, adjusted points, beginning/ending balances, and expired points. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Statement Enquiry" module. + +## Business Rules + +### Data Schema + +#### Statement Summary +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Loyalty Account Number | Identifier. | String | Read-only. | +| Product Account Number | Identifier. | String | Read-only. | +| Pool ID | Statement Pool. | String | Read-only. | +| Cycle Start Date | Previous statement cycle start. | Date | Read-only. | +| Statement Opening Balance | Previous points balance. | Decimal | Read-only. | +| Total Award | Earned points in cycle. | Decimal | Read-only. | +| Total Redeem | Redeemed points in cycle. | Decimal | Read-only. | +| Total Adjust | Adjusted points in cycle. | Decimal | Read-only. | +| Statement Closing Balance | Accumulated points at cycle end. | Decimal | Read-only. | +| Expired Points | Balance in expired but not forfeited buckets. | Decimal | Read-only. | +| Cycle Statement Date | Generation date. | Date | Read-only. | + +#### Transaction Detail +Lists transactions within the cycle. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Reference Number | OLS Reference Number. | String | Read-only. | +| Transaction Type | Award, Redeem, Adjust. | Enum | Read-only. | +| Unit | Earned/Redeemed/Adjusted points. | Decimal | Read-only. | +| Post Date | Post Date. | Date | Read-only. | +| Transaction Date | Transaction Date Time. | Date | Read-only. | + +### Execution +- **View-only screen.** Records are updated by OLS batch jobs. +- Output supports Customer and Account level, but stored under Account level. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/transaction_history.md b/docs/specs/customer_management/transaction_history.md new file mode 100644 index 0000000..620016f --- /dev/null +++ b/docs/specs/customer_management/transaction_history.md @@ -0,0 +1,72 @@ +--- +title: "Transaction History" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Transaction History + +## Requirement Definition +Provides a running record of all transactions logged in OLS for a customer, including cancellations, over a configurable period (normally the last 12 months). + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Transaction History" module. + +## Business Rules + +### Data Schema + +#### Transaction Detail +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Invoice No | Internal invoice No generated by OLS. | String | Read-only. | +| Reference No | OLS Transaction Reference Number. | String | Read-only. | +| Source Reference Number | Reference number from source system. | String | Read-only. | +| OLS Transaction Code | OLS Transaction Code. | String | Read-only. | +| Gross Amount | Gross transaction amount. | Decimal | Read-only. | +| Nett Amount | Nett transaction amount. | Decimal | Read-only. | +| Redeem Points | Total redeem points. | Decimal | Read-only. | +| Points Redeemed Amount | Total redeem points amount. | Decimal | Read-only. | +| Adjust Points | Total adjustment points. | Decimal | Read-only. | +| Points Adjustment Amount | Total adjust point amount. | Decimal | Read-only. | +| Award Points | Total award points. | Decimal | Read-only. | +| Points Awarded Amount | Total award point amount. | Decimal | Read-only. | +| Transaction Date | Transaction Date Time. | Date | Read-only. | +| Post Date | Post Date. | Date | Read-only. | +| Settlement Date | Settlement Date. | Date | Read-only. | +| Cancellation Indicator | Cancellation Indicator. | Boolean | Read-only. | +| MCC | Transaction MCC Code. | String | Read-only. | +| Store | Transaction Store ID. | String | Read-only. | +| Terminal | Transaction Terminal ID. | String | Read-only. | +| Transaction Description | Transaction Description. | String | Read-only. | + +#### Quick View Details (Right Panel) +Provides a breakdown of the transaction into its component effects. + +**Reward Details** (Award/Redeem/Adjust) +- Campaign Rule triggered. +- Transaction Type. +- OLS Transaction Code. +- Reward Pool. +- Pool Unit / Amount. + +**Counter Transaction Detail** +- Campaign Rule triggered. +- Counter updated. +- Entity level. +- Counter Value. +- Bucket Number, Start Date, End Date. + +**Item Redemption Detail** +- Item, Description. +- Redeemed Quantity, Redeemed Points, Cash Amount Used. + +### Execution +- **View-only screen.** +- Represents all successful transaction impacts on balances, counters, and redemptions. + +## Exception Flow +- N/A diff --git a/docs/specs/customer_management/transfer_balance.md b/docs/specs/customer_management/transfer_balance.md new file mode 100644 index 0000000..40a5c1a --- /dev/null +++ b/docs/specs/customer_management/transfer_balance.md @@ -0,0 +1,48 @@ +--- +title: "Transfer Balance" +type: OpenSpec +status: Draft +domain: Customer Management +--- + +# Transfer Balance + +## Requirement Definition +Allows manual transfer of points from a customer/account to another customer/account (External) or between the customer's own accounts (Internal). + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Transfer Balance" module. +- Requires Maker-Checker approval. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Transfer Mode | Internal (self) or External (to another). | Enum | Required. | +| Transfer Type | Entity type to transfer from (Card, Account, Client). | Enum | Required. | +| From | Card/Account/CIF Number to transfer from. | String | Required. | +| To | Card/Account/CIF Number to transfer to. | String | Required. | +| Pool ID | The pool from which to transfer. | Enum (Lookup) | Required. Must respect "From" entity level. | +| Store | The store where transaction is logged. | Enum (Lookup) | Required. | +| Amount to Transfer | Amount. | Decimal | Required. > 0. Defaults to whole pool balance. | +| Expiry Date | Expiry date of transferred points. | Date | Required. Defaults to source expiry date. | +| Transaction Code | OLS transaction code. | Enum (Lookup) | Required. | +| Reason Code | Pre-defined reason for transfer. | Enum (Lookup) | Required. Determines GL posting accounts. | +| Remarks | Additional remarks. | String (100) | Optional. | + +### Execution +- **Pending/Approve Flow**: Goes to a pending list. Authorised user approves. +- OLS validates status, block codes, and permissions for both "From" and "To". +- Rejected if "From" pool balance is insufficient. +- Execution transfers all linked pools directly from "From" to "To". +- Logged as a negative Adjustment on "From" and positive Adjustment on "To". + +## Post-Conditions +- Pool balances updated. + +## Exception Flow +- Insufficient balance, TP validation failures, or input errors block the action. diff --git a/docs/specs/introduction/terminology.md b/docs/specs/introduction/terminology.md new file mode 100644 index 0000000..544b0fa --- /dev/null +++ b/docs/specs/introduction/terminology.md @@ -0,0 +1,42 @@ +--- +title: "Terminology" +type: OpenSpec +status: Draft +domain: Introduction +--- + +# Terminology + +This document defines the terms used across the OLS (One Loyalty System) modules. + +## Term Definitions + +| Term | Definition | +|---|---| +| Amount vs Quantity | - **Amount**: Used in connection with monetary amounts (e.g., Dollars). For example, "Transaction Amount".
- **Quantity**: Refers to the number of units of an entity, not monetary value. For example, "Award Quantity" or "Redeem Quantity". | +| Pool Balance Bucket (Bucket) | Used in the context of a Reward Pool Bucket. A bucket is determined based on the pool entity level and expiration date. | +| Bucket Expiry Date | - If used in the context of a Counter, refers to the Counter Expiry.
- If used in the context of a Reward Pool Bucket, refers to the Pool Expiry. | +| Campaign Rule (Rule) | A business rule defining the conditions under which a reward will be given, including the type and quantity of the reward. It includes **Rule Criteria** and **Rule Formula**. | +| CEP | **Counter Extract & Process**. A module for setting up job requests to extract a specified counter based on criteria and using the counter value as a transaction amount to process against Campaign Rules. Includes batch processes to execute requests. | +| Contributor | Identifies an entity which funds the rewards given under a specific Rule. One or more Contributors can be set up. **Rule Contributor Settings** define the percentage billed to each Contributor (totaling 100%). Default is the transacting business entity if only one exists. Used in end-of-day settlement reports. | +| Counter | Used to track a customer's transaction statistics (e.g., spend frequency, spend total for specific criteria like MCC). Periodic counts (e.g., monthly) are tracked in separate **Counter Buckets** with a specific **Counter Bucket Date**. | +| Effective Period | Defines a Start Date and End Date range during which a parameter is effective. Generally starts at 00:00:00 and ends at 23:59:59. Time is considered a discrete quantity in seconds. | +| Expiry Policy | Defines how rewards expire. New policies based on Card Types will be supported. | +| Formula | Defines the calculation formula used for calculating the reward quantity. Comprises:
- **Formula Header**: General parameters (e.g., max reward amount, rounding rules, Gross vs Nett amount).
- **Formula Detail**: Specific calculations, each with an Execution Sequence number (executed in descending order). | +| Gross Amount | The payment amount before any reward deduction. | +| Pool (Reward Pool) | Tracks each type of reward (e.g., points, coupons). Associated with a **Pool Expiry Policy**. Rewards expiring on a given date are tracked in a **Pool Bucket** with a **Bucket Expiry Date**. | +| REP | **Redeem, Extract and Process**. A module for setting up requests to redeem a specified Pool based on criteria, and to output the redemption transaction details. | +| Rule Criteria | Defines the conditions to be met for a rule to apply. | +| Rule Pool | A Reward Pool which is updated with the results of a Rule Formula. Each Rule is associated with one Rule Pool. | +| Transaction Amount | Mandatory column in OLS for award processing. Used as the principal quantity for reward calculations. For payment transactions:
- **Gross Amount**: Total payment amount.
- **Nett Amount**: Amount remaining after offsetting with redeemed rewards. (Logged in OLS as Gross Amount). | +| OLS Transaction Code (TC) | The key used to locate applicable Rules for a transaction record. If no Rule is linked to a TC, no reward calculation occurs. Must be defined in the TC look-up table. | + +## Document Structure Reference +The standard modules defined across the system include: +1. Introduction +2. OneAccess +3. Customer Management +4. Campaign Management +5. OneCatalogue +6. OneMarketing +7. OneTargeting diff --git a/docs/specs/oneaccess/permission_management.md b/docs/specs/oneaccess/permission_management.md new file mode 100644 index 0000000..7580d0e --- /dev/null +++ b/docs/specs/oneaccess/permission_management.md @@ -0,0 +1,65 @@ +--- +title: "Permission Management" +type: OpenSpec +status: Draft +domain: OneAccess +--- + +# Permission Management + +## Requirement Definition +The Permission Management module is used to maintain Access Rights Groups. It defines: +1. Which modules and functions can be accessed by users in a group. +2. Which applicable actions (Add, Change, View, Delete, Approve/Reject, Copy, View History, Save as Template) can be performed by users in each function within each module. + +## Process Flow + +### Trigger +- A new user group is defined, requiring permission assignment. + +### Pre-Conditions +- Users must have access rights to the Permission Management module to view, add, or edit permission records. + +## Business Rules +- The system checks and displays available modules/functions for each user based on: + - **A**: Permissions assigned directly to the user. + - **B**: Permissions assigned to the user's permission group. + - **Total User Permission (C)** = Combination of A and B. + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Role | The unique identifier of the permission group. | String (10) | Required. | +| Role Name | Text describing the Permission Group Name. | String (100) | Required. | +| Permission Type | The type of permission assignment. | Enum | Required. Values: Particular User, User Group. | +| User | Select one or more users for this role. | Array of User IDs | Required if Permission Type is "Particular User". | +| User Group | Select one group for this role. | String (User Group ID) | Required if Permission Type is "User Group". | +| Description | Text describing the Role. | String (200) | Optional. | + +#### Module Permissions +*A hierarchy of modules containing the list of available functions (Top-level and Second-level modules).* + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| View | Allows viewing data available in the function. | Boolean | | +| Create | Allows creating data in the function. (Includes "Save as draft" implicitly). | Boolean | | +| Edit | Allows updating data in the function. | Boolean | | +| Delete | Allows deleting data in the function. | Boolean | | +| Copy | Allows copying available data in the function. | Boolean | | +| Approve | Allows approving/rejecting data in the function. | Boolean | | +| History | Allows viewing data history (activity log). | Boolean | | +| Template | Allows saving records as a template. | Boolean | | + +#### Access Rights Fields (Field-Level Permissions) +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| View | Allows viewing the specific field on the screen. | Boolean | | +| Editable | Allows modifying the value of the specific field. | Boolean | | + +## Post-Conditions +- Records are automated for approval upon creation/modification. + +## Exception Flow +- If input data fails validation, the action is canceled, and the operation fails. diff --git a/docs/specs/oneaccess/user_group.md b/docs/specs/oneaccess/user_group.md new file mode 100644 index 0000000..7902cb1 --- /dev/null +++ b/docs/specs/oneaccess/user_group.md @@ -0,0 +1,47 @@ +--- +title: "User Group" +type: OpenSpec +status: Draft +domain: OneAccess +--- + +# User Group + +## Requirement Definition +The User Group module is utilized to categorize users who share identical permissions within OLS. It defines the group to be assigned to a particular user or group of users. + +## Process Flow + +### Trigger +- A new user group needs to be defined. +- An existing user group needs to be modified, or a user needs to review the existing group. + +### Pre-Conditions +- Users must have access rights to the User Group module to view, add, or edit user group records. + +## Business Rules +- The user group ID must be a unique value. + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| User Group ID | The identity of the user group. | String (10) | Required. Must be unique. | +| User Group Name | The name of the user group. | String (100) | Required. | +| Description | Description for the user group. | String (200) | Optional. | + +#### Group Users (View Only) +*Lists all active User Profile records assigned to this group.* + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| User ID | The identity of the user belonging to the chosen group. | String | Read-only | +| User Name | The name of the user. | String | Read-only | +| Email | Email address of the user. | String | Read-only | + +## Post-Conditions +- The data is updated in the database and related screens. + +## Exception Flow +- If input data fails validation, the action is canceled, and the operation fails. diff --git a/docs/specs/oneaccess/user_profile.md b/docs/specs/oneaccess/user_profile.md new file mode 100644 index 0000000..a7150f3 --- /dev/null +++ b/docs/specs/oneaccess/user_profile.md @@ -0,0 +1,61 @@ +--- +title: "User Profile" +type: OpenSpec +status: Draft +domain: OneAccess +--- + +# User Profile + +## Requirement Definition +The User Profile defines user attributes and sets the date and time allowing user access to system functions. It is used for login. Upon logging in, users can view a list of functions with specific operations set in the permission management section. + +## Process Flow + +### Trigger +- A new account needs to be defined. +- Information of an existing account needs to be updated. + +### Pre-Conditions +- Users must have access rights to the User Profile module to view, add, or edit User Profile records. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| User ID | Unique user identifier. | String (10) | Required. Must be unique. | +| User Name | Name of the user associated with the User ID. | String (50) | Required. | +| Password | User password. | String (50) | Required for new users. Must meet strong password policies. | +| Re-enter Password | Confirmation of the password. | String (50) | Must match Password. | +| Email | User's email address. Can be used for login and password resets. | String (100) | Required. Must be unique. | +| Default Language | Determines the language for screen labels. | Enum | Required. | + +#### Access Detail +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Access Day | Indicates the days of the week the user has access to the system. | Array of Enums | Required. (e.g., Monday-Sunday) | +| Access Time | The time on and after which the user has access to the system on allowed days. | Time | Required. | +| User Profile Effective From Date | Date on and after which the User Profile is effective. | Date | Required. | +| User Profile Effective End Date | Date on and before which the User Profile is effective. | Date | Required. | +| User Group | The selected group determining the functions the user can access. | String (User Group ID) | Required. | +| Report Access Right | Determines which report(s) the user has access to. | String (Report Group ID) | Optional. | +| User Status | Status of the user account. | Enum | Required. Values: Active, Blocked. | + +#### User Permission (View Only) +*Displays all permissions applicable for the chosen user across top-level and second-level modules.* + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Module Name | The name of the module. | String | Read-only | +| Permissions | Available actions (View, Create, Edit, Delete, Copy, Approve, History, Template). | Boolean per action | Read-only | + +## Post-Conditions +- When creating a new record, the user account is successfully created. +- The new user receives an email notification with login instructions and a temporary password. +- When the password is reset, an email notification is sent to the user's email with the new password. + +## Exception Flow +- No specific exception flow defined. diff --git a/docs/specs/oneadmin/framework_behavior.md b/docs/specs/oneadmin/framework_behavior.md new file mode 100644 index 0000000..423100c --- /dev/null +++ b/docs/specs/oneadmin/framework_behavior.md @@ -0,0 +1,50 @@ +--- +title: "OneAdmin Framework Behavior" +type: OpenSpec +status: Draft +domain: OneAdmin +--- + +# OneAdmin Framework Behavior + +## Requirement Definition +OneAdmin is the application framework upon which all OLS administration functions are built. It defines the standard behavior for data maintenance, record lifecycle states, search capabilities, and audit trailing across all modules (e.g., Campaign Management, Customer Management, Catalogue). + +## Business Rules + +### Maintenance Actions +The framework supports the following standard maintenance actions across modules: +- **Add**: Creates a new record in a Pending state. +- **Edit**: Modifies an existing record. The modifications are saved as a new version in a Pending state, leaving the original active record unchanged until approval. +- **Copy**: Duplicates an existing record, prompting the user to update unique key values. +- **Delete**: Marks a record for deletion (Inactive). The deletion request creates a Pending state version. +- **Approve**: Transitions a Pending record to Active state. The approving user must have appropriate approval rights and cannot be the user who submitted the change. +- **Reject**: Transitions a Pending record to a Rejected state for follow-up. +- **Save as Draft**: Temporarily saves the record without publishing it to a Pending state. +- **Save as Template**: Saves the record details to be reused as a template. +- **History**: Retrieves previous versions of a record. + +### Record State Transitions +1. **Pending**: When a new record is added, edited, or deleted, the action results in a Pending state. +2. **Active**: Upon approval, a Pending record becomes Active. Only Active records are considered during transaction processing. +3. **Rejected**: If an approver rejects a Pending record, its state becomes Rejected. +4. **Inactive**: An approved deletion sets the record to Inactive, blocking it from further use. + +### Search and Filtering Capabilities +- **Quick Search**: Keyword-based search applied to all character columns using a case-insensitive "Contains" operator. +- **Advanced Filter**: Allows compound criteria using AND logic. Supported operators vary by data type: + - **Character**: Equal, Not Equal, Empty, Not Empty, Contains, Not Contains, In, Not In. + - **Number**: Equal, Not Equal, Greater Than, Less Than, Greater Than Or Equal To, Less Than Or Equal To, Between. + - **Boolean**: Equal. + - **DateTime**: Equal, Not Equal, Greater Than Or Equal To, Less Than Or Equal To, Between. + +### Audit Logging +Every record update or approval is logged. The following audit fields are maintained for all records: +- **Last Updated By**: User ID (or Batch ID) that last updated the record. +- **Last Updated Date**: Date and time of the last update. +- **Last Approved By**: User ID that last approved the record. +- **Last Approved Date**: Date and time of the last approval. + +## Post-Conditions +- All updates are reflected in the database immediately upon approval. +- Concurrent edits and approvals are strictly logged and version-controlled. diff --git a/docs/specs/onecatalogue/catalogue.md b/docs/specs/onecatalogue/catalogue.md new file mode 100644 index 0000000..dbc7d8e --- /dev/null +++ b/docs/specs/onecatalogue/catalogue.md @@ -0,0 +1,44 @@ +--- +title: "Catalogue" +type: OpenSpec +status: Draft +domain: OneCatalogue +--- + +# Catalogue + +## Requirement Definition +A Catalogue groups items for online redemptions (e.g., Cash-back rebates, frequent flyer miles, merchant vouchers). All items included in the Catalogue must be tagged with a specific Catalogue Code. The system supports multiple concurrent catalogues, each with its own Item Master records. + +## Process Flow + +### Pre-Conditions +- Users must have access rights to the "Catalogue" screen under the "OneCatalogue" module. +- Depending on access rights, users can view, add, edit, or approve catalogue records. + +## Business Rules +- Each Catalogue operates within a Start / End date range. +- Items are only presented to customers if the current date falls within the Catalogue's effective date range. + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Catalogue Code | User-specified code identifying the catalogue. Used by front-end systems. | String (10) | Required. | +| Description | A description of this catalogue. | String (50) | Required. Default description if no specific language is chosen. | +| Effective From Date | Date from which the catalogue is effective. | Date | Required. | +| Effective To Date | Date until which the catalogue is effective. | Date | Required. | +| Icon | Icon of the catalogue. | Image | Optional. | + +#### Content Configuration +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Language | Selected language for specific description setup. | String (Lookup) | Required. | +| Description | Description of the catalogue in the chosen language. | String (100) | Required. | + +## Post-Conditions +- The Catalogue information is returned to the front-end during Item Enquiry responses for searching. + +## Exception Flow +- None specified. diff --git a/docs/specs/onecatalogue/category.md b/docs/specs/onecatalogue/category.md new file mode 100644 index 0000000..bd27b76 --- /dev/null +++ b/docs/specs/onecatalogue/category.md @@ -0,0 +1,40 @@ +--- +title: "Category" +type: OpenSpec +status: Draft +domain: OneCatalogue +--- + +# Category + +## Requirement Definition +A Category is a logical group within a catalog that organizes items. Multiple Categories can be linked to form a hierarchy, which is utilized on the Member site. + +## Process Flow + +### Pre-Conditions +- Users must have access rights to the "Category" screen under the "OneCatalogue" module. +- Depending on access rights, users can view, add, edit, or approve category records. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Category Code | User-specified code identifying the category. | String (10) | Required. | +| Description | Default description of this category. | String (100) | Required. | +| Effective From Date | Date from which the category is effective. | Date | Optional. If empty, non-expiring. | +| Effective To Date | Date until which the category is effective. | Date | Optional. | +| Parent Category | Identifies the parent category to form a hierarchy. | String (Lookup) | Optional. | +| Display Ordering | Ordering sequence on the Member Site. | Integer | Optional. | +| Icon | Icon of the category. | Image | Optional. | +| Image Group | Selected image group. | String (Lookup) | Optional. | +| Image | Selected image from Image Stock. | String (Lookup) | Required if Image Group is selected. | + +#### Content Configuration +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Language | Selected language for specific description setup. | String (Lookup) | Required. | +| Description | Description of the category in the chosen language. | String (100) | Required. | diff --git a/docs/specs/onecatalogue/item_master.md b/docs/specs/onecatalogue/item_master.md new file mode 100644 index 0000000..a8dc9ae --- /dev/null +++ b/docs/specs/onecatalogue/item_master.md @@ -0,0 +1,65 @@ +--- +title: "Item Master" +type: OpenSpec +status: Draft +domain: OneCatalogue +--- + +# Item Master + +## Requirement Definition +Item Master defines details about a particular item, such as prices, quantities, availability dates, terms, and conditions. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Item Master" screen under the "OneCatalogue" module. +- Depending on access rights, users can view, add, edit, or approve Item Master records. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Catalogue Code | The Catalogue for which this item is configured. | String (Lookup) | Required. | +| Category | Category under which this item is tagged. | Array of Strings (Lookup) | Optional. | +| Item Code | Identifier for the item to be added. | String (10) | Required. | +| Item Name | Short description used by customer-facing application. | String (50) | Required. | +| Redemption From Date | Date from which the item is available for redemption. | Date | Required. Must fall within Catalogue/Category date range. | +| Redemption To Date | Date until which the item is available. | Date | Required. Must fall within Catalogue/Category date range. | +| Redemption Store | Supplier/merchant of this item. | String (Lookup) | Optional. | +| Redemption Transaction Code | OLS TC used for redemption processing. | String (Lookup) | Required. | +| Award Transaction Code | OLS TC used to locate award campaign rules upon redemption. | String (Lookup) | Optional. | +| Item Type | Type of item. | Enum | Required. Values: Miles, Physical, eVoucher, Donation, Cash rebate, Other. | +| Voucher Code | Selected voucher code. | String (Lookup) | Required if Item Type is eVoucher. | +| Face Value | Value of the cash rebate/voucher/miles that customer receives. | Decimal (14,2) | Required for Cash rebate/eVoucher/Miles. Must be positive. | +| Display on Member Site | Determines if the item is displayed on the member site. | Boolean | Default: True. | +| Hot Item | Indicates if this is a hot item. | Boolean | Active only if Display on Member Site is True. Default: False. | +| Display Ordering | Ordering sequence to display on member site. | Integer | Must be > 0. Active only if Display on Member Site is True. | +| Track Quantity on Hand | Enables inventory control. | Boolean | Default: False. Forced to True if item is a Voucher Code. | +| Initialize Quantity of Stocks | Initial stock quantity. | Integer | Required if Track Quantity on Hand is True. Read-only if item has been redeemed. | + +#### Item Detail (Localization) +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Language | Selected language. | String (Lookup) | Required. | +| Item Name | Specific item name in the chosen language. | String (50) | Required. | +| Item Description | Specific item description. | String (100) | Optional. | +| Item Content | Detailed content/information. | String (2000) | Optional. | +| How to use | Instructions on how to use the item. | String (2000) | Optional. | +| Term and Condition | Free text for Terms and Conditions. | String (2000) | Optional. | + +#### Contact and Address Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| City | City where the item can be used. | String (Lookup) | Required. | +| Address | Detailed address. | String (200) | Optional. | +| Email | Contact email. | String (100) | Optional. | +| Phone | Contact phone number. | String (20) | Optional. | + +## Post-Conditions +- The newly created item should have all required fields populated with valid data. +- System adds/updates items in the database. +- Other screens looking up the item screen can use the new item. diff --git a/docs/specs/onecatalogue/item_price.md b/docs/specs/onecatalogue/item_price.md new file mode 100644 index 0000000..45db9a8 --- /dev/null +++ b/docs/specs/onecatalogue/item_price.md @@ -0,0 +1,54 @@ +--- +title: "Item Price" +type: OpenSpec +status: Draft +domain: OneCatalogue +--- + +# Item Price + +## Requirement Definition +Item Price specifies the conversion rate between reward points and redemption quantity, defining pricing tiers based on account types, redemption channels, or specific criteria. It manages redemption options (points only vs. cash and points). + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Item Master" and "Item Price" screens under the "OneCatalogue" module. +- Depending on access rights, users can view, add, edit, or approve Item Price records. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Item Code | The item being configured. | String (Lookup) | Required. | +| Price Code | Identifier of the item price. | String (10) | Required. | +| Price Name | Default name of the price. | String (100) | Required. | +| Effective Start Date | Start date of the price validity. | Date | Required. | +| Effective End Date | End date of the price validity. | Date | Required. | +| Redemption Channel | Channel applicable for this price (e.g., Call Center, Mobile App). | String (Lookup) | Required. | +| Account Type Group | Account Type Group this price applies to. | Array of Strings (Lookup) | Optional. Mutually exclusive with Account Level/Type. | +| Product Account Level | Account Level this price applies to. | String (Lookup) | Optional. Mutually exclusive with Account Type Group. | +| Product Account Type | Account Type this price applies to. | Array of Strings (Lookup) | Optional. Mutually exclusive with Account Type Group. | +| Redemption Pool | Pool from which to deduct points. | String (Lookup) | Required. | +| Use Only Points from Selected PA Type | Restrict points usage to the selected Account Type/Group. | Boolean | Default: False. | +| Face Value | The value the customer receives upon redemption. | Decimal (12,2) | Must be > 0. | +| Price in Point | Price if paid fully in points. | Decimal (12,2) | Must be > 0. | +| Original Price | The original price of the item (for reference). | Decimal (12,2) | Must be > 0. | +| Partial Redemption Allowed | Allows a mix of points and cash for redemption. | Boolean | Default: False. | +| Minimum Partial Redeem Points | Minimum points customer must use for partial redemption. | Decimal (12,2) | Required if Partial Redemption is Allowed. Must be >= 0. | +| Cash per Point | Cash amount required to substitute one point during partial redemption. | Decimal (12,2) | Required if Partial Redemption is Allowed. Must be > 0. | +| Applicable Taxes | Tax rate applicable. | String (Lookup) | Optional. | + +#### Price Detail (Localization) +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Language | Selected language. | String (Lookup) | Required. | +| Item Price Name | Specific name of chosen language. | String (100) | Required. | +| Description | Description of the price. | String (500) | Optional. | + +#### Item Criteria +- Utilizes the Query Builder logic. Criteria groups can be combined using logical OR/AND operators. +- Applicable criteria are tagged specifically for the "Item Price" module. diff --git a/docs/specs/onecatalogue/voucher_code.md b/docs/specs/onecatalogue/voucher_code.md new file mode 100644 index 0000000..64b8591 --- /dev/null +++ b/docs/specs/onecatalogue/voucher_code.md @@ -0,0 +1,58 @@ +--- +title: "Voucher Code" +type: OpenSpec +status: Draft +domain: OneCatalogue +--- + +# Voucher Code + +## Requirement Definition +Voucher Codes manage external partner vouchers distributed to customers. Vouchers are imported or generated with specific codes, valid periods, and serial numbers. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Voucher Management" screen under the "OneCatalogue" module. +- Depending on access rights, users can view, add, edit, or approve Voucher records. + +## Business Rules +- Voucher codes cannot be deleted if any associated voucher serial number has been redeemed. + +### Data Schema + +#### Voucher Statistic (View Only) +| Field Name | Description | Logic Type | +|---|---|---| +| Total Voucher | Total serial numbers under this voucher code. | Integer | +| Available Vouchers | Total valid, non-expired, ready-to-use vouchers. | Integer | +| Redeemed Vouchers | Total successfully redeemed vouchers. | Integer | +| Cancelled Vouchers | Total failed redemptions canceled by customers/system. | Integer | +| Expired Vouchers | Total expired vouchers not redeemed. | Integer | + +#### Voucher Code Detail +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Voucher Code | Identifier of the voucher. | String (10) | Required. | +| Description | Description of the voucher. | String (100) | Optional. | +| Supplier | Partner issuing the voucher. | String (Lookup) | Optional. | +| Expiry Policy | Determines how the voucher expires. | Enum | Required. Values: Fixed Date, N days from Transaction Date, N days from Post Date, N Months from Transaction Date, N months from Post Date. | +| Expiry Date | The absolute expiry date. | Date | Required if Expiry Policy is "Fixed Date". | +| N Param | Parameter N for relative expiry policies. | Integer | Required if Expiry Policy requires N parameter. Must be >= 0. | +| Generate Voucher | Indicates if OLS generates the voucher (instead of partner upload). | Boolean | Default: False. Read-only if voucher is redeemed. | +| Quantity | Number of voucher codes to generate. | Integer | Required if Generate Voucher is True. Read-only if voucher is redeemed. | +| This is a promo code | Indicates if this is a promo code. | Boolean | Default: False. | +| Promotion Type | Type of discount. | Enum | Required if This is a promo code is True. Values: Fixed Percentage Discount, Fixed Monetary Value Discount, Cashback Voucher, Gift Voucher. | +| Value | The specific value of the discount. | Decimal (14,2) | Required if Promotion Type is Fixed Monetary Value or Fixed Percentage. Must be > 0. | + +#### Voucher Detail (View Only) +*Displays specific serial numbers assigned to the Voucher Code.* + +| Field Name | Description | Logic Type | +|---|---|---| +| Voucher Code | The associated voucher code. | String | +| Voucher No | The serial voucher number. | String | +| Redemption Date | Date when voucher is redeemed. | Date | +| Expiry Date | Expiry date of the serial number. | Date | +| Redemption Indicator | Yes or No. | Boolean | +| Fulfillment Status | New, Issued, Fulfilled, Cancelled, Rejected. | Enum | diff --git a/docs/specs/onemarketing/ab_testing.md b/docs/specs/onemarketing/ab_testing.md new file mode 100644 index 0000000..ec9e166 --- /dev/null +++ b/docs/specs/onemarketing/ab_testing.md @@ -0,0 +1,51 @@ +--- +title: "A/Bn Testing" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# A/Bn Testing + +## Requirement Definition +Evaluates and optimizes marketing elements (content or target customers) to identify better performing campaigns. Supports A/Bn Content testing (same target, different messages) and A/Bn Target Customer testing (same message, different targets). + +## Process Flow + +### Pre-Conditions +- Third-party data/results must be available for OLS to collect and analyze. +- Users must have access rights in the "A/Bn Testing" module. + +## Business Rules + +### Data Schema (A/Bn Message Content Testing) + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Unique identifier. | String (20) | Required. No special characters. | +| Campaign Description | Description. | String (100) | Optional. | +| Effective Date From | Start date. | Date | Optional. | +| Effective End date | End date. | Date | Required. | +| Message Channel | SMS, Email, Push. | Enum | Required. | +| Target Customer | OMR Criteria setup for targeting. | Rule | Required. | +| Variant Content | Multiple variants (A, B, N) defining content based on channel. | Array of Messages | Required. Must be unique within the campaign. | +| Run Schedule | Schedule parameters. | Complex | Required. | + +### Data Schema (A/Bn Target Customer Testing) + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Unique identifier. | String (20) | Required. No special characters. | +| Campaign Description | Description. | String (100) | Optional. | +| Effective Date From | Start date. | Date | Optional. | +| Effective End date | End date. | Date | Required. | +| Variant Target Customer | Multiple variants (A, B, N) defining OMR Criteria. | Array of Rules | Required. Must be unique within the campaign. | +| Run Schedule | Schedule parameters. | Complex | Required. | + +### Execution +- ABn batch job triggers effective testing requests based on schedule. +- For content testing, sends variant messages to the same subset of targets. Tracks open rates, click-through rates. +- For target testing, evaluates which criteria setup reaches the most/best customers. + +## Post-Conditions +- Results are reported back to the user to make data-driven decisions on campaign rollout. diff --git a/docs/specs/onemarketing/blacklist.md b/docs/specs/onemarketing/blacklist.md new file mode 100644 index 0000000..3013f8e --- /dev/null +++ b/docs/specs/onemarketing/blacklist.md @@ -0,0 +1,36 @@ +--- +title: "Blacklist" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# Blacklist + +## Requirement Definition +A list of customers excluded from marketing campaigns for strategic reasons (e.g., fraud). + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Black List" module. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| ID | Blacklist identifier. | String (10) | Required. | +| Name List | Name of the blacklist. | String (50) | Required. | +| Description | Description. | String (200) | Optional. | +| Input Type | Input from screen or Upload file. | Enum | Required. | +| Customer List | List of selected CIF numbers. | Array of Strings (Lookup) | Required if Input Type is "Input from screen". Requires >= 4 digits to search. | +| Upload File | Uploaded CSV/XLS file. | File | Required if Input Type is "Upload file". Max 50MB. | + +### Execution +- Users can review or download the customer list. +- Blacklisted customers are strictly blocked from receiving notifications from OMR. + +## Exception Flow +- Validation errors for file type/size during upload display an error message. diff --git a/docs/specs/onemarketing/frequency_capping.md b/docs/specs/onemarketing/frequency_capping.md new file mode 100644 index 0000000..bede0b3 --- /dev/null +++ b/docs/specs/onemarketing/frequency_capping.md @@ -0,0 +1,42 @@ +--- +title: "Marketing Frequency Cap" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# Marketing Frequency Cap + +## Requirement Definition +Controls the frequency and volume of notifications delivered to customers to prevent overwhelming them. Caps can be set daily, weekly, or monthly per customer across different channels. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Frequency Capping" module. + +## Business Rules + +### Data Schema + +#### Edit Mode Configuration +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Frequency Cap Id | Record identifier. | String (10) | Required. | +| Notification Channel | SMS, Email, or Push Notifications. | Enum | Required. | +| Effective Date From | Start date of the cap. | Date | Required. Only one effective cap per channel at any given time. | +| Effective Date To | End date of the cap. | Date | Required. | +| Capping Period | Daily, Weekly, or Monthly. | Enum | Required. Each period must have only one cap value. | +| Maximum number | Max messages per unique customer. | Integer (12) | Required. | +| Include Whitelist | Disallows/allows whitelist customers to receive more notifications. | Boolean | Default: False. | +| Customer list | Selected whitelist customers to ignore rules. | Array of Strings (Lookup) | Required if Include Whitelist is True. | +| Description | Description of the capping. | String (100) | Optional. | + +### Execution +- Frequency Capping is applied to all marketing campaigns at the customer level. +- System automatically tracks notification counts per customer per channel and period unit. +- If the customer reaches the cap, further notifications are blocked. +- Whitelisted customers are excluded from the frequency cap unless explicitly included. + +## Post-Conditions +- System enforces defined limits during OMR batch processing. diff --git a/docs/specs/onemarketing/marketing_campaign.md b/docs/specs/onemarketing/marketing_campaign.md new file mode 100644 index 0000000..e866b6c --- /dev/null +++ b/docs/specs/onemarketing/marketing_campaign.md @@ -0,0 +1,62 @@ +--- +title: "Marketing Campaign (OneMarketing Request)" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# Marketing Campaign (OneMarketing Request) + +## Requirement Definition +Filters target customers that satisfy specific marketing criteria. Triggers either notification messages or reward campaigns (via OLS Transaction Code) for the target customers. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Marketing Request" module. +- Depending on rights, users can view, add, edit, or approve requests. +- All OMR criteria must be defined as attributes. + +## Business Rules + +### OMR Criteria Logic +- Uses Query Builder for marketing criteria. +- Criteria can be dragged/dropped from the right panel. +- Supports AND/OR conditions between criteria groups. +- Introduces NOT toggle for exclusion criteria. + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Request ID | Unique identifier. | String (20) | Required. No special characters. | +| Description | Description. | String (100) | Required. | +| Effective Date From | Start date. | Date | Required. | +| Effective Date To | End date. | Date | Required. | +| Marketing Function | Notification [N] or Trigger Campaign Rule [TCR]. | Enum | Required. | + +#### Run Schedule and Message Content +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Trigger Method | Schedule or Event trigger. | Enum | Required. | +| Run Schedule | Once Time [O], Daily [D], Weekly [W], Monthly [M], Annually [A]. | Enum | Required if Trigger Method is Schedule. | +| Schedule Details | Specific details (e.g., Repeat every, Fixed Date, Time of day). | Complex | Required based on Run Schedule. | +| Business Event | Specific event triggering the request. | Array of Strings (Lookup) | Required if Trigger Method is Event trigger. | +| Message Template | The marketing message to send. | String (Lookup) | Required if Marketing Function is Notification. | +| OLS Transaction Code | TC used to trigger campaign rule. | String (Lookup) | Required if Marketing Function is Trigger Campaign Rule. | + +#### Targeting +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Trigger Method | OMR Criteria or Upload file. | Enum | Required. | +| Targeting Data | The selected OMR criteria setup or the uploaded file. | Rule / File | Required based on Trigger Method. | + +### Batch Job Processing +- OMR job checks effective requests based on processing date. +- Finds valid jobs based on schedule. +- Creates notifications or extracts transactions based on criteria. +- Stops sending when frequency capping limits are reached. + +## Post-Conditions +- Marketing content is sent to target customers, or target customers trigger a Campaign Rule. diff --git a/docs/specs/onemarketing/marketing_message.md b/docs/specs/onemarketing/marketing_message.md new file mode 100644 index 0000000..9ac4461 --- /dev/null +++ b/docs/specs/onemarketing/marketing_message.md @@ -0,0 +1,69 @@ +--- +title: "Marketing Message" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# Marketing Message + +## Requirement Definition +Manages (CRUD) all message templates used in the system. A Message Template can be built for different channels (SMS, Push Notification, Email). The message can be based on pre-defined parameters or HTML files. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Marketing Message" module. +- Depending on rights, users can view, add, edit, or approve message templates manually. +- OMR criteria must be defined as attributes available in the right panel for drag-and-drop setup. + +## Business Rules + +### Data Schema (SMS Message) + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Message ID | Unique identifier. | String (10) | Required. No special characters. | +| Message Description | Description. | String (100) | Required. | +| SMS Type | Promotion/Marketing or Transaction. | String (Lookup) | Required. | +| Effective Date From | Start date of the effective period. | Date | Required. | +| Effective End Date | End date of the effective period. | Date | Required. | +| SMS Brand Name | Select SMS Sender. | String (Lookup) | Required. | +| Message | Message content. Supports drag/drop parameters. | String (5000) | Required. Unicode (non-GSM). No images, subject, or attachments. | + +### Data Schema (Email Message) + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Message ID | Unique identifier. | String (10) | Required. No special characters. | +| Message Description | Description. | String (100) | Required. | +| Email Type | Promotion/Marketing or Transaction. | String (Lookup) | Required. | +| Effective Date From | Start date of the effective period. | Date | Required. | +| Effective End Date | End date of the effective period. | Date | Required. | +| Use Type | Use Message or Upload Template. | Enum | Required. | +| Sender Name | Name of sender. | String (100) | Required. | +| From Email | Configured email address. | String (100) | Required. | +| Subject | Subject of email. | String (100) | Required. | +| Preview Text | Preheader of Email. | String (100) | Optional. Defaults to first line of content if not provided. | +| Message / Upload File | HTML content or uploaded template file. | String / File | Required based on Use Type. | + +### Data Schema (Push Notification) + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Message ID | Unique identifier. | String (10) | Required. No special characters. | +| Message Description | Description. | String (100) | Required. | +| Notification Type | Promotion/Marketing or Transaction. | String (Lookup) | Required. | +| Effective Date From | Start date of the effective period. | Date | Required. | +| Effective End Date | End date of the effective period. | Date | Required. | +| Message Title | Primary text at the top. | String (50) | Required. | +| Message | Main content. Supports drag/drop parameters. | String | Required. | +| Image Type | Single (No image), Richer (1 image), Carousel (>1 images). | Enum | Required. | +| Upload Image | Images for Richer or Carousel push. | Image / URL | Required if Image Type is not Single. | +| Link URL | URL to navigate to. | String (100) | Required. | + +### Testing Message +- A "Send sample" function exists for all channel types to test the message rendering using a sample phone number, email, or CIF number. + +## Post-Conditions +- All configured messages are available for use in Marketing Request, Campaign Rule, and Item Master. diff --git a/docs/specs/onemarketing/whitelist.md b/docs/specs/onemarketing/whitelist.md new file mode 100644 index 0000000..8970bf7 --- /dev/null +++ b/docs/specs/onemarketing/whitelist.md @@ -0,0 +1,36 @@ +--- +title: "Whitelist" +type: OpenSpec +status: Draft +domain: OneMarketing +--- + +# Whitelist + +## Requirement Definition +A list of customers who have given consent or shown strong interest and are excluded from standard frequency cap rules, ensuring they receive all communications without limit. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Whitelist" module. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| ID | Whitelist identifier. | String (10) | Required. | +| Name List | Name of the whitelist. | String (50) | Required. | +| Description | Description. | String (200) | Optional. | +| Input Type | Input from screen or Upload file. | Enum | Required. | +| Customer List | List of selected CIF numbers. | Array of Strings (Lookup) | Required if Input Type is "Input from screen". Requires >= 4 digits to search. | +| Upload File | Uploaded CSV/XLS file. | File | Required if Input Type is "Upload file". Max 50MB. | + +### Execution +- Users can review or download the customer list. +- Whitelisted customers bypass frequency capping restrictions by default, unless a specific frequency cap explicitly opts to "Include Whitelist". + +## Exception Flow +- Validation errors for file type/size during upload display an error message. diff --git a/docs/specs/onetargeting/audience_upload.md b/docs/specs/onetargeting/audience_upload.md new file mode 100644 index 0000000..daa96cc --- /dev/null +++ b/docs/specs/onetargeting/audience_upload.md @@ -0,0 +1,32 @@ +--- +title: "Audience Upload" +type: OpenSpec +status: Draft +domain: OneTargeting +--- + +# Audience Upload + +## Requirement Definition +Provides a module for marketers to manage audience uploads, enabling them to upload customer data for targeted marketing campaigns via file uploads. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the "Audience Upload" module. +- Depending on access rights, users can view, add, edit, or manually approve. + +## Business Rules +- Users can upload customer data for targeted marketing campaigns via file upload (CSV, Excel spreadsheets). +- The system allows users to map data from source files to required platform fields. +- The system validates the uploaded data to ensure all required fields are present and in the correct format. + +### Data Schema + +| Field Name | Description | Data Type | Constraints / Rules | +|---|---|---|---| +| Audience Name | The name of the audience | String (50) | Required. Must be unique in the system. | +| Description | Audience description | String (200) | Optional. | +| File ID | Audience identifier | String (10) | Required. Internal system reference. | +| File Size | The file size of the upload | Numeric | System generated. | +| Upload File | The uploaded file data | File/Binary | Required. Allowed extensions: CSV, XLS, XLSX. Max size: <= 50 MB. | diff --git a/docs/specs/onetargeting/customer_audience.md b/docs/specs/onetargeting/customer_audience.md new file mode 100644 index 0000000..31c6399 --- /dev/null +++ b/docs/specs/onetargeting/customer_audience.md @@ -0,0 +1,14 @@ +--- +title: "Customer Audience" +type: OpenSpec +status: Draft +domain: OneTargeting +--- + +# Customer Audience + +## Requirement Definition +No requirements defined yet. + +## Business Rules +No business rules defined yet. diff --git a/docs/specs/onetargeting/segmentation.md b/docs/specs/onetargeting/segmentation.md new file mode 100644 index 0000000..2322c00 --- /dev/null +++ b/docs/specs/onetargeting/segmentation.md @@ -0,0 +1,64 @@ +--- +title: "Segmentation" +type: OpenSpec +status: Draft +domain: OneTargeting +--- + +# Segmentation + +## Requirement Definition +Segmentation is a process to divide a customer base into smaller groups, providing a way to narrow down the target audience based on the types of products or services the customers have previously purchased. This allows businesses to create more personalized and effective marketing strategies for each segment, rather than adopting a one-size-fits-all approach. +In the system, a segment is a combination of one or more criteria. The same criteria set may be reused multiple times, allowing an efficient way to set up targeted customers. + +## Process Flow + +### Trigger +- User accesses the OneTargeting Module to create or update a new segment. + +### Pre-Conditions +- Users must have access rights in the Segmentation module. +- Depending on access rights, users can view, add, edit, or manually approve. +- All criteria are defined as attributes and are available for setup. + +## Business Rules +- The OLS system uses Query Builder to build queries for segmentation. +- Business segments target customers using the following criteria combinations: + +### Criteria Matrix + +| Segment Group | Criteria Group | Combination by Following Criteria | Segment Example | +|---|---|---|---| +| Demographic Segmentation | Customer Profile | Age | Life Cycle segment: Children (0-14), Youth (15-24), Adults (24-64), Seniors (65+) | +| Demographic Segmentation | Customer Profile | Last Name | | +| Demographic Segmentation | Customer Profile | First Name | | +| Demographic Segmentation | Customer Profile | Income | Income segment: High-Income, Middle-Income, Low-Income | +| Demographic Segmentation | Customer Profile | Gender | Male, Female | +| Demographic Segmentation | Customer Profile | Marital Status | Single, Married | +| Demographic Segmentation | Customer Profile | DOB | Generation segment: Gen Z (1997-2012), Gen Y (1981-1996), Gen X (1965-1980), Gen W (1946-1964) | +| Demographic Segmentation | Customer Profile | Location (Country/State/City/Zip Code) | Geography segment: International, Urban, Suburban, Mountain | +| Demographic Segmentation | Customer Profile | Customer's Tenure | Customer Tenure Segment (based on Registration): New (<1 yr), Early-tenured (1-2 yrs), Mid-Tenured (2-5 yrs), Long-tenured (>5 yrs) | +| Demographic Segmentation | Customer Profile | Account's Tenure | Account Tenure Segment (based on AOD): New (<1 yr), Early-tenured (1-2 yrs), Mid-Tenured (2-5 yrs), Long-tenured (>5 yrs) | +| Demographic Segmentation | Customer Profile | Account's Status | | +| Demographic Segmentation | Customer Profile | Next AOD | | +| Demographic Segmentation | Customer Profile | Customer's status | | +| Behavior Segmentation | Transaction | Last transaction / Integration | Churned customer: Last transaction > 6 months ago and status is active | +| Behavior Segmentation | Transaction | Transaction Frequency | Total number of transactions or Average transaction frequency in a specific period (day/week/month/quarter/year). Segment: High-Value, Medium-Value, Low-Value | +| Behavior Segmentation | Transaction | Customer Recency | When was the last transaction/integration | +| Behavior Segmentation | Transaction | Total spending value | Total net transaction amount | +| Behavior Segmentation | Transaction | Transaction Date | Peak-Time customer (special day, weekend, midnight). Consistent-Time Customers (first day of month). Flexible-Time Customers (specific day) | +| Behavior Segmentation | Transaction | Transaction Time | | +| Behavior Segmentation | Transaction | Merchant (Corporation/Chain/Store/MCC) | Used with another criteria or alone to create specific segments | +| Behavior Segmentation | Transaction | Merchant Group | | +| Behavior Segmentation | Transaction | Transaction Description | | +| Behavior Segmentation | Transaction | Transaction Category | | +| Behavior Segmentation | Transaction | Transaction Gross Amount | | +| Behavior Segmentation | Transaction | Transaction Nett Amount | | +| Flexible Segment | Attribute | Attribute Criteria | | +| Psychographic Segmentation | Item | Favorite Category | Life Style segment, Interest segment, Opinion segment | +| Psychographic Segmentation | Item | Favorite Item | | + +Note: Psychographic segmentation data will be collected from surveys upon OneDisplay implementation. + +## Post-Conditions +- Each segment is used to define the targeting customer in the marketing module. diff --git a/docs/specs/reference/change_history.md b/docs/specs/reference/change_history.md new file mode 100644 index 0000000..35705b0 --- /dev/null +++ b/docs/specs/reference/change_history.md @@ -0,0 +1,46 @@ +--- +title: "Change History" +type: OpenSpec +status: Draft +domain: Reference +--- + +# Change History + +| Version | Date | Updated By | Change Description | +|---|---|---|---| +| 1.0 | 14/12/2023 | Trangdth, Maivt | The first version including: Customer Management, Campaign Management, Draft OMR module | +| 1.1 | 18/12/2023 | Trangdth | Customer 360: Add more detail for Account/Card information.
Section 5.1: Add filter, Add/update some fields in the screen.
Section 5.5 Card: Update description and logical.
Section 5.9 and 5.10: Update label | +| 1.2 | 20/12/2023 | Trangdth | Update the Pool Conversion Rate module.
Update data type DD/MM/YYYY into "Date" to respect the date time configuration format.
Update the Card logically: Add more detail when updating the card.
Update customer Management module section 5: an update based on Sang's requirement (Customer/Account/dashboard/transaction history/attribute/counter).
Update Vietnamese fields and some cosmetic issues | +| 1.3 | 27/12/2023 | Trangdth | Update customer block data type from X(20) into X(10).
Section 5.4 update the card activation date from mandatory to optional.
Section 5.2.6: Update the logic of most items.
Section 4.7- Pool Conversion Rate: update field name and logic for pool conversion rate.
Section 4.12 Campaign Rule Criteria: Correction some typos and add more detail for txncat criteria.
Pool Definition: remove the item code field (move to Rule setup). Add some validations(red line).
Add CEP rule type | +| 1.4 | 02/01/2024 | Trangdth | Add REP Rule.
Update Pool Definition Screen: screen and logical.
Update Counter Defintion to match with PMS and add more detail. | +| 1.5 | 10/01/2024 | Trangdth | Update API information for REP rule.
Update API information for CEP Rule.
Add document for Formula (UI+ Logical) | +| 1.6 | 16/01/2024 | Trangdth | Add Section 5.15 Awward Transaction Entry Screen.
Update Section 4.8 Counter Definition: Add Late txn posting option. Update logical on post-condition.
Update Pool Defintion: add more detail for ATG field.
CEP/REP: Update API for run schedule | +| 1.7 | 24/01/2024 | Trangdth | Counter definition: Update: Active "First start date is fixed" for "Days from COD" period unit.
Pool conversion rate: Update code from X(03) into X(05).
Card - Update data type and logic for Old Card number. Update the relationship of Account type and Account number.
Add Campaign : Add description for CP module | +| 1.8 | 25/01/2024 | Trangdth | Add section 4.12 Campaign Rule logical for Award/redem/Adjust rule type.
Add section 4.9 Transaction Category module | +| 1.9 | 30/01/2024 | Trangdth | Campaign: change data type and add alidation for Campaign type.
CEP: Update data type for Run schedule and change the sequence order in Layout.
REP: Update data type for Run schedule and change the sequence order in Layout | +| 1.10 | 19/02/2024 | Trangdth | Section 4.17 : CEP : Update API information of following fields: - Account with blocked Card - Post Transactions under PA Account selected based on | +| 1.11 | 21/02/2024 | Trangdth | Section 4.12.6 : Campaign Rule/Business Rule : Update validation of "Apply after Cap value " field | +| 1.12 | 05/03/2024 | Trangdth | Correction typo.
Section 4.13: Rule criteria: Update more detail and req.
Section 5.11 Adjustment : Add field and update logical of quick view | +| 1.13 | 07/03/2024 | Trangdth | Correction typo.
Section 5.11 Adjustment: Update Vietnamese label and correction logical.
Section 5.12 Transfer Balance: Add fields, Update logical, Add User Stories and Accepted Criterions.
Section 5.13 Re-instatement : Add fields, Update logical , Add User Stories and Accepted Criterions | +| 1.14 | 11/03/2024 | Trangdth | 5.2.6.3: Account/Card information: Update logical and data entities.
5.11 Adjust: Add US and AC.
5.12 Award Transaction: Add fields, Update logical , Add User Stories and Accepted Criterions.
5.5 Pool Balance Detail: Correction and Add User Stories and Accepted Criterions | +| 1.15 | 12/03/2024 | Trangdth | Section 4.15 contributor setting: Update data type of "Contributor Percentage" field.
Section 4.14 Campaign Rule formula: Remove validation of F5/Multiplier | +| 1.16 | 20/03/2024 | Trangdth | Section 7: Added OneCatelogue module, including: Item master/ Catalogue/Category/Voucher management.
Section 4.12 Campaign Rule: Added Post-condition for Amount to Use feature (Transaction Processing with Amount to use).
Secttion 4.6 Pool Definition: Remove CP Rule name and change data for "List Of Campaign" listing page. | +| 1.17 | 25/03/2024 | Trangdth | Add section 7.5: Item Price.
Update section 5.14 Item redemption to match onecatalogue logical.
Update quick view of Adjust/transfer balance/Re-instatement/Award. Take note that I just remove redundant information and update the description to be more clearly. The logical is not changed. | +| 1.18 | 03/04/2024 | Trangdth | Added section 2 (2.1/ 2.2/2.3/2.4) OneAccess module, including Overview, User Group, Permission Management and User Profile.
4.6 Pool Definition: Correction typo.
4.13 Rule Criteria: Correct index of operator on each data type.
4.14 Campaign Formula : Update Formula logical on TP sides | +| 1.19 | 12/04/2024 | Trangdth | Correction typo.
Section 4.13 Rule Criteria: Update logical of String data type (TP sides only) | +| 1.20 | 15/04/2024 | Trangdth | Section 5.6 Transaction History: Update sketch, Update US and AC, update Business rule.
Section 5.11 Adjustment: Update sketch. Update US and AC, update business rule.
Section 5.15 Award : Update US and AC | +| 1.21 | 16/04/2024 | Trangdth | Section 4.18 Added Item Redemption Rule Type | +| 1.22 | 19/04/2024 | Trangdth | Section 7: OneCatalogue: Typ0 correction and update section 7.6 Voucher Code module.
Section 4.12.7 CP rule : Add Award limit use case in FSD | +| 1.23 | 26/04/2024 | Trangdth | Section 5.6 Transaction History: Added "Pool Unit Amount" on Award quick view.
Section 5.15 Item Redemption: update business req/ Flow and post condition.
Section 7.5 Item Price Update flow/ post condition / add effective date | +| 1.24 | 02/05/2024 | Trangdth | Section 4.6 Pool Definition : Add validation for Card entity level field.
Section 4.13 Campaign Rule Criteria : Correction description of filter value of Number data type.
Section 5.14 Item Redemption : Correction Wireframe and update business rule.
Section 7.3 Item master: Add Face value and correction typo | +| 1.25 | 06/05/2024 | Trangdth | Addded description to clear "Balance detail" quick view of Award and Adjustment Transaction Screen.
Section 5.14 Item redemption : Added User Stories and Acceptance criteria | +| 1.26 | 09/05/2024 | Trangdth | Section 4.13 Campaign Rule Criteria: Update String data type: Use Input tag instead of delimiter in case there are many filter value if input type as "value" | +| 1.27 | 20/05/2024 | Trangdth | Section 4.13 Campaign Rule Criteria: Add more description for Date Data type.
Section 4.12 Campaign Rule: Add new fields/validation to handle Evoucher Pool and Adjust Rule Type. | +| 1.28 | 24/05/2024 | Trangdth | Section 4.6: Pool Definition: Add validation for Precision of Pool.
Section 7.6: Voucher code: Change field name from Voucher type into Promotion Type.
Section OneAdmin Overview: Update and correction section 3.1/3.2/3.3.
Section 7.5 Item price: Add item code to avoid confuse.
Customer Profile: Add "Address Type: field.
Section 5.6 Item redemption Entry: Remove redudant field and add validation | +| 1.29 | 30/05/2024 | Trangdth | Counter Definition: Add validation for "Bucket period Unit".
Campaign rule: Remove API of master data filed Remove Voucher code Add item code | +| 1.30 | 17/06/2024 | Trangdth | Section 5.9/5.10: Attribute/Counter: Correction and update more detail.
Section 5.6: Transaction History: Remove Deleted field, correction typo and update detail for quick view.
Section 5.11/5.12: Adjustment /Transfer balance: Correction process flow and business.
Section 5.15: Award transaction: Update process flow on TP side.
Other section: Update and correct to match with the system | +| 1.31 | 19/06/2024 | Trangdth | All sections: Add more description for number field if needed | +| 1.32 | 24/06/2024 | Trangdth | Campaign formula /Business rule : Update validation for "Amount " field (F4/F6).
Section 5.2.6.2: Customer's rewards statistic : Remove total spending, Update logical for Points/Cash back | +| 1.33 | 12/07/2024 | Trangdth | Add section 3: Oneadmin: Overview about the OLS system : Search/Filter/Add/View/Edit/Approve/History.
Add Section 4: Application Parameter.
Update section 6.2.6: Customer 360=>Business Rule: Correct typo. Add more detail for pool balance information and most redeemed item | +| 1.34 | 11/11/2024 | Trangdth | Correction typos | diff --git a/docs/specs/reference/document_references.md b/docs/specs/reference/document_references.md new file mode 100644 index 0000000..43e86d0 --- /dev/null +++ b/docs/specs/reference/document_references.md @@ -0,0 +1,15 @@ +--- +title: "Document References" +type: OpenSpec +status: Draft +domain: Reference +--- + +# Document References + +| Ref# | Description / File Name | +|---|---| +| R01 | | +| R02 | | +| R03 | | +| R04 | | diff --git a/docs/specs/reward_campaign/account_type_group.md b/docs/specs/reward_campaign/account_type_group.md new file mode 100644 index 0000000..8bd3b92 --- /dev/null +++ b/docs/specs/reward_campaign/account_type_group.md @@ -0,0 +1,42 @@ +--- +title: "Account Type Group" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Account Type Group (ATG) + +## Requirement Definition +Groups Account Types (Product Account Level + Type) and orders them in priority sequence. ATGs are assigned to Reward Pools to restrict which accounts can earn into the pool, and to define the priority sequence for deducting points during redemptions at Customer-level pools. + +## Process Flow + +### Pre-Conditions +- Users must have access rights. +- Account Types must exist in OLS. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Account Type Group Id | Identifier. | String (10) | Required. Unique. | +| Description | Description. | String (100) | Required. | + +#### Account Type Sequence +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Product Account Level | PAL. | Enum (Lookup) | Required. | +| Product Account Type | PAT. | Enum (Lookup) | Required. | +| Sequence No | Priority sequence (lowest is highest priority). | Integer | Required. | + +### Execution +- **Redemption Priority**: When redeeming from a Customer pool, buckets with the same expiry date are deducted in ascending order of the Account Type's Sequence No in the pool's ATG. Account types NOT in the ATG have highest priority. +- **Posting Priority**: If a transaction arrives with only a CIF Number (no Account Number), the system uses the ATG to find eligible accounts for that CIF. If multiple exist, the one with the lowest Sequence No in the ATG is selected for the transaction. +- **Validation**: Incoming transactions must map to an Account Type that is within the Pool's ATG. If the intersection of Customer's Accounts and the Pool's ATG is null, the transaction is rejected. + +## Exception Flow +- TP validation failures reject the transaction. diff --git a/docs/specs/reward_campaign/campaign_insight.md b/docs/specs/reward_campaign/campaign_insight.md new file mode 100644 index 0000000..29582b3 --- /dev/null +++ b/docs/specs/reward_campaign/campaign_insight.md @@ -0,0 +1,38 @@ +--- +title: "Campaign Insight" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Campaign Insight + +## Requirement Definition +Combines data from across multiple data sources into charts to track and display customer and campaign activities, providing a high-level performance overview. + +## Process Flow + +### Pre-Conditions +- Users must have access rights to the Campaign Insight module. + +## Business Rules + +### Data Schema + +#### Key Metrics Displayed +- Total Redeemed Points. +- Total Members (Active vs Inactive). +- Total Partners. +- Total Active Reward Campaigns. + +#### Charts & Visualizations +- **Campaign Performance**: Displays the Top N Campaigns by awarded points, comparing "Target Avg Transaction Value" vs actual awards. +- **Top Channels**: Breakdown of transactions by entry channel (e.g., EDC, Web, Call Center). +- **Points Awarded vs Redeemed**: Time-series comparison of point inflows vs outflows over a period. + +### Execution +- **View-only dashboard.** +- Real-time or near-real-time aggregation depending on batch job configuration for analytics. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/campaign_rule_contributor.md b/docs/specs/reward_campaign/campaign_rule_contributor.md new file mode 100644 index 0000000..b5fc6eb --- /dev/null +++ b/docs/specs/reward_campaign/campaign_rule_contributor.md @@ -0,0 +1,35 @@ +--- +title: "Campaign Rule - Contributor Settings" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Campaign Rule - Contributor Settings + +## Requirement Definition +Configures funding contributors for a reward. If a reward is funded by entities other than the transacting merchant (or split between them), Contributors define the split percentage. + +## Process Flow + +### Pre-Conditions +- Rule must be created. +- Contributing merchants (Chains) must exist in OLS. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Contributor | The Chain funding the reward. | Enum (Lookup) | Required. Unique per rule. | +| Contributor Percentage | Percentage of cost to fund. | Decimal | Required. > 0. | +| Absorb Remainder | Absorbs rounding remainders. | Boolean | Required. Exactly one must be true. | + +### Execution +- Total contribution must equal 100%. +- Transaction processing splits the awarded value across Contributors based on percentages. +- If no contributors are configured, the transacting Merchant (Chain) absorbs 100% of the cost. + +## Exception Flow +- Validation failures block saving. diff --git a/docs/specs/reward_campaign/campaign_rule_criteria.md b/docs/specs/reward_campaign/campaign_rule_criteria.md new file mode 100644 index 0000000..bb90b61 --- /dev/null +++ b/docs/specs/reward_campaign/campaign_rule_criteria.md @@ -0,0 +1,40 @@ +--- +title: "Campaign Rule Criteria" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Campaign Rule Criteria + +## Requirement Definition +Defines the conditions a transaction must meet to trigger a Campaign Rule. Built using a drag-and-drop Query Builder interface. + +## Process Flow + +### Pre-Conditions +- Rule must be created. + +## Business Rules + +### Data Schema +Criteria are categorized into: Customer, Account, Transaction, Attribute, Counter, Merchant. + +#### Operators +| Data Type | Operators | Logic Type / Details | +|---|---|---| +| String / Lookup | Is in, Is not in, Contains, Equal to, Not equal to, Starts with, Ends with, Is null, Is not null. | Validates against provided text or list of values. | +| Number | Equal, Not equal, Less than, Less/equal, Greater, Greater/equal, Between, Null, Not null. | Standard numerical comparison. | +| Date | On or before, On or after, Fixed date, Between date range, Between period from N. | Complex date logic (e.g. comparing Day/Month regardless of year, comparing "3 months ago"). | +| Day of week | Is the day of week. | Monday-Sunday. | +| Time | Is between. | Time-of-day comparison (00:00 - 23:59). | +| Boolean | Is. | True / False. | + +### Execution +- Supports AND and OR logic grouping. +- A single rule can have multiple groups, but inter-group logic must be consistent (all ANDs or all ORs). +- NOT toggles support exclusion. +- All criteria defined in the rule must evaluate to true (for AND) or at least one (for OR) to trigger the Formula execution. + +## Exception Flow +- Validation failure means the rule is not triggered (proceeds to next rule in Execution Sequence). diff --git a/docs/specs/reward_campaign/campaign_rule_formula.md b/docs/specs/reward_campaign/campaign_rule_formula.md new file mode 100644 index 0000000..3527ab2 --- /dev/null +++ b/docs/specs/reward_campaign/campaign_rule_formula.md @@ -0,0 +1,27 @@ +--- +title: "Campaign Rule Formula" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Campaign Rule Formula + +## Requirement Definition +Configures the mathematical formula used to calculate the reward, redemption value, or counter increment for a given Rule. + +## Process Flow + +### Pre-Conditions +- Rule must be created. + +## Business Rules + +### Execution +- Formulas act on the "Amount to Use (A)" defined in the Rule Header. +- Support mathematical operations (e.g., A * 0.05, A + 10). +- Formulas can be assigned to different tiers based on criteria. +- Formulas can be used to update Pool Balances, or simply update a Counter / Attribute without impacting a Pool. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/campaign_structure.md b/docs/specs/reward_campaign/campaign_structure.md new file mode 100644 index 0000000..ebbfbb9 --- /dev/null +++ b/docs/specs/reward_campaign/campaign_structure.md @@ -0,0 +1,40 @@ +--- +title: "Campaign Structure" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Campaign Structure + +## Requirement Definition +Defines the conceptual structure and mechanics of how reward campaigns operate in OLS, managing the issuance and redemption of various reward types (Points, Cash Rebates, eCoupons, Lucky Draw chances). + +## Process Flow + +### Pre-Conditions +- N/A (Core concepts) + +## Business Rules + +### Types of Campaign Mechanics +1. **Award on Every Transaction**: Rewards are determined and given at the time the transaction is processed (real-time or batch). +2. **Accumulate Then Award**: Rewards depend on cumulative criteria (e.g., total spend over a month). Transactions update Counters, and at the end of the period, a separate process extracts the Counter value to determine the award. +3. **Auto-redemption Campaigns**: Awarded quantities (e.g., Cash Rebates) are immediately "redeemed" and sent to an external system (like a Core Banking system) to credit the customer's account. + +### Reward Pool Structure & Deduction +- Earnings are tracked in "Pools" by reward type. +- Pools belong to Loyalty Accounts (or specific Accounts/Cards). +- Stored value is tracked in Buckets segregated by Expiry Date and Account Type. +- **Redemption Sequence**: + - Deducted in ascending Expiry Date (earliest expiring first). + - If identical expiry dates, sorted by a pre-configured Account Type priority sequence. + +### Counters +- A Counter tracks a quantity (e.g., spend amount, transaction frequency) over a defined time period (Bucket). +- Entities tracked: Customer, Account, Card, Store, Chain, etc. +- Quantities tracked: Gross Amount, Nett Amount, Points, Transaction Count, Custom Quantities. +- Counter Periods: Days, Weeks, Months, Quarters, Years, Fixed Date, No Expiry, Days/Months/Quarters from Account Open Date. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/cep_rule.md b/docs/specs/reward_campaign/cep_rule.md new file mode 100644 index 0000000..c3e2db8 --- /dev/null +++ b/docs/specs/reward_campaign/cep_rule.md @@ -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 diff --git a/docs/specs/reward_campaign/counter_definition.md b/docs/specs/reward_campaign/counter_definition.md new file mode 100644 index 0000000..bd0be45 --- /dev/null +++ b/docs/specs/reward_campaign/counter_definition.md @@ -0,0 +1,45 @@ +--- +title: "Counter Definition" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Counter Definition + +## Requirement Definition +Defines conceptual entities that track quantities (spend amount, transactions, points) over defined periods of time. + +## Process Flow + +### Pre-Conditions +- Users must have access rights. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Counter Id | Unique identifier. | String (10) | Required. | +| Counter Name | Descriptive name. | String (50) | Required. | +| Effective From Date | Start date of counter effectiveness. | Date | Required. | +| Effective To Date | End date of counter effectiveness. | Date | Required. | +| Entity | Level of tracking (Cust, Acct, Card, Store, etc).| Enum (Lookup) | Required. | +| Bucket Period Unit | Time period for buckets (Day, Month, etc). | Enum (Lookup) | Required. | +| Bucket End Date | Used if Unit is Fixed Date. | Date | Conditional. | +| Bucket Period Duration(N)| Length of the period unit. | Integer | Conditional. | +| What to count | Entity to track (Gross Amt, Txns, Points, etc). | Enum (Lookup) | Required. | +| Reset type | Reset to 0, or keep remainder. | Enum (Lookup) | Required. | +| Reset Value | Threshold at which counter resets and new bucket starts. | Decimal | Required. Default 999999999. | +| First Start Date Is Fixed| Boolean flag. | Boolean | Conditional. | +| First Start Date | Starting date for the first bucket. | Date | Conditional. | +| Update State When | When to close bucket (On extract, On award). | Enum (Lookup) | Required. | +| Late Posting Option | Update late value vs Current bucket. | Enum | Required. | + +### Execution +- If counter ID has existing values in `counter_stock`, definition cannot be changed (except Name/Desc/End Date). +- Late Posting determines how transactions with backdated post dates update counters (update the "Late Counter Value" or force update into the currently active time bucket). + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/external_transaction_code.md b/docs/specs/reward_campaign/external_transaction_code.md new file mode 100644 index 0000000..44fb39f --- /dev/null +++ b/docs/specs/reward_campaign/external_transaction_code.md @@ -0,0 +1,33 @@ +--- +title: "External Transaction Code" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# External Transaction Code + +## Requirement Definition +Maps incoming transaction codes from external systems (e.g., Card System) to OLS Transaction Codes. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the module. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| External Transaction Code | Source System Transaction Code. | String (10) | Required. | +| Description | Description for reference. | String (30) | Required. | + +### Execution +- An External System TC is the first key used to locate the corresponding OLS TC for processing. +- Each External TC must be mapped to an OLS TC. +- Supports Maker-Checker approval workflow (Pending -> Active). + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/item_redemption_rule.md b/docs/specs/reward_campaign/item_redemption_rule.md new file mode 100644 index 0000000..baeab15 --- /dev/null +++ b/docs/specs/reward_campaign/item_redemption_rule.md @@ -0,0 +1,36 @@ +--- +title: "Item Redemption Rule" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Item Redemption Rule + +## Requirement Definition +Evaluates item redemption transactions (e.g. redeeming an eVoucher or physical item from a catalog). + +## Process Flow + +### Pre-Conditions +- Users must have access rights. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Rule Type | Item Redemption (ITRD). | Enum | Required. | +| Message Template ID | SMS/Email template if rule hit. | Enum (Lookup) | Optional. | +| Transaction Code | TC used to post the redemption. | Enum (Lookup) | Required. | + +### Execution +- Same criteria evaluation approach as Award rules. +- There is NO reward pool, formula, or contributor attached to this rule type. +- The redemption pool to deduct from is configured separately in the Item Price configuration. +- To post an item redemption, the transaction must pass the validation criteria of the Item Redemption Rule linked to the redemption TC. + +## Exception Flow +- Criteria failure blocks the item redemption transaction. diff --git a/docs/specs/reward_campaign/ols_transaction_code.md b/docs/specs/reward_campaign/ols_transaction_code.md new file mode 100644 index 0000000..ef28ccf --- /dev/null +++ b/docs/specs/reward_campaign/ols_transaction_code.md @@ -0,0 +1,34 @@ +--- +title: "OLS Transaction Code" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# OLS Transaction Code + +## Requirement Definition +Every transaction processed against Campaign Rules must have an OLS Transaction Code (TC). It acts as the primary key to locate relevant Campaign Rules. + +## Process Flow + +### Pre-Conditions +- Users must have access rights in the module. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| OLS Transaction Code | The internal transaction code. | String (10) | Required. | +| Description | Description of the code. | String (30) | Required. | +| External Transaction Code | The mapped external TCs. | List of Strings | Optional. Many External TCs can map to one OLS TC. | +| Reversal Indicator | Indicates if this is a reversal. | Boolean | Default False. | + +### Execution +- Supports internal transactions (e.g., CEP Batch generated) that do not have an External TC. +- Supports Maker-Checker approval workflow (Pending -> Active). + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/pool_definition.md b/docs/specs/reward_campaign/pool_definition.md new file mode 100644 index 0000000..a6662c8 --- /dev/null +++ b/docs/specs/reward_campaign/pool_definition.md @@ -0,0 +1,68 @@ +--- +title: "Pool Definition" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Pool Definition + +## Requirement Definition +Defines Reward Pools which track stored values (Points, Cash Rebates, Lucky Draw chances, eVouchers). Pools dictate expiry policies, entity tracking levels (Customer, Account, Card), and velocity controls. + +## Process Flow + +### Pre-Conditions +- Users must have access rights. +- Pool Conversion Rate must be active. +- Account Type Groups (if applicable) must be active. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Pool Id | System-generated identifier. | String (10) | Required. | +| Pool Name | Name of the pool. | String (30) | Required. | +| Pool Type | Points, Cash Rebate, Lucky Draw, eVoucher. | Enum | Required. | +| Expiry Policy | Method to calculate expiry date. | Enum (Lookup) | Required (except eVoucher). | +| Policy Parameter N | Numeric parameter for Expiry Policy. | Integer | Conditional based on policy. | +| Expiry Date | Fixed expiry date. | Date | Conditional (if policy is Fixed Date). | +| Ripening Period | Days before reward is redeemable. | Integer | Conditional. Default 0. | +| Conversion Rate Code | Currency representing a unit of reward. | Enum (Lookup) | Conditional. | +| Allow Negative Balance | Allow pool to go negative on adjust/cancel. | Boolean | Conditional. Default False. | +| Precision | Number of decimal places. | Enum (Lookup) | Conditional. Default 2. | +| Account Type Group | Restricts earning to specific accounts. | Enum (Lookup) | Optional. | +| Grace Period | Months to keep expired buckets before forfeit. | Integer | Optional. | +| Entity Level | Tracks balance at Customer, Account, Card. | Enum | Required. | + +#### Product Specific Policy +Overrides general expiry policy for specific Account Types. +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Product Account Level | PAL. | Enum (Lookup) | Required. | +| Product Account Type | PAT. | Enum (Lookup) | Required. Unique per row. | +| Expiry Policy | Specific expiry policy. | Enum (Lookup) | Required. | + +#### Velocity Control +Defines thresholds for sending alerts (Exception Alert Reports). +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Maximum | Threshold limit. | Decimal | Required. | +| Transaction Type | Award, Redeem, Adjust. | Enum | Required. | +| Units | Per Pool Units or Per Transaction. | Enum | Required. | +| Per Entity 1 | Customer, Account, Card. | Enum | Optional (System-wide if null). | +| Per Entity 2 | Corporation, Chain, Store, Terminal. | Enum | Optional. | +| Per Period | Quarter, Month, Week, Day. | Enum | Required. | +| Alert Template | Message template for alert. | Enum | Required. | +| Alert Group | Recipient group (SMS/Email). | Enum | Required. | + +### Execution +- Precision cannot be reduced after transactions are posted. +- Entity Level cannot be moved downwards (e.g., Customer to Card) after transactions are posted. +- Evoucher pools have No Expiry, no Precision, and no Negative Balances. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/rep_rule.md b/docs/specs/reward_campaign/rep_rule.md new file mode 100644 index 0000000..8400950 --- /dev/null +++ b/docs/specs/reward_campaign/rep_rule.md @@ -0,0 +1,39 @@ +--- +title: "Redemption Extract & Process (REP) Rule" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Redemption Extract & Process (REP) Rule + +## Requirement Definition +Extracts reward pool balances to automatically output them as Cash Rebates or Partner Points to an external destination system (like a Core Banking system or Airline Partner). + +## Process Flow + +### Pre-Conditions +- Users must have access rights. + +## Business Rules + +### Data Schema + +#### Extraction Settings +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Rule Type | REP. | Enum | Required. | +| Pool to Extract | Pool containing the balance. | Enum (Lookup) | Required. | +| Minimum Pool Balance | Threshold before extraction. | Decimal | Optional. | +| Trigger Campaign rule | Validates criteria before extraction. | Boolean | Default False. | +| Redeem TC | TC used to post the redemption. | Enum (Lookup) | Required. | +| Output Redemption As | Format/System of output (e.g. Cash Rebate file).| Enum (Lookup) | Required. | +| Run schedule | Day, Month, Annual, Stmt Cycle, N days AOD. | Enum (Lookup) | Required. Defines execution frequency. | + +### Execution +- Evaluated by the REP Batch scheduled at end-of-day. +- The full eligible amount of the Pool balance is deducted and output to a file (e.g., `OLSCRTXN`). +- If `Trigger Campaign rule` is true, an intermediate Redeem rule evaluates criteria, and the extracted amount is the minimum of (Available Balance, Formula Result). + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/reward_campaign.md b/docs/specs/reward_campaign/reward_campaign.md new file mode 100644 index 0000000..d648c43 --- /dev/null +++ b/docs/specs/reward_campaign/reward_campaign.md @@ -0,0 +1,37 @@ +--- +title: "Reward Campaign" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Reward Campaign + +## Requirement Definition +Acts as the parent container for Business Rules (Campaign Rules) controlling rewards and redemptions. Campaigns can be "Base" (core product) or "Tactical" (short-term objectives). + +## Process Flow + +### Pre-Conditions +- Users must have access rights. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Identifier. | String (10) | Required. | +| Campaign Name | Name of the campaign. | String (50) | Required. >= 10 chars. | +| Campaign Owner | Owner reference. | String (50) | Optional. | +| Campaign Description | Description. | String (500) | Optional. | +| Campaign Type | Base or Tactical. | Enum (Lookup) | Required. | +| Target Active Customer Count | Expected participant count. | Integer | Optional. Insight metric. | +| Target Avg Transaction Value | Expected spend value. | Decimal | Optional. Insight metric. | +| Campaign Period | Earliest Rule start to latest Rule end. | Date Range | Read-only based on Rules. | + +### Execution +- Campaigns simply group Rules logically. The actual execution logic is defined in the child Campaign Rules. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/reward_campaign_rule.md b/docs/specs/reward_campaign/reward_campaign_rule.md new file mode 100644 index 0000000..2cd000c --- /dev/null +++ b/docs/specs/reward_campaign/reward_campaign_rule.md @@ -0,0 +1,64 @@ +--- +title: "Reward Campaign Rule" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Reward Campaign Rule + +## Requirement Definition +Campaign Rules define the business rules for giving a reward, defining conditions for redemption, or triggering batch updates (CEP/REP). This spec covers standard Award, Redeem, and Adjust rules. + +## Process Flow + +### Pre-Conditions +- Users must have access rights. + +## Business Rules + +### Data Schema + +#### General Information +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Campaign ID | Parent campaign. | Enum (Lookup) | Required. | +| Campaign Rule ID | System-generated identifier. | String (10) | Required. | +| Campaign Rule Name | Name of the rule. | String (50) | Required. | +| Rule Type | Award, Redeem, Adjust. | Enum (Lookup) | Required. | +| Effective Date From | Start of effective period. | Date | Required. | +| Effective Date To | End of effective period. | Date | Required. | + +#### Rule Setting +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Effective Period is Based On| Transaction Date vs Post Date. | Enum | Required. | +| Pool | Reward pool applied to this rule. | Enum (Lookup) | Required. | +| Item Code | eVoucher item if Pool Type is eVoucher. | Enum (Lookup) | Conditional. | +| Message Template ID | SMS/Email template if rule hit. | Enum (Lookup) | Optional. | +| Stop if criteria met | If true, halts further rule evaluation for this TC. | Boolean | Default False. | +| Do not update pool | Rule updates Counters/Attributes but not the pool. | Boolean | Default False. | + +#### Transaction Code Linkage +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Transaction Code | TC that triggers this rule. | Enum (Lookup) | Required. | +| Execution Sequence | Priority order of execution. | Integer | Required. Unique per Rule Type + TC combo. | + +#### Formula Setting (If Rule Type requires formula) +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Amount to Use (A) | Derived amount (from tx data or counter). | Enum | Required. | +| Cap A not more than | Caps the input 'A'. | Decimal | Optional. | +| Formula Result is rounded | Down, Nearest, Up. | Enum | Required. | +| Award Limit (At Least) | Minimum guaranteed result. | Decimal | Optional. | +| Award Limit (No More Than) | Max limit (can be tied to a Counter). | Decimal | Optional. | + +### Execution +- An incoming transaction's TC is matched against Rules. +- Rules linked to the TC are evaluated in Execution Sequence order. +- If Rule Criteria (defined separately) pass, the Formula (defined separately) calculates the reward. +- If "Stop if criteria met" is true, processing halts. + +## Exception Flow +- N/A diff --git a/docs/specs/reward_campaign/transaction_category.md b/docs/specs/reward_campaign/transaction_category.md new file mode 100644 index 0000000..7a4ea1f --- /dev/null +++ b/docs/specs/reward_campaign/transaction_category.md @@ -0,0 +1,37 @@ +--- +title: "Transaction Category" +type: OpenSpec +status: Draft +domain: Reward Campaign Management +--- + +# Transaction Category + +## Requirement Definition +A reusable group of conditions/criteria that define a specific category of transactions (e.g., "Dining transactions in Foreign Currency"). Allows efficient and reusable setup of Campaign Rule Criteria without needing multiple duplicated rules. + +## Process Flow + +### Pre-Conditions +- Users must have access rights. +- Criteria attributes must exist in the system. + +## Business Rules + +### Data Schema + +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Transaction Category Code | Unique identifier. | String (5) | Required. | +| Transaction Category Name | Name of category. | String (50) | Required. | +| Description | Description for reference. | String (100) | Optional. | +| Configuration | Groupings of criteria (AND/OR). | Rule Builder | Required. Same structure as Rule Criteria. | + +### Execution +- Built using the Query Builder UI. +- Supports nested AND/OR logic. +- Includes NOT operators for exclusions. +- A Transaction Category acts as a single virtual criterion when configuring a Campaign Rule. + +## Exception Flow +- N/A diff --git a/docs/specs/system_management/application_parameter.md b/docs/specs/system_management/application_parameter.md new file mode 100644 index 0000000..6dc57f1 --- /dev/null +++ b/docs/specs/system_management/application_parameter.md @@ -0,0 +1,64 @@ +--- +title: "Application Parameter" +type: OpenSpec +status: Draft +domain: System Management +--- + +# Application Parameter + +## Requirement Definition +The "Application Parameters" module provides a means to maintain a set of application control parameters that define system behavior in relation to user authentication and display formats. This includes password policy parameters, session time-outs, and system display formats. + +## Process Flow + +### Trigger +- User accesses the Application Parameters module under System Management. + +### Pre-Conditions +- Users must have access rights to the Application Parameters module. +- Depending on access rights, users can view, add, or edit parameters. + +## Business Rules +- All parameters are pre-defined by the system with default values. +- Users with appropriate rights can modify these parameter values. + +### Data Schema + +#### Access Control Parameters +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Same User Cannot Approve | Allow/Disallow the user to approve/reject the record they created. | Boolean | Default: False | +| Same User Cannot Modify Own Profile | Allow/Disallow the user to change their profile in the system. | Boolean | Default: False | +| User Session Inactivity Time-out | The user session ends if there are no user actions for N minutes. Alert message required on timeout. | Integer | Default: 30 | +| Maximum Failed Forgotten Password Attempts | User ID is blocked from further log-ins and profile suspended until reset if invalid passwords exceed this limit consecutively. | Integer | Default: 5 | +| Inactivate User Id after N days of no log-ins | User status is automatically set to inactive until reset if not logged in for the specified number of days. | Integer | Default: 30 | +| Remind User to Change password N Days Before | System notifies the user to change the password N days before expiration upon login. | Integer | Default: 5 | +| Password expiration (days) | Number of days after which a new password expires. Account is locked post-expiration until admin unlocks. | Integer | Default: 180 | +| Disallow re-use of the last N passwords | System restricts re-using the last N passwords to ensure regular updates. | Integer | Default: 2 | +| Maximum password length | Maximum length of a new password. | Integer | Default: 50 | +| Minimum password length | Minimum length of a new password. | Integer | Default: 8 | +| Password must at least N numeric digit | Minimum numeric digits required in a password. | Integer | Default: 1 | +| Password must have at least N upper case alphabet | Minimum uppercase letters required in a password. | Integer | Default: 1 | +| Password must have at least N lower case alphabet | Minimum lowercase letters required in a password. | Integer | Default: 1 | +| Password must have at least N special character | Minimum special characters required in a password. | Integer | Default: 1 | + +#### Display Setting Parameters +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Date format | Determines how dates are displayed throughout the system. | String | Enum: DD/MM/YYYY, DD-MM-YYYY, DDMMYYYY, MM/DD/YYYY, MM-DD-YYYY, YYYY/MM/DD, YYYY-MM-DD, DD,MM,YYYY. Default: DD/MM/YYYY | +| Time format | Determines how times are displayed throughout the system. | String | Enum: HH:mm:ss, HHmmss, HH,mm,ss, HH;mm;ss, HH/mm/ss. Default: HH:mm:ss | +| Amount display format | Determines how amounts are displayed throughout the system. | String | Enum: American (999,999.99), European (999.999,99) | + +#### Functionality Parameters +| Field Name | Description | Logic Type | Constraints / Rules | +|---|---|---|---| +| Processing Date | The date on which a transaction is processed. Used for testing only. If empty, the system date is used. | Date | Default: Empty | +| Allow Cross Function Update | Allows or disallows cross-updates between data created by different users. Applies to Customer, Account, and Card data. | Boolean | Default: True | + +## Post-Conditions +- The application uses the updated parameter configuration. +- Application parameter management is maintainable and scalable with other systems. + +## Exception Flow +No exceptions defined. diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/LoyaltyAgentApplication.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/LoyaltyAgentApplication.java index 9913082..c4293d2 100644 --- a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/LoyaltyAgentApplication.java +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/LoyaltyAgentApplication.java @@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class LoyaltyAgentApplication { - public static void main(String[] args) { + static void main(String[] args) { SpringApplication.run(LoyaltyAgentApplication.class, args); } } diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/FlywayConfig.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/FlywayConfig.java index d02a57d..ca8d556 100644 --- a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/FlywayConfig.java +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/FlywayConfig.java @@ -1,25 +1,22 @@ -package dev.sonpx.loyalty.agent.config; - -import org.flywaydb.core.Flyway; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.context.annotation.Configuration; -import org.springframework.lang.NonNull; -import javax.sql.DataSource; - -@Configuration -public class FlywayConfig implements BeanPostProcessor { - - @Override - public Object postProcessAfterInitialization(@NonNull Object bean, @NonNull String beanName) throws BeansException { - if (bean instanceof DataSource) { - System.out.println("--- Running Flyway Migration before DataSource is used ---"); - Flyway.configure() - .dataSource((DataSource) bean) - .locations("classpath:db/migration") - .load() - .migrate(); - } - return bean; - } -} +//package dev.sonpx.loyalty.agent.config; +// +//import org.flywaydb.core.Flyway; +//import org.springframework.beans.BeansException; +//import org.springframework.beans.factory.config.BeanPostProcessor; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.lang.NonNull; +//import javax.sql.DataSource; +// +//@Configuration +//public class FlywayConfig { +// +// @Bean +// public FlywayMigrationStrategy flywayMigrationStrategy() { +// return flyway -> { +// // Ví dụ: Xóa hết schema cũ rồi mới chạy migration (chỉ áp dụng thử nghiệm!) +// // flyway.clean(); +// flyway.migrate(); +// }; +// } +//} diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/McpConfig.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/McpConfig.java new file mode 100644 index 0000000..a065506 --- /dev/null +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/McpConfig.java @@ -0,0 +1,20 @@ +package dev.sonpx.loyalty.agent.config; + +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class McpConfig { + + @Bean + public static BeanFactoryPostProcessor lazyMcpClientPostProcessor() { + return beanFactory -> { + for (String beanName : beanFactory.getBeanDefinitionNames()) { + if (beanName.toLowerCase().contains("mcp") || beanName.toLowerCase().contains("toolcallbackprovider")) { + beanFactory.getBeanDefinition(beanName).setLazyInit(true); + } + } + }; + } +} diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/WebSocketConfig.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/WebSocketConfig.java index 66609e8..3d9cb99 100644 --- a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/WebSocketConfig.java +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/config/WebSocketConfig.java @@ -1,11 +1,16 @@ package dev.sonpx.loyalty.agent.config; +import java.security.Principal; +import java.util.Map; import java.util.UUID; import org.springframework.context.annotation.Configuration; +import org.springframework.http.server.ServerHttpRequest; import org.springframework.messaging.simp.config.MessageBrokerRegistry; +import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer; +import org.springframework.web.socket.server.support.DefaultHandshakeHandler; @Configuration @EnableWebSocketMessageBroker @@ -22,10 +27,10 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/ws") .setAllowedOriginPatterns("*") - .setHandshakeHandler(new org.springframework.web.socket.server.support.DefaultHandshakeHandler() { + .setHandshakeHandler(new DefaultHandshakeHandler() { @Override - protected java.security.Principal determineUser(org.springframework.http.server.ServerHttpRequest request, org.springframework.web.socket.WebSocketHandler wsHandler, java.util.Map attributes) { - return new java.security.Principal() { + protected Principal determineUser(ServerHttpRequest request, WebSocketHandler wsHandler, Map attributes) { + return new Principal() { private final String id = UUID.randomUUID().toString(); @Override public String getName() { diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/SimpleAgentExecutor.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/SimpleAgentExecutor.java index d76500a..25bcd5f 100644 --- a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/SimpleAgentExecutor.java +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/SimpleAgentExecutor.java @@ -58,8 +58,9 @@ public class SimpleAgentExecutor { * The LLM decides which tools to call via ReAct pattern. */ public void executeWithTools(ChatRequest request, String connectionSessionId, String conversationKey, Intent intent) { - List wrappedTools = toolInterceptor.getWrappedTools( - connectionSessionId, request.messageId(), AgentToolScope.READ_ONLY); + try { + List wrappedTools = toolInterceptor.getWrappedTools( + connectionSessionId, request.messageId(), AgentToolScope.READ_ONLY); String systemPrompt = promptBuilder.buildSystemPrompt(intent); String userPrompt = promptBuilder.buildUserPrompt(request); @@ -94,10 +95,34 @@ public class SimpleAgentExecutor { }, error -> { log.error("Error during SimpleAgent execution for connection {}: {}", connectionSessionId, error.getMessage(), error); - eventPublisher.error(connectionSessionId, request.messageId(), - "Xin lỗi, đã xảy ra lỗi khi xử lý yêu cầu. Vui lòng thử lại."); + String errorMessage = "Xin lỗi, đã xảy ra lỗi khi xử lý yêu cầu. Vui lòng thử lại."; + if (isConnectionError(error)) { + errorMessage = "Hiện tại dịch vụ AI (Ollama) đang tạm thời gián đoạn. Vui lòng thử lại sau."; + } + eventPublisher.error(connectionSessionId, request.messageId(), errorMessage); } ); + } catch (Exception e) { + log.error("Error setting up SimpleAgent for connection {}: {}", connectionSessionId, e.getMessage(), e); + String errorMessage = "Xin lỗi, không thể khởi tạo tool. Vui lòng thử lại."; + if (isConnectionError(e)) { + errorMessage = "Hiện tại dịch vụ tool (MCP) đang tạm thời gián đoạn. Vui lòng thử lại sau."; + } + eventPublisher.error(connectionSessionId, request.messageId(), errorMessage); + } + } + + private boolean isConnectionError(Throwable t) { + if (t == null) return false; + Throwable current = t; + while (current != null) { + String name = current.getClass().getName(); + if (name.contains("ConnectException") || name.contains("SocketException") || name.contains("ResourceAccessException")) { + return true; + } + current = current.getCause(); + } + return false; } /** @@ -136,8 +161,11 @@ public class SimpleAgentExecutor { }, error -> { log.error("Error during DirectChat execution for connection {}: {}", connectionSessionId, error.getMessage(), error); - eventPublisher.error(connectionSessionId, request.messageId(), - "Xin lỗi, đã xảy ra lỗi. Vui lòng thử lại."); + String errorMessage = "Xin lỗi, đã xảy ra lỗi. Vui lòng thử lại."; + if (isConnectionError(error)) { + errorMessage = "Hiện tại dịch vụ AI (Ollama) đang tạm thời gián đoạn. Vui lòng thử lại sau."; + } + eventPublisher.error(connectionSessionId, request.messageId(), errorMessage); } ); } diff --git a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/ToolInterceptor.java b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/ToolInterceptor.java index 0b021cb..b71a7c7 100644 --- a/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/ToolInterceptor.java +++ b/loyalty-agent/src/main/java/dev/sonpx/loyalty/agent/core/executor/ToolInterceptor.java @@ -33,7 +33,7 @@ import java.util.List; @RequiredArgsConstructor public class ToolInterceptor { - private final List toolProviders; + private final ObjectProvider toolProviders; private final AgentEventPublisher eventPublisher; private final ToolResultPresentationProcessor toolResultProcessor; private final AgentProperties agentProperties; @@ -46,7 +46,7 @@ public class ToolInterceptor { public List getWrappedTools(String sessionId, String messageId, AgentToolScope scope) { List wrappedTools = new ArrayList<>(); - for (ToolCallbackProvider provider : toolProviders) { + for (ToolCallbackProvider provider : toolProviders.stream().toList()) { for (ToolCallback tool : provider.getToolCallbacks()) { String toolName = tool.getToolDefinition().name(); if (scope.allows(toolName)) { @@ -107,9 +107,10 @@ public class ToolInterceptor { try { return tool.call(toolInput); } catch (Exception e) { - if (isConnectionOrSessionError(e)) { + Throwable rootCause = getRootCause(e); + if (isConnectionOrSessionError(rootCause)) { log.warn("Detected MCP connection/session drop on tool {}: {}. Attempting auto-reconnect and retry...", - toolName, e.getMessage()); + toolName, rootCause.getMessage()); attemptReconnect(); try { return tool.call(toolInput); @@ -122,7 +123,7 @@ public class ToolInterceptor { } } - private void attemptReconnect() { + private synchronized void attemptReconnect() { if (mcpSyncClientsProvider != null) { List clients = mcpSyncClientsProvider.getIfAvailable(); if (clients != null && !clients.isEmpty()) { @@ -138,6 +139,14 @@ public class ToolInterceptor { } } + private Throwable getRootCause(Throwable t) { + if (t == null) return null; + Throwable current = t; + while (current.getCause() != null && current.getCause() != current) { + current = current.getCause(); + } + return current; + } public boolean isConnectionOrSessionError(Throwable t) { if (t == null) { return false; @@ -147,7 +156,9 @@ public class ToolInterceptor { if (current instanceof EOFException || current instanceof ConnectException || current instanceof SocketException - || current instanceof ClosedChannelException) { + || current instanceof ClosedChannelException + || current.getClass().getName().contains("ConnectException") + || current.getClass().getName().contains("SocketException")) { return true; } String msg = current.getMessage(); diff --git a/loyalty-agent/src/main/resources/application.yml b/loyalty-agent/src/main/resources/application.yml index d1db23e..4a2fd37 100644 --- a/loyalty-agent/src/main/resources/application.yml +++ b/loyalty-agent/src/main/resources/application.yml @@ -40,7 +40,7 @@ spring: num_ctx: 32768 mcp: client: - request-timeout: 60000 + request-timeout: 3000 enabled: true type: sync sse: diff --git a/start-all.ps1 b/start-all.ps1 index e68b649..6c13f59 100644 --- a/start-all.ps1 +++ b/start-all.ps1 @@ -31,8 +31,8 @@ foreach ($port in 9331, 9332, 9333) { } } -Get-Process | Where-Object { $_.CommandLine -like "*nodemon*$ProjectRoot*" } | Stop-Process -Force -ErrorAction SilentlyContinue -Get-Process | Where-Object { $_.CommandLine -like "*MavenWrapperMain*$ProjectRoot*" } | Stop-Process -Force -ErrorAction SilentlyContinue +Get-WmiObject Win32_Process | Where-Object { $_.CommandLine -like "*nodemon*$ProjectRoot*" } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue } +Get-WmiObject Win32_Process | Where-Object { $_.CommandLine -like "*MavenWrapperMain*$ProjectRoot*" } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue } Write-Host "=========================================="