Spaces:
Running
Running
Commit History
-
# Customer List Page - AI Generator Prompt ## Page Context Create a **Customer List** (`/customers`) page for the Conversena Client Portal system. This page is accessed when users click on "العملاء" (Customers) in the sidebar navigation and serves as the main customer database view for business owners to manage their customer relationships. ## Language & Direction - **Primary Language**: Arabic - **Text Direction**: Right-to-Left (RTL) - **Secondary Language Support**: English/Hebrew for mixed content when needed ## Page Purpose & User Story As a business owner, I need to view and manage my customer database to: - Monitor customer interactions and conversation history - Track customer purchase patterns and order history - Identify high-value customers and engagement levels - Access customer contact information for direct communication - Analyze customer behavior for marketing and sales insights ## Functional Requirements (Based on System Specs) ### Core Features 1. **Customer Database View** - Display comprehensive customer list with filtering and search 2. **Customer Profile Access** - Click-through to individual customer details (`/customers/:id`) 3. **Multi-channel Integration** - Show customers from Facebook Messenger, Instagram DM, and WhatsApp 4. **Real-time Updates** - Live customer data synchronization 5. **Arabic Language Support** - Full RTL interface with Arabic labels and content ### Data Display Requirements - Customer contact information (name, phone, preferred language) - Last interaction timestamp and channel - Total orders and purchase value - Conversation status (Active, Escalated, Resolved) - Product interests and inquiry history - Customer acquisition source (organic, referral, campaign) ## Design Specifications ### Layout Structure ``` [Header with page title and action buttons] [Search and filter bar] [Customer statistics cards] [Customer data table with pagination] [Quick action sidebar/modal] ``` ### Visual Design Requirements - **Modern Arabic UI**: Clean, professional interface suitable for business use - **Data Density**: Efficient use of space while maintaining readability - **Color Scheme**: Professional business colors (blues, grays, whites) - **Typography**: Clear Arabic fonts optimized for data display - **Responsive Design**: Works on desktop, tablet, and mobile devices - **Accessibility**: WCAG 2.1 AA compliance with proper Arabic text rendering ### Interactive Elements - **Search Bar**: Real-time search with Arabic text support - **Filter Dropdown**: Filter by channel, status, purchase history, date range - **Sort Options**: Sort by name, last contact, total orders, purchase value - **Bulk Actions**: Select multiple customers for bulk operations - **Export Options**: Export customer data in CSV/Excel format - **Quick Actions**: Direct messaging, view profile, order history ## Technical Implementation ### Data Structure ```javascript // Customer object structure { id: "customer_123", name: "أحمد محمد", phone: "+970599123456", email: "ahmed@example.com", preferredLanguage: "ar", channels: ["whatsapp", "instagram", "facebook"], lastInteraction: "2024-07-13T14:30:00Z", status: "active", // active, escalated, resolved totalOrders: 5, totalSpent: 1250.00, currency: "USD", location: "رام الله, فلسطين", acquisitionSource: "organic", interests: ["إلكترونيات", "ملابس", "أحذية"], tags: ["عميل مميز", "متكرر"] } ``` ### API Integration - **Customer List API**: `GET /api/customers` with pagination, filtering, and search - **Real-time Updates**: WebSocket connection for live customer status updates - **Export API**: `POST /api/customers/export` for data export functionality ## UI Components & Content ### Page Header - **Page Title**: "قائمة العملاء" (Customer List) - **Action Buttons**: "تصدير البيانات" (Export Data), "إضافة عميل يدوياً" (Add Manual Customer) - **Breadcrumb**: "الرئيسية > العملاء" (Home > Customers) ### Statistics Cards (Top Row) 1. **إجمالي العملاء** (Total Customers) - with growth percentage 2. **عملاء نشطين** (Active Customers) - current month 3. **عملاء جدد** (New Customers) - this week 4. **متوسط قيمة الطلب** (Average Order Value) - per customer ### Filter & Search Bar - **Search Placeholder**: "البحث عن العملاء..." (Search for customers...) - **Filter Options**: - القناة (Channel): الكل، واتساب، فيسبوك، إنستغرام - الحالة (Status): الكل، نشط، تم التصعيد، تم الحل - تاريخ آخر تفاعل (Last Interaction Date) - قيمة المشتريات (Purchase Value Range) ### Table Headers (RTL Layout) | الإجراءات | القيمة الإجمالية | عدد الطلبات | آخر تفاعل | القناة | الحالة | الهاتف | اسم العميل | |---------|----------------|-------------|----------|-------|-------|--------|------------| | Actions | Total Value | Orders Count | Last Contact | Channel | Status | Phone | Customer Name | ### Table Row Actions - **عرض الملف الشخصي** (View Profile) - **تاريخ الطلبات** (Order History) - **إرسال رسالة** (Send Message) - **إضافة ملاحظة** (Add Note) ### Pagination (Arabic) - **عرض**: 10، 25، 50، 100 عنصر في الصفحة - **الصفحة**: 1 من 10 - **السابق** | **التالي** ## User Experience Flow ### Primary User Journey 1. User clicks "العملاء" in sidebar 2. Page loads with customer statistics and recent customers 3. User can search/filter to find specific customers 4. User clicks on customer name to view detailed profile 5. User can perform quick actions directly from the list ### Secondary Actions - Export customer data for marketing campaigns - Add manual customer for in-store sales - Bulk tag customers for segmentation - View customer analytics and insights ## Performance & Accessibility ### Performance Requirements - **Load Time**: < 2 seconds for initial page load - **Search Response**: < 500ms for search results - **Pagination**: Smooth transitions between pages - **Data Refresh**: Real-time updates without page reload ### Accessibility Features - **Screen Reader Support**: Proper Arabic ARIA labels - **Keyboard Navigation**: Full keyboard accessibility - **High Contrast Mode**: Support for accessibility color schemes - **Font Scaling**: Responsive text sizing for visually impaired users ## Integration Points ### Related System Components - **ConversAI System**: Customer interaction data and conversation history - **Order Management**: Purchase history and order details - **Analytics System**: Customer behavior insights and metrics - **WhatsApp Business Helper**: Direct messaging capabilities ### Navigation Integration - **Sidebar Active State**: "العملاء" highlighted when on customer pages - **Breadcrumb Navigation**: Clear path showing current location - **Quick Actions**: Direct links to related pages (orders, conversations) ## Success Metrics - **Page Load Performance**: 95% of page loads under 2 seconds - **Search Accuracy**: 98% relevant results for customer searches - **User Engagement**: Average session time on customer pages - **Data Export Usage**: Frequency of customer data exports ## Error Handling - **No Customers Found**: Helpful message with setup instructions - **Search No Results**: Suggest alternative search terms - **API Errors**: Graceful degradation with retry options - **Network Issues**: Offline mode indicators and retry mechanisms --- **Note**: This page is part of the larger Conversena Client Portal system and should maintain consistency with the overall design system and user experience patterns established in the dashboard and other modules. - Initial Deployment
Verified signature1b2025e -
initial commit
Verified signature293c4e2