Feature: Add WhatsApp notifications for collection-ready orders
- Implement WhatsApp Business API integration via Meta Cloud API - Add phoneNumber field to Order model for storing customer phone numbers - Update admin order detail page with phone number input for collection orders - Send WhatsApp notification when admin marks order as ready for collection - Add WhatsApp service module with phone number formatting and message sending - Create database migrations for collection-related fields - Add WhatsApp credentials to .env configuration Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
a105fdf660
commit
36cc6dddff
@@ -231,6 +231,9 @@ model Order {
|
||||
carrier String? @default("Royal Mail") // e.g. "Royal Mail", "DPD", "Courier"
|
||||
trackingNumber String? // tracking number from carrier
|
||||
estimatedDeliveryDate DateTime? // estimated delivery date
|
||||
collectedByCustomer Boolean @default(false) // true if order was collected by customer (no shipping)
|
||||
isCollectionPickup Boolean @default(false) // true if customer selected collection at checkout
|
||||
readyForCollection Boolean @default(false) // true when admin marks order as ready for pickup
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -240,6 +243,7 @@ model Order {
|
||||
|
||||
guestName String? // full name for guest orders
|
||||
guestPhone String? // contact phone for guest orders
|
||||
phoneNumber String? // phone number for WhatsApp notifications (collection orders)
|
||||
|
||||
items OrderItem[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user