SKILL.md
唯讀
名稱
shopify-automation
描述
Shopify 電商自動化 - 庫存管理、訂單處理、客戶工作流程與分析
版本
1.0.0
Shopify 自動化
全方位的 Shopify 電商自動化解決方案,涵蓋庫存管理、訂單處理、客戶工作流程與分析。基於 n8n 的電商工作流程範本。
概述
此技能涵蓋:
- 庫存管理與警示
- 訂單處理自動化
- 客戶生命週期工作流程
- 多通路同步
- 分析與報表
庫存管理
低庫存警示
workflow: "庫存警示系統"
schedule: "每日上午 9 點"
steps:
1. fetch_inventory:
shopify:
endpoint: products
include: variants
2. filter_low_stock:
condition: inventory_quantity <= reorder_threshold
default_threshold: 10
3. categorize_urgency:
critical: inventory_quantity <= 5
warning: inventory_quantity <= 10
4. generate_report:
group_by: [category, urgency]
5. notify:
slack:
channel: "#inventory-alerts"
message: |
⚠️ *低庫存警示*
🚨 *緊急(≤5 件):*
{critical_items}
⚠️ *警告(≤10 件):*
{warning_items}
[在 Shopify 中檢視]({admin_link})
6. create_purchase_orders:
if: auto_reorder_enabled
template: generate_po_for_each_supplier
預測性補貨
workflow: "智慧庫存補貨"
analysis:
data_sources:
- sales_history: last_90_days
- seasonal_trends: year_over_year
- current_velocity: last_14_days
calculations:
daily_sales_rate: avg(units_sold_per_day)
days_of_stock: current_inventory / daily_sales_rate
reorder_point: daily_sales_rate * lead_time * safety_factor
safety_factor:
high_velocity: 1.5
normal: 1.3
slow_moving: 1.1
actions:
auto_reorder:
condition: days_of_stock <= lead_time + buffer
action: generate_purchase_order
notify: purchasing_team
訂單處理
訂單履行工作流程
workflow: "訂單處理管線"
trigger: shopify_order_created
steps:
1. validate_order:
checks:
- fraud_score: < threshold
- inventory_available: true
- payment_captured: true
2. categorize_order:
rules:
- high_value: total > $500
- international: country != home_country
- expedited: shipping_method == "express"
- subscription: has_subscription_items
3. assign_fulfillment:
routing:
- if: international
warehouse: international_hub
- if: expedited
priority: high
- default:
warehouse: nearest_to_customer
4. create_shipping_label:
carrier: based_on_service_level
integrate: [shipstation, easypost, shippo]
5. update_inventory:
action: decrement_stock
6. notify_customer:
email: order_confirmation_template
sms: if_opted_in
7. update_systems:
- accounting: create_invoice
- crm: update_customer_record
- analytics: log_order_data
訂單狀態自動化
order_status_notifications:
confirmed:
delay: immediate
email: "感謝您的訂單!"
processing:
delay: when_status_changes
email: "我們正在準備您的訂單"
shipped:
delay: immediate
email: |
您的訂單已出貨!
追蹤編號:{tracking_number}
貨運業者:{carrier}
預計送達:{eta}
sms: "您的訂單已出貨!追蹤:{tracking_url}"
delivered:
delay: 1_day_after_delivery
email: "訂單滿意嗎?留下評論吧!"
delayed:
trigger: no_tracking_update_3_days
action: proactive_customer_outreach
客戶工作流程
購後互動序列
workflow: "購後互動"
sequence:
day_0:
trigger: order_delivered
action:
- email: delivery_confirmation
- start_review_timer
day_3:
action:
- email: review_request
template: |
嗨 {first_name},
您對 {product_name} 還滿意嗎?
我們很想知道您的想法!
[留下評論]({review_link})
day_7:
condition: no_review_submitted
action:
- email: review_reminder
- offer: 10%_off_next_order
day_14:
action:
- email: related_products
personalization: based_on_purchase
day_30:
condition: consumable_product
action:
- email: replenishment_reminder
discount: returning_customer
客戶分群
segmentation:
vip:
criteria:
- total_spent: >= $1000
- orders: >= 5
actions:
- tag: "VIP"
- add_to_list: "VIP 客戶"
- priority_support: true
- early_access: new_products
at_risk:
criteria:
- last_order: > 90_days
- previous_orders: >= 2
actions:
- tag: "Win-Back"
- email_sequence: reactivation
- offer: special_discount
new_customers:
criteria:
- orders: 1
- days_since_first_order: <= 30
actions:
- email_sequence: onboarding
- recommend: best_sellers
wholesale:
criteria:
- average_order_value: >= $500
- orders: >= 3
actions:
- tag: "B2B Potential"
- notify: sales_team
多通路同步
庫存同步
multi_channel_inventory:
platforms:
- shopify: primary
- amazon: secondary
- ebay: secondary
- walmart: secondary
sync_rules:
frequency: real_time
buffer_stock: 5_units # 安全緩衝
allocation:
shopify: 100% # 完整庫存
amazon: available - buffer
ebay: available - buffer
walmart: available - buffer
actions:
on_sale:
- update_all_channels: immediately
- if_stockout: pause_listings
on_restock:
- update_all_channels: immediately
- reactivate_listings: if_paused
價格同步
price_synchronization:
base_price: shopify
channel_adjustments:
amazon:
markup: +15% # 考量費用
ebay:
markup: +10%
wholesale:
discount: -30%
automation:
- on_price_change: sync_all_channels
- competitor_monitoring: optional
- dynamic_pricing: based_on_demand
分析與報表
每日銷售報表
workflow: "每日銷售報表"
schedule: "每日上午 8 點"
metrics:
revenue:
- total_sales
- average_order_value
- comparison_vs_yesterday
- comparison_vs_same_day_last_week
orders:
- order_count
- units_sold
- new_vs_returning_customers
products:
- top_sellers
- low_performers
- out_of_stock_items
channels:
- by_source: [direct, google, facebook, email]
- conversion_rates
output:
format: |
📊 *每日銷售報表 - {date}*
💰 *營收*
今日:${total_sales}({change_vs_yesterday})
平均客單價:${aov}
📦 *訂單*
數量:{order_count}
新客戶:{new_customers}
🏆 *熱銷商品*
1. {product_1} - {units_1} 件
2. {product_2} - {units_2} 件
3. {product_3} - {units_3} 件
⚠️ *注意事項*
- {low_stock_count} 項商品庫存偏低
- {abandoned_carts} 筆未結帳購物車(價值 ${value})
destinations:
- slack: "#daily-sales"
- email: leadership_team
- google_sheets: sales_tracker
未結帳購物車挽回
workflow: "購物車挽回"
trigger: cart_abandoned
wait: 1_hour
sequence:
email_1:
delay: 1_hour
subject: "忘了什麼嗎?🛒"
content: |
嗨 {first_name},
您購物車中有這些商品:
{cart_items}
[完成訂單]({checkout_link})
email_2:
delay: 24_hours
condition: cart_not_recovered
subject: "您的購物車還在等您"
offer: free_shipping
email_3:
delay: 72_hours
condition: cart_not_recovered
subject: "最後機會 - 購物車商品 9 折"
offer: 10_percent_discount
expiry: 24_hours
tracking:
metrics:
- recovery_rate
- revenue_recovered
- best_performing_offer
輸出範例
請求:「設定 Shopify 庫存警示」
輸出:
# Shopify 庫存警示系統
## 工作流程設定
```yaml
name: "低庫存監控"
schedule: "每日上午 9 點 + 庫存變動時"
警示規則
| 緊急程度 | 門檻值 | 動作 |
|---|---|---|
| 🚨 緊急 | ≤ 5 件 | 立即 Slack + Email |
| ⚠️ 警告 | ≤ 10 件 | 每日摘要 |
| 📋 監控 | ≤ 20 件 | 每週報表 |
警示範例
🚨 庫存緊急警示
商品:藍色小工具(SKU: BW-001)
目前庫存:3 件
每日平均銷售:5 件
庫存天數:0.6 天
⚠️ 庫存警告(5 項)
• 紅色小工具 - 8 件(1.6 天)
• 綠色小工具 - 9 件(3 天)
...
📊 建議行動:
1. 立即補貨藍色小工具
2. 檢視紅色小工具需求
3. 聯絡供應商確認綠色小工具到貨時間
[檢視庫存儀表板]
[產生採購單]
n8n 實作
nodes:
1. Schedule Trigger (每日上午 9 點)
2. Shopify - 取得商品
3. Filter - 低庫存商品
4. IF - 檢查緊急程度
5. Slack - 發送警示
6. Google Sheets - 記錄資料
準備好實作了嗎?
---
*Shopify 自動化技能 - Claude Office Skills 的一部分*






