--- 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