|
|
@@ -101,9 +101,14 @@ https://ztklqodcdjeqpsvhlpud.supabase.co/functions/v1/webhook-shoprenter-uninsta
|
|
|
### Scope List
|
|
|
```
|
|
|
product:read
|
|
|
+product:write
|
|
|
customer:read
|
|
|
+customer:write
|
|
|
order:read
|
|
|
order:write
|
|
|
+category:read
|
|
|
+inventory:read
|
|
|
+webhook:read
|
|
|
webhook:write
|
|
|
```
|
|
|
|
|
|
@@ -113,25 +118,54 @@ webhook:write
|
|
|
**Purpose:** Sync product catalog for AI knowledge base
|
|
|
**Usage:** The AI assistant needs to access product information (name, price, stock, description) to answer customer questions about products during phone calls.
|
|
|
**Example:** "Is the XYZ product in stock?" → AI checks product availability in real-time.
|
|
|
+**Data Accessed:** Product name, SKU, price, description, stock levels, active status
|
|
|
+
|
|
|
+#### `product:write`
|
|
|
+**Purpose:** Future capability to update product information
|
|
|
+**Usage:** Enable future features like AI-assisted inventory management or price updates based on customer interactions.
|
|
|
+**Example:** Automatically mark products as "low stock" after multiple customer inquiries.
|
|
|
|
|
|
#### `customer:read`
|
|
|
-**Purpose:** Personalize AI responses based on customer history
|
|
|
-**Usage:** Access customer information to provide personalized service during calls. The AI can reference previous orders and customer preferences.
|
|
|
+**Purpose:** Access customer contact information and history
|
|
|
+**Usage:** Access customer data including **email addresses, phone numbers**, billing/shipping addresses to enable personalized AI service and direct customer communication.
|
|
|
**Example:** "Hello Mr. Kovács, I see you previously ordered product ABC. Would you like to reorder?"
|
|
|
+**Data Accessed:** Email, phone, first name, last name, billing address (including phone), shipping address (including phone), order history, total spent
|
|
|
+
|
|
|
+#### `customer:write`
|
|
|
+**Purpose:** Update customer records with call interaction data
|
|
|
+**Usage:** Add call notes, tags, and interaction history to customer profiles for merchant reference and improved service.
|
|
|
+**Example:** After a support call, the AI adds a note: "Customer prefers SMS notifications for order updates."
|
|
|
|
|
|
#### `order:read`
|
|
|
-**Purpose:** Provide order status information during calls
|
|
|
-**Usage:** Answer customer inquiries about order status, shipping, and delivery details during phone conversations.
|
|
|
-**Example:** "Where is my order SR-2024-001?" → AI provides current order status and tracking information.
|
|
|
+**Purpose:** Access order details and customer contact information
|
|
|
+**Usage:** Answer customer inquiries about order status and access customer **email and phone numbers** from order data for follow-up communication.
|
|
|
+**Example:** "Where is my order SR-2024-001?" → AI provides current order status, tracking, and customer contact details.
|
|
|
+**Data Accessed:** Order number, status, total, currency, customer email, customer phone, billing/shipping addresses (including phones), line items
|
|
|
|
|
|
#### `order:write`
|
|
|
-**Purpose:** Update order notes after calls
|
|
|
-**Usage:** Add call summaries and customer requests to order notes for merchant reference.
|
|
|
-**Example:** After a call about delivery preferences, the AI adds a note to the order: "Customer requested morning delivery."
|
|
|
+**Purpose:** Update order information after calls
|
|
|
+**Usage:** Add call summaries, customer requests, and delivery notes to orders for merchant reference.
|
|
|
+**Example:** After a call about delivery preferences, the AI adds a note: "Customer requested morning delivery."
|
|
|
+
|
|
|
+#### `category:read`
|
|
|
+**Purpose:** Organize products by category for better recommendations
|
|
|
+**Usage:** Enable the AI to suggest related products and navigate product categories effectively during customer conversations.
|
|
|
+**Example:** "I'm looking for phone accessories" → AI can browse category structure to suggest relevant products.
|
|
|
+
|
|
|
+#### `inventory:read`
|
|
|
+**Purpose:** Access real-time stock availability information
|
|
|
+**Usage:** Provide accurate stock information during calls and suggest alternatives for out-of-stock items.
|
|
|
+**Example:** "Product XYZ is currently out of stock, but we have similar product ABC available."
|
|
|
+
|
|
|
+#### `webhook:read`
|
|
|
+**Purpose:** List existing webhook registrations
|
|
|
+**Usage:** Check for existing webhooks before creating new ones to avoid duplicates and manage webhook lifecycle.
|
|
|
+**Example:** During setup, verify if webhooks are already registered for this store.
|
|
|
+**Critical Note:** ⚠️ Our code calls `listWebhooks()` function - this scope is REQUIRED!
|
|
|
|
|
|
#### `webhook:write`
|
|
|
**Purpose:** Set up real-time synchronization
|
|
|
-**Usage:** Register webhooks for `order/create`, `product/update` events to keep AI knowledge base synchronized in real-time.
|
|
|
+**Usage:** Register webhooks for `order/create`, `product/update`, `customer/update` events to keep AI knowledge base synchronized in real-time.
|
|
|
**Example:** When a product goes out of stock, webhook updates AI immediately so it doesn't offer unavailable products.
|
|
|
|
|
|
---
|