Sora-Ecommerce-Guide / chatml_admin_guide.chatml
HeinKoZin's picture
feat: initial Sora Ecommerce guides and ChatML dataset
48262c7
Raw History Blame Contribute Delete
7.05 kB
<|im_start|>system
You are the lead operations and administrator AI specialist for Sora Ecommerce. You possess comprehensive knowledge of all administrative dashboard modules, role-based security, batch inventory tracking (FEFO), order handling, SIM activations, loyalty systems, Redis queues, and daily operational checklists.<|im_end|>
<|im_start|>user
Where is the admin dashboard located and what permissions does the Admin role have compared to Vendors and Employees?<|im_end|>
<|im_start|>assistant
The admin dashboard is accessed at `/dashboard`.
### Role Permissions Hierarchy:
1. **Admin (`admin`)**:
- Platform-wide control over all stores, vendors, products, and users.
- Configure global store settings, currencies, and exchange rates.
- Manage multi-lingual localizations (`/dashboard/locales` and `/dashboard/mobile-localizations`).
- Review and approve vendor onboarding and staff allocations.
- Manage multi-warehouse topology (zones, shelves, placements) and view all batch expirations.
- Oversee SIM card inventory, KYC identity checks, plan approvals, and monthly billing.
- Monitor BullMQ/Redis email queues (`/dashboard/redis-queues`) and system audit logs (`/dashboard/audit-logs`).
2. **Vendor (`vendor`)**:
- Access restricted to their specific shop/brand.
- Manage own products, pricing, variants, and storage conditions (dry, cold, freeze).
- View assigned warehouse stocks and execute batch intakes.
- View orders and revenue statistics for their products.
- Manage employee accounts working at their stalls/counters.
3. **Employee (`employee`)**:
- Access limited to Point of Sale (POS) register (`/pos`), barcode scanning, stock lookups, and basic inventory adjustments.<|im_end|>
<|im_start|>user
How do I handle offline Bank Transfer orders and confirm payments as an Admin?<|im_end|>
<|im_start|>assistant
When customers choose "Bank Transfer" at checkout:
1. **Locate the Order**:
- Navigate to `/dashboard/orders`.
- Filter orders by payment status `Pending` or payment method `Bank Transfer`.
2. **Verify Receipt Proof**:
- Click to open the order detail page.
- Under the payment section, inspect the customer's uploaded bank deposit receipt/screenshot against the expected order total.
3. **Confirm Payment (`Mark as Paid`)**:
- Click **"Mark as Paid"**.
- This executes `finalizeStoredOrder`:
- **FEFO Stock Deduction**: Deducts reserved quantities from warehouse batches based on earliest expiration dates.
- **Loyalty Points**: Awards purchase points to the customer's wallet.
- **Email Notification**: Queues an automated confirmation email via BullMQ.
- Order status advances to `Processing`.
4. **Fulfillment**:
- Once items are packed and dispatched with the shipping provider (e.g., Sagawa), update the status to `Shipped` and enter the carrier tracking code.<|im_end|>
<|im_start|>user
How does the Warehouse topology and FEFO Batch Expiration tracking work in the Admin panel?<|im_end|>
<|im_start|>assistant
### 1. Warehouse Hierarchy (`/dashboard/warehouses`)
- Multi-tier structure: **Warehouse** -> **Zones** -> **Shelves** -> **Batch Placements**.
- The interactive visual map reveals capacity, occupied shelves, and specific product coordinates.
### 2. Batch Intake (Stock In) (`/dashboard/inventory`)
- When receiving inventory:
1. Select warehouse, zone, and shelf.
2. Input product SKU/variant, **Batch Number / Lot Code**, received quantity, and **Expiration Date**.
3. System records the batch and updates the active shelf inventory.
### 3. FEFO (First-Expired, First-Out) Deduction
- When an order is completed, the inventory engine selects the batch with the **earliest expiration date** first.
- This prevents expired stock and minimizes write-offs for perishable food or temperature-controlled goods.
### 4. Expiration Dates Dashboard (`/dashboard/expiration-dates`)
- **Left Stocks**: Live breakdown of all warehouse stock grouped by risk (Critical: <30 days, Warning: <60 days).
- **Customer Ordered**: Records of perishable batches delivered to customers for post-purchase safety tracking.
- **Manual Scan & Test Job**: Admin can click **"Run Expiry Scan"** or **"Test Email Job"** to immediately trigger customer reminder notifications without waiting for the 09:00 AM cron schedule.<|im_end|>
<|im_start|>user
What is the administrative workflow for SIM cards and mobile data plans?<|im_end|>
<|im_start|>assistant
Sora Ecommerce handles full lifecycle telecom management:
1. **SIM Inventory Management (`/dashboard/simcards`)**:
- Register SIM batches with ICCID, assigned phone number, telecom provider, and format (eSIM vs physical).
2. **Approving Subscription Requests (`/dashboard/sim-subscription-requests`)**:
- Customer orders a SIM product and submits a mobile plan request (`pending_activation`).
- Admin verifies KYC identification documents submitted by the user.
- Click **"Approve"** to bind the ICCID to the subscriber and activate billing.
- If documents are invalid, click **"Reject"** with an explanation.
3. **SIM Invoicing & Billing (`/dashboard/sim-billing`)**:
- Generates and tracks recurring monthly invoices.
- Admin marks invoices as `Paid` upon receiving automated carrier or manual customer payments.<|im_end|>
<|im_start|>user
How can Admins monitor background queues and system health?<|im_end|>
<|im_start|>assistant
1. **Redis & BullMQ Queues (`/dashboard/redis-queues`)**:
- Real-time queue metrics for:
- `order-confirmation-email`
- `order-status-update`
- `customer-welcome-email`
- `expiry-reminder-scan`
- Actions: Retry failed jobs, view error stack traces, clear delayed/stalled jobs.
2. **Audit Logs (`/dashboard/audit-logs`)**:
- Real-time security and operational log capturing actor ID, IP address, timestamp, and payload changes.
- Covers: Manual inventory adjustments, price overrides, role assignments, vendor approvals, and setting modifications.<|im_end|>
<|im_start|>user
What does the daily Admin operations checklist look like?<|im_end|>
<|im_start|>assistant
### Daily Operational Checklist
#### Morning Routine (09:00 - 10:00)
1. **Bank Transfers**: Visit `/dashboard/orders` to verify uploaded payment receipts and approve orders.
2. **SIM Queue**: Check `/dashboard/sim-subscription-requests` for pending activations.
3. **Expiry Check**: Review `/dashboard/expiration-dates` for critical batches nearing expiry.
4. **Queue Health**: Check `/dashboard/redis-queues` to confirm morning email batches ran smoothly.
#### During the Day
1. **Fulfillment**: Update orders to `Shipped` and input tracking numbers.
2. **Stock In**: Record incoming warehouse shipments under `/dashboard/inventory` with proper batch codes and expiry dates.
#### End of Day
1. **POS Reconcile**: Reconcile register receipts and cash drawers against `/dashboard/pos` daily order summaries.
2. **Audit Logs**: Review `/dashboard/audit-logs` for unusual activity or bulk adjustments.<|im_end|>