Customers
Overview
The Customers feature provides a complete customer relationship management system for Siyahfy stores. Vendors can view customer profiles, order history, addresses, and account activity. Customers register and log in using OTP-based email verification, manage their own profiles, and maintain multiple shipping addresses. Vendors can also import customers in bulk, export customer data, blacklist abusive accounts, and control COD (Cash on Delivery) eligibility per customer.
How It Works
Customer Registration Flow
- Customer enters email and basic details on the storefront.
- An OTP is sent to their email address.
- Customer enters the OTP to verify their identity.
- Account is created in the
customerstable with a hashed password. - A JWT token is returned for authenticated session.
Vendor-Side Customer Management
Vendors can:
- View all customers with search, filter, and pagination
- Edit customer contact information and notes
- Manage multiple addresses per customer
- View complete order history per customer
- Toggle COD eligibility (useful for managing risky customers)
- Blacklist customers to prevent future orders
- Bulk import customers via CSV
- Export customer data to CSV
Key API Endpoints
Vendor (Admin Panel) APIs
Storefront (Customer-Facing) APIs
Database Tables
| Table | Purpose |
|---|---|
customers | Customer profiles — name, email, phone, password hash, tags, notes, COD status, blacklist flag |
customer_addresses | Multiple shipping/billing addresses per customer |
orders | Customer’s order history (linked via customer email or ID) |
abandon_checkouts | Abandoned carts linked to customer sessions |
Related Features
- Orders — Customer order history and management
- Storefront — Customer-facing registration and account pages
- Marketing — Email campaigns targeting customer segments
- Discounts — Customer-specific discount codes