docs: update Letzshop order import documentation
Add documentation for: - Item-level confirmation workflow (per Letzshop API requirements) - Terminology update (rejected -> declined) - Historical import of declined orders 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -439,6 +439,34 @@ From the Letzshop merchant interface:
|
||||
- **Findings**: Bug is on Letzshop's side, no client-side workaround possible
|
||||
- **Recommendation**: Store tracking info locally after setting via API
|
||||
|
||||
### Item-Level Confirmation ✅
|
||||
- **Issue**: Orders were being confirmed/declined at order level, but Letzshop requires item-level actions
|
||||
- **Letzshop Model**:
|
||||
- Each `inventoryUnit` must be confirmed/declined individually via `confirmInventoryUnits` mutation
|
||||
- `isAvailable: true` = confirmed, `isAvailable: false` = declined
|
||||
- Inventory unit states: `unconfirmed` → `confirmed_available` / `confirmed_unavailable` / `returned`
|
||||
- Shipment states derived from items: `unconfirmed` / `confirmed` / `declined`
|
||||
- Partial confirmation allowed (some items confirmed, some declined)
|
||||
- **Fix**:
|
||||
1. Order detail modal now shows each item with product details (name, EAN, SKU, MPN, price)
|
||||
2. Per-item confirm/decline buttons for pending items
|
||||
3. Admin API endpoints for single-item and bulk operations:
|
||||
- `POST /vendors/{id}/orders/{id}/items/{id}/confirm`
|
||||
- `POST /vendors/{id}/orders/{id}/items/{id}/decline`
|
||||
4. Order status automatically updates based on item states:
|
||||
- All items declined → order status = "declined"
|
||||
- Any item confirmed → order status = "confirmed"
|
||||
|
||||
### Terminology Update ✅
|
||||
- Changed "Rejected" to "Declined" throughout UI to match Letzshop terminology
|
||||
- Internal `sync_status` value remains "rejected" for backwards compatibility
|
||||
- Filter dropdown, status badges, and action buttons now use "Declined"
|
||||
- Added "Declined" stats card to orders dashboard
|
||||
|
||||
### Historical Import: Declined Orders ✅
|
||||
- Historical import now fetches both `confirmed` AND `declined` shipments
|
||||
- Combined stats shown in import result
|
||||
|
||||
---
|
||||
|
||||
## Next Steps (TODO)
|
||||
|
||||
Reference in New Issue
Block a user