dropshipping-integration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDropshipping Integration
一件代发集成
Overview
概述
A dropshipping integration routes customer orders automatically to supplier warehouses, syncs supplier inventory to your storefront, and tracks your margin on every sale. Done right, customers receive their products on time without you ever touching physical inventory. Done poorly, oversells and fulfillment failures destroy your reputation.
This skill walks through setting up dropshipping on your platform using the right tools, then covers custom/headless implementations for those building from scratch.
一件代发集成可将客户订单自动路由至供应商仓库,将供应商库存同步到你的店铺前端,并跟踪每笔销售的利润。如果实施得当,客户可以按时收到产品,你完全不需要接触实体库存。如果实施效果差,超卖和履约失败会严重损害你的品牌声誉。
本指南将介绍如何使用合适的工具在你的平台上搭建一件代发功能,同时也会覆盖从零开始搭建的自定义/无头实现方案。
When to Use This Skill
适用场景
- When launching a store without physical inventory by routing orders directly to supplier warehouses
- When adding a dropship-fulfilled product category alongside your own inventory
- When building a multi-supplier routing engine that picks the best supplier per order based on price, stock, or location
- When you need to keep your storefront inventory in sync with supplier availability feeds (CSV, EDI, API)
- When tracking dropship margins for accounting and vendor performance reporting
- 你希望无需持有实体库存开店,直接将订单路由到供应商仓库
- 你希望在自有库存品类之外,新增一个一件代发的商品类目
- 你希望搭建多供应商路由引擎,根据价格、库存或地理位置为每个订单选择最优供应商
- 你需要保持店铺前端库存与供应商供应源(CSV、EDI、API)同步
- 你需要跟踪一件代发的利润,用于会计核算和供应商绩效报告
Core Instructions
核心操作指南
Step 1: Determine your platform and choose the right integration approach
步骤1:确定你的平台,选择合适的集成方案
| Platform | Recommended Tool | Why |
|---|---|---|
| Shopify | DSers (free), AutoDS, or Spocket | DSers is the official AliExpress partner; AutoDS and Spocket handle premium/US-based suppliers with automated order routing |
| WooCommerce | AliDropship plugin, DropshipMe, or WooCommerce + custom webhook | AliDropship handles AliExpress automation; for other suppliers use WooCommerce webhooks to push orders to a supplier API |
| BigCommerce | Modalyst, Spocket, or BigCommerce + custom integration | Modalyst and Spocket have native BigCommerce apps with inventory sync |
| Custom / Headless | Build a supplier integration layer using the supplier's API or CSV/EDI feed | Full control over routing logic, margin tracking, and supplier selection |
| 平台 | 推荐工具 | 原因 |
|---|---|---|
| Shopify | DSers (免费)、AutoDS、Spocket | DSers是AliExpress官方合作伙伴;AutoDS和Spocket对接高端/美国本土供应商,支持自动化订单路由 |
| WooCommerce | AliDropship插件、DropshipMe、WooCommerce + 自定义Webhook | AliDropship支持AliExpress自动化;对接其他供应商可使用WooCommerce Webhook将订单推送到供应商API |
| BigCommerce | Modalyst、Spocket、BigCommerce + 自定义集成 | Modalyst和Spocket有原生BigCommerce应用,支持库存同步 |
| 自定义/无头 | 基于供应商API或CSV/EDI源搭建供应商集成层 | 可完全控制路由逻辑、利润跟踪和供应商选择逻辑 |
Step 2: Set up inventory sync
步骤2:设置库存同步
Keeping your storefront stock levels in sync with supplier availability is the most critical piece — oversells damage customer trust immediately.
保持店铺前端库存水平与供应商供应情况同步是最核心的环节——超卖会立刻损害客户信任。
Shopify
Shopify
Using DSers (AliExpress dropshipping):
- Install DSers from the Shopify App Store
- Connect your AliExpress account in DSers settings
- Import products from AliExpress via DSers → Products → Import
- DSers syncs stock levels automatically every few hours
- Enable "Auto-update inventory" in DSers → Settings → Supplier to push supplier stock to Shopify inventory
Using Spocket (US/EU suppliers):
- Install Spocket from the Shopify App Store
- Browse the Spocket marketplace and import products to Shopify
- Spocket syncs inventory changes automatically — no manual configuration needed
- Enable "Auto-fulfill orders" in Spocket settings to route new Shopify orders to suppliers automatically
Using AutoDS (multi-supplier):
- Install AutoDS from the Shopify App Store
- Add suppliers (AliExpress, Amazon, Walmart, etc.) and import their products
- AutoDS monitors supplier prices and stock, updating your Shopify listings automatically
- Configure price rules in AutoDS → Settings → Price Rules to set your markup automatically
使用DSers(AliExpress一件代发):
- 从Shopify应用商店安装DSers
- 在DSers设置中绑定你的AliExpress账户
- 通过DSers → 商品 → 导入功能从AliExpress导入商品
- DSers每隔几小时自动同步库存水平
- 在DSers → 设置 → 供应商中开启「自动更新库存」,将供应商库存同步到Shopify库存
使用Spocket(美国/欧盟供应商):
- 从Shopify应用商店安装Spocket
- 浏览Spocket市场,将商品导入到Shopify
- Spocket自动同步库存变化——无需手动配置
- 在Spocket设置中开启「自动履约订单」,将新的Shopify订单自动路由给供应商
使用AutoDS(多供应商):
- 从Shopify应用商店安装AutoDS
- 添加供应商(AliExpress、Amazon、Walmart等)并导入其商品
- AutoDS监控供应商价格和库存,自动更新你的Shopify商品信息
- 在AutoDS → 设置 → 价格规则中配置价格规则,自动设置商品加价比例
WooCommerce
WooCommerce
Using AliDropship plugin:
- Purchase and install the AliDropship plugin
- Use the Chrome extension to import products from AliExpress directly into WooCommerce
- Enable automatic price and inventory updates in AliDropship → Settings → Auto-update
- For order routing: AliDropship auto-places orders on AliExpress when you approve them in the plugin dashboard
For non-AliExpress suppliers:
- Install the WooCommerce Zapier extension or use n8n (free, self-hosted) to connect WooCommerce order webhooks to supplier systems
- Go to WooCommerce → Settings → Advanced → Webhooks, create a webhook for "Order created" events
- Point the webhook URL at your automation workflow (Zapier/n8n) that formats and forwards the order to your supplier
- For inventory sync, schedule a daily WP-Cron job to pull the supplier's CSV feed and update WooCommerce stock via the REST API
使用AliDropship插件:
- 购买并安装AliDropship插件
- 使用Chrome扩展直接将AliExpress的商品导入到WooCommerce
- 在AliDropship → 设置 → 自动更新中开启自动价格和库存更新
- 订单路由:你在插件仪表盘批准订单后,AliDropship会自动在AliExpress下单
对接非AliExpress供应商:
- 安装 WooCommerce Zapier 扩展,或使用 n8n(免费、可自托管)将WooCommerce订单Webhook连接到供应商系统
- 进入WooCommerce → 设置 → 高级 → Webhook,为「订单创建」事件创建一个Webhook
- 将Webhook URL指向你的自动化工作流(Zapier/n8n),由工作流格式化订单并转发给供应商
- 库存同步可安排每日WP-Cron任务拉取供应商CSV源,通过REST API更新WooCommerce库存
BigCommerce
BigCommerce
Using Modalyst:
- Install Modalyst from the BigCommerce App Marketplace
- Browse Modalyst's supplier catalog and import products to BigCommerce
- Modalyst handles inventory sync and order routing automatically once connected
Using Spocket:
- Install Spocket from the BigCommerce App Marketplace
- Import products and enable auto-fulfillment in Spocket settings
- New orders with Spocket products are routed to suppliers automatically
使用Modalyst:
- 从BigCommerce应用市场安装Modalyst
- 浏览Modalyst的供应商目录,将商品导入到BigCommerce
- 绑定完成后,Modalyst会自动处理库存同步和订单路由
使用Spocket:
- 从BigCommerce应用市场安装Spocket
- 导入商品,在Spocket设置中开启自动履约
- 包含Spocket商品的新订单会自动路由给供应商
Custom / Headless
自定义/无头
For headless storefronts, build a supplier integration layer:
typescript
// Supplier product and inventory schema
interface SupplierProduct {
supplierId: string;
supplierSku: string; // supplier's own SKU
internalProductId: string; // your product ID
costPriceCents: number; // what you pay the supplier
stockQty: number;
lastSyncedAt: Date;
}
// Route an order line to the best available supplier
async function selectBestSupplier(
productId: string,
requiredQty: number
): Promise<SupplierProduct | null> {
// Pick the cheapest in-stock supplier with enough quantity
return db.supplierProducts.findOne({
internal_product_id: productId,
stock_qty: { gte: requiredQty },
is_active: true,
}, { orderBy: ['cost_price_cents', 'asc'] });
}
// Sync supplier inventory from CSV feed
async function syncSupplierInventoryFromCsv(
supplierId: string,
csvContent: string
): Promise<void> {
const rows = parseCsv(csvContent); // [{sku, qty, cost}]
for (const row of rows) {
await db.supplierProducts.upsert({
supplier_id: supplierId,
supplier_sku: row.sku,
stock_qty: parseInt(row.qty),
cost_price_cents: Math.round(parseFloat(row.cost) * 100),
last_synced_at: new Date(),
});
}
// Zero out SKUs not in the feed (discontinued)
const activeSKUs = new Set(rows.map(r => r.sku));
const allProducts = await db.supplierProducts.findBySupplierId(supplierId);
for (const sp of allProducts) {
if (!activeSKUs.has(sp.supplier_sku)) {
await db.supplierProducts.update(sp.id, { stock_qty: 0 });
}
}
}
// Submit a dropship order to a supplier API
async function submitDropshipOrder(params: {
supplierApiEndpoint: string;
supplierApiKey: string;
orderReference: string;
shippingAddress: Address;
items: { supplierSku: string; quantity: number }[];
}): Promise<string> {
const response = await fetch(params.supplierApiEndpoint + '/orders', {
method: 'POST',
headers: {
'Authorization': `Bearer ${params.supplierApiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: params.orderReference,
ship_to: params.shippingAddress,
items: params.items,
}),
});
if (!response.ok) throw new Error(`Supplier API error: ${response.status}`);
const result = await response.json();
return result.order_id; // supplier's order reference
}针对无头店铺,你需要搭建一个供应商集成层:
typescript
// 供应商商品和库存结构定义
interface SupplierProduct {
supplierId: string;
supplierSku: string; // 供应商自有SKU
internalProductId: string; // 你的商品ID
costPriceCents: number; // 你支付给供应商的成本(单位:分)
stockQty: number;
lastSyncedAt: Date;
}
// 将订单行路由给可用的最优供应商
async function selectBestSupplier(
productId: string,
requiredQty: number
): Promise<SupplierProduct | null> {
// 选择库存充足、价格最低的活跃供应商
return db.supplierProducts.findOne({
internal_product_id: productId,
stock_qty: { gte: requiredQty },
is_active: true,
}, { orderBy: ['cost_price_cents', 'asc'] });
}
// 从CSV源同步供应商库存
async function syncSupplierInventoryFromCsv(
supplierId: string,
csvContent: string
): Promise<void> {
const rows = parseCsv(csvContent); // [{sku, qty, cost}]
for (const row of rows) {
await db.supplierProducts.upsert({
supplier_id: supplierId,
supplier_sku: row.sku,
stock_qty: parseInt(row.qty),
cost_price_cents: Math.round(parseFloat(row.cost) * 100),
last_synced_at: new Date(),
});
}
// 将不在源中的SKU库存置零(已停产)
const activeSKUs = new Set(rows.map(r => r.sku));
const allProducts = await db.supplierProducts.findBySupplierId(supplierId);
for (const sp of allProducts) {
if (!activeSKUs.has(sp.supplier_sku)) {
await db.supplierProducts.update(sp.id, { stock_qty: 0 });
}
}
}
// 向供应商API提交一件代发订单
async function submitDropshipOrder(params: {
supplierApiEndpoint: string;
supplierApiKey: string;
orderReference: string;
shippingAddress: Address;
items: { supplierSku: string; quantity: number }[];
}): Promise<string> {
const response = await fetch(params.supplierApiEndpoint + '/orders', {
method: 'POST',
headers: {
'Authorization': `Bearer ${params.supplierApiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: params.orderReference,
ship_to: params.shippingAddress,
items: params.items,
}),
});
if (!response.ok) throw new Error(`供应商API错误:${response.status}`);
const result = await response.json();
return result.order_id; // 供应商侧的订单编号
}Step 3: Configure automated order routing
步骤3:配置自动化订单路由
Shopify
Shopify
- DSers: Go to DSers → Settings → Automatic Actions and enable "Auto-sync tracking number to Shopify" and "Auto-fulfill Shopify orders"
- AutoDS: Enable Auto-Orders in AutoDS → Settings. Orders paid in Shopify are automatically placed with the supplier, and tracking numbers sync back to Shopify fulfillments
- If a supplier order fails (out of stock), DSers and AutoDS alert you via email so you can manually reroute
- DSers:进入DSers → 设置 → 自动操作,开启「自动同步物流单号到Shopify」和「自动履约Shopify订单」
- AutoDS:在AutoDS → 设置中开启自动下单。Shopify中已支付的订单会自动向供应商下单,物流单号会同步回Shopify履约记录
- 如果供应商下单失败(库存不足),DSers和AutoDS会通过邮件提醒你,你可以手动重新路由订单
WooCommerce
WooCommerce
- For AliDropship: approved orders in the AliDropship dashboard are auto-placed. Go to AliDropship → Orders and confirm pending orders, or enable full automation in settings
- For custom supplier integrations: use the WooCommerce webhook to trigger your supplier order submission, then use a second webhook or polling to receive tracking numbers and mark orders fulfilled via the WooCommerce REST API ()
POST /wp-json/wc/v3/orders/{id}
- 使用AliDropship:AliDropship仪表盘内已批准的订单会自动下单。你可以进入AliDropship → 订单确认待处理订单,也可以在设置中开启全自动化
- 自定义供应商集成:使用WooCommerce Webhook触发供应商订单提交,再通过第二个Webhook或轮询获取物流单号,通过WooCommerce REST API()标记订单已履约
POST /wp-json/wc/v3/orders/{id}
BigCommerce
BigCommerce
- Modalyst and Spocket both handle order routing automatically. Monitor BigCommerce → Orders and check the "Fulfillment" column — orders routed to suppliers show the supplier name
- For tracking numbers: both apps sync tracking back to BigCommerce orders automatically and trigger BigCommerce's built-in shipment notification emails
- Modalyst和Spocket都会自动处理订单路由。你可以在BigCommerce → 订单页面查看「履约」列——路由给供应商的订单会显示供应商名称
- 物流单号:两款应用都会自动将物流单号同步回BigCommerce订单,并触发BigCommerce内置的发货通知邮件
Step 4: Track dropship margins
步骤4:跟踪一件代发利润
Margin tracking is critical — your cost price can drift from your selling price without you noticing.
利润跟踪非常重要——你可能在不知情的情况下,成本价和售价出现偏差。
Shopify
Shopify
- Use the Shopify Analytics → Profit report (requires entering your costs in Shopify admin)
- Go to each product's variant in Shopify admin and enter the "Cost per item" — Shopify calculates margin automatically
- For multi-supplier tracking: export orders and costs from DSers/AutoDS and use a Google Sheet or QuickBooks to calculate margin per order
- 使用Shopify分析 → 利润报告(需要在Shopify后台录入成本)
- 在Shopify后台进入每个商品的变体页面,录入「每件成本」——Shopify会自动计算利润
- 多供应商跟踪:从DSers/AutoDS导出订单和成本数据,使用Google Sheet或QuickBooks计算每单利润
WooCommerce
WooCommerce
- Install the WooCommerce Cost of Goods plugin (SkyVerge) to track per-product costs and automatically calculate margin in WooCommerce reports
- AliDropship shows cost vs. selling price in its analytics dashboard
- 安装 WooCommerce Cost of Goods 插件(SkyVerge开发),跟踪单商品成本,在WooCommerce报告中自动计算利润
- AliDropship的分析仪表盘会展示成本和售价的对比
BigCommerce
BigCommerce
- Enter cost prices on each product variant in BigCommerce admin → Products → [Product] → Variants → Cost
- BigCommerce's built-in Insights report (available on Plus and above) shows margin by product
- 在BigCommerce后台 → 商品 → [对应商品] → 变体 → 成本中录入每个商品变体的成本价
- BigCommerce内置的洞察报告(Plus及以上版本可用)会展示每个商品的利润
Best Practices
最佳实践
- Sync inventory at least every 4 hours — supplier stock changes frequently; for high-velocity SKUs, sync every hour if the supplier's API allows it
- Keep a stock buffer — don't sell the last 3–5 units per supplier; stock can change between sync cycles and your "in stock" data may be stale
- Store the supplier's order reference — always save the supplier's order confirmation number so customer service can contact the supplier directly about specific shipments
- Track lead times per supplier — different suppliers have different fulfillment speeds; display accurate delivery estimates by using each supplier's lead time, not a generic estimate
- Send tracking numbers to customers as soon as the supplier ships — most supplier apps sync tracking automatically; enable this in your app settings and test it with a sample order
- Reconcile supplier invoices monthly — compare what you were charged against what you recorded at order time; pricing discrepancies accumulate into meaningful losses
- 库存同步频率至少每4小时一次 —— 供应商库存变化频繁;如果供应商API允许,高动销SKU可以每小时同步一次
- 设置库存缓冲 —— 不要售卖每个供应商的最后3-5件商品;两次同步周期之间库存可能发生变化,你的「有库存」数据可能已经过期
- 保存供应商订单编号 —— 始终保存供应商的订单确认号,这样客服可以直接联系供应商查询具体订单的物流情况
- 跟踪每个供应商的发货时效 —— 不同供应商的履约速度不同;使用每个供应商的发货时效展示准确的配送预估,而不是通用预估
- 供应商发货后立刻给客户发送物流单号 —— 大部分供应商应用都支持自动同步物流信息;在应用设置中开启该功能,并用测试单验证流程
- 每月核对供应商账单 —— 将实际支付金额和下单时记录的金额做对比,价格偏差累积起来会造成不小的损失
Common Pitfalls
常见问题
| Problem | Solution |
|---|---|
| Customer orders an item that goes out of stock at the supplier after your sync | Sync frequently and keep a buffer stock threshold; enable email alerts in DSers/AutoDS for stock-out events |
| Supplier ships the wrong items | Most supplier apps don't validate fulfilled items — contact the supplier directly and have their order reference ready |
| Dropship order is placed twice when the app retries | DSers and AutoDS use idempotency internally; for custom integrations, check for an existing supplier order reference before re-submitting |
| Margin calculation ignores shipping costs | If you offer "free shipping" but pay the supplier for shipping, subtract that from your margin calculation — it's a real cost |
| Tracking number doesn't sync back to platform | Check the app's tracking sync settings; for WooCommerce webhooks verify the webhook delivery log in WooCommerce → Settings → Advanced → Webhooks |
| 问题 | 解决方案 |
|---|---|
| 客户下单后,供应商库存同步后显示该商品无货 | 提高同步频率,设置库存缓冲阈值;在DSers/AutoDS中开启库存不足事件的邮件提醒 |
| 供应商发错货 | 大部分供应商应用不会校验已发货商品——直接联系供应商,准备好对应的供应商订单编号 |
| 应用重试时一件代发订单被重复提交 | DSers和AutoDS内部使用幂等机制避免重复;自定义集成需要在重新提交前检查是否已有对应的供应商订单编号 |
| 利润计算未包含物流成本 | 如果你提供「免运费」但需要向供应商支付运费,需要将这部分成本从利润中扣除——这是真实发生的成本 |
| 物流单号没有同步回平台 | 检查应用的物流同步设置;如果是WooCommerce Webhook,可以在WooCommerce → 设置 → 高级 → Webhook中查看Webhook交付日志 |
Related Skills
相关指南
- @order-fulfillment-workflow
- @vendor-management
- @shipment-tracking
- @multi-channel-selling
- @order-management-system
- @order-fulfillment-workflow
- @vendor-management
- @shipment-tracking
- @multi-channel-selling
- @order-management-system