
Dropshipping Integration
- 120 installs
- 41 repo stars
- Updated March 13, 2026
- finsilabs/awesome-ecommerce-skills
Route orders to dropship suppliers automatically with real-time inventory sync and per-order margin tracking.
About
Sets up dropshipping via platform apps or a custom supplier integration layer using APIs or CSV/EDI feeds. A developer uses it to launch without inventory, add dropship categories, or build multi-supplier routing.
- Per-platform tool table (DSers, AliDropship, Modalyst, Spocket)
- Custom supplier integration for routing logic, inventory sync, and margin tracking
Dropshipping Integration by the numbers
- 120 all-time installs (skills.sh)
- Ranked #2,841 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill dropshipping-integrationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 120 |
|---|---|
| repo stars | ★ 41 |
| Last updated | March 13, 2026 |
| Repository | finsilabs/awesome-ecommerce-skills ↗ |
What it does
Route orders to dropship suppliers automatically with real-time inventory sync and per-order margin tracking.
Files
Dropshipping 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
Core Instructions
Step 1: Determine your platform and choose the right integration approach
| 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 |
Step 2: Set up inventory sync
Keeping your storefront stock levels in sync with supplier availability is the most critical piece — oversells damage customer trust immediately.
Shopify
Using DSers (AliExpress dropshipping): 1. Install DSers from the Shopify App Store 2. Connect your AliExpress account in DSers settings 3. Import products from AliExpress via DSers → Products → Import 4. DSers syncs stock levels automatically every few hours 5. Enable "Auto-update inventory" in DSers → Settings → Supplier to push supplier stock to Shopify inventory
Using Spocket (US/EU suppliers): 1. Install Spocket from the Shopify App Store 2. Browse the Spocket marketplace and import products to Shopify 3. Spocket syncs inventory changes automatically — no manual configuration needed 4. Enable "Auto-fulfill orders" in Spocket settings to route new Shopify orders to suppliers automatically
Using AutoDS (multi-supplier): 1. Install AutoDS from the Shopify App Store 2. Add suppliers (AliExpress, Amazon, Walmart, etc.) and import their products 3. AutoDS monitors supplier prices and stock, updating your Shopify listings automatically 4. Configure price rules in AutoDS → Settings → Price Rules to set your markup automatically
WooCommerce
Using AliDropship plugin: 1. Purchase and install the AliDropship plugin 2. Use the Chrome extension to import products from AliExpress directly into WooCommerce 3. Enable automatic price and inventory updates in AliDropship → Settings → Auto-update 4. For order routing: AliDropship auto-places orders on AliExpress when you approve them in the plugin dashboard
For non-AliExpress suppliers: 1. Install the WooCommerce Zapier extension or use n8n (free, self-hosted) to connect WooCommerce order webhooks to supplier systems 2. Go to WooCommerce → Settings → Advanced → Webhooks, create a webhook for "Order created" events 3. Point the webhook URL at your automation workflow (Zapier/n8n) that formats and forwards the order to your supplier 4. For inventory sync, schedule a daily WP-Cron job to pull the supplier's CSV feed and update WooCommerce stock via the REST API
BigCommerce
Using Modalyst: 1. Install Modalyst from the BigCommerce App Marketplace 2. Browse Modalyst's supplier catalog and import products to BigCommerce 3. Modalyst handles inventory sync and order routing automatically once connected
Using Spocket: 1. Install Spocket from the BigCommerce App Marketplace 2. Import products and enable auto-fulfillment in Spocket settings 3. New orders with Spocket products are routed to suppliers automatically
Custom / Headless
For headless storefronts, build a supplier integration layer:
// 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
}Step 3: Configure automated order routing
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
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})
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
Step 4: Track dropship margins
Margin tracking is critical — your cost price can drift from your selling price without you noticing.
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
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
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
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
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 |
Related Skills
- @order-fulfillment-workflow
- @vendor-management
- @shipment-tracking
- @multi-channel-selling
- @order-management-system
{
"context": "Tests whether the agent designs the dropshipping database schema with correct column types, constraints, and structure for suppliers, supplier_products, and dropship_orders tables. Verifies that key design decisions like UUID primary keys, cents-based pricing, correct status enumerations, and encryption annotations are applied correctly.",
"type": "weighted_checklist",
"checklist": [
{
"name": "UUID primary keys",
"max_score": 8,
"description": "All three tables (suppliers, supplier_products, dropship_orders) use UUID as primary key type with gen_random_uuid() default"
},
{
"name": "order_method check constraint",
"max_score": 10,
"description": "The suppliers table order_method column has a CHECK constraint with exactly these four values: 'api', 'email', 'edi', 'csv_ftp'"
},
{
"name": "cost_price as integer cents",
"max_score": 10,
"description": "cost_price column in supplier_products is defined as INTEGER (not DECIMAL or NUMERIC), representing price in cents"
},
{
"name": "dropship_orders status constraint",
"max_score": 10,
"description": "The dropship_orders status column has a CHECK constraint with exactly: 'pending', 'submitted', 'confirmed', 'shipped', 'failed'"
},
{
"name": "api_key encryption annotation",
"max_score": 8,
"description": "The suppliers.api_key column includes a comment or annotation indicating it is encrypted at rest (e.g., SQL comment '-- encrypted at rest' or equivalent)"
},
{
"name": "lead_time_days column",
"max_score": 8,
"description": "The suppliers table includes a lead_time_days column (INTEGER, NOT NULL, DEFAULT 2)"
},
{
"name": "supplier_sku column",
"max_score": 8,
"description": "The supplier_products table includes a supplier_sku column to store the supplier's own SKU identifier (separate from product_id)"
},
{
"name": "last_synced_at column",
"max_score": 8,
"description": "The supplier_products table includes a last_synced_at column with TIMESTAMPTZ type for tracking when inventory was last synced"
},
{
"name": "supplier_order_ref column",
"max_score": 8,
"description": "The dropship_orders table includes a supplier_order_ref column to store the supplier's own order reference/confirmation number"
},
{
"name": "total_cost as integer",
"max_score": 8,
"description": "The dropship_orders.total_cost column is defined as INTEGER (cents), not a floating point or decimal type"
},
{
"name": "is_active default true",
"max_score": 7,
"description": "The suppliers table includes an is_active BOOLEAN column with DEFAULT true"
},
{
"name": "Foreign key references",
"max_score": 7,
"description": "supplier_products.supplier_id references suppliers(id) and supplier_products.product_id references products(id); dropship_orders.order_id references orders(id) and dropship_orders.supplier_id references suppliers(id)"
}
]
}
Dropshipping Database Schema
Problem/Feature Description
A growing home goods retailer is expanding into dropshipping to offer a wider product range without holding additional inventory. The engineering team needs to design the persistence layer for this new dropshipping capability. The store already has products and orders tables in PostgreSQL.
The dropshipping system needs to track: which suppliers exist and how to connect with them, which products each supplier can fulfill (along with their own internal SKU references and pricing), and the lifecycle of orders that have been routed to suppliers for fulfillment. Suppliers use a variety of integration methods — some have REST APIs, others use email, EDI, or CSV files over FTP. API credentials must be stored securely. The schema should also support computing accurate delivery estimates for customers based on each supplier's typical fulfillment time.
Output Specification
Write a SQL migration file named migration.sql containing the CREATE TABLE statements for all the new dropshipping-related tables. Use PostgreSQL syntax. Add comments where appropriate to explain design decisions, especially around sensitive fields and data types.
{
"context": "Tests whether the agent implements inventory synchronization using the correct CSV parsing library with proper column mappings, zeroes out discontinued SKUs, schedules syncs at the correct interval using Promise.allSettled, correctly calculates gross margin from subtotal_cents and dropship order costs, and writes a SQL margin report filtered by the right statuses and time window.",
"type": "weighted_checklist",
"checklist": [
{
"name": "csv-parse/sync import",
"max_score": 8,
"description": "The inventory sync code imports the parse function from 'csv-parse/sync' (not 'csv-parse' streaming API, not papaparse, not another CSV library)"
},
{
"name": "CSV column mapping SKU",
"max_score": 7,
"description": "The CSV parser maps the column named 'SKU' (uppercase) to the sku field"
},
{
"name": "CSV column mapping QUANTITY",
"max_score": 7,
"description": "The CSV parser maps the column named 'QUANTITY' (uppercase) to qty using parseInt with radix 10"
},
{
"name": "CSV column mapping COST",
"max_score": 7,
"description": "The CSV parser maps the column named 'COST' (uppercase) to price using parseFloat multiplied by 100 (and rounded) to store as cents"
},
{
"name": "Zero out discontinued SKUs",
"max_score": 10,
"description": "After processing the feed, any supplier_products records with SKUs NOT present in the latest feed have their stock_qty set to 0 (discontinued items are not left with stale positive stock)"
},
{
"name": "Cron schedule 4 hours",
"max_score": 8,
"description": "The scheduled sync job uses the cron expression '0 */4 * * *' (every 4 hours), not a different interval"
},
{
"name": "Promise.allSettled for parallel sync",
"max_score": 10,
"description": "The scheduled sync processes all suppliers using Promise.allSettled() (not Promise.all()), so one supplier failure does not block others from syncing"
},
{
"name": "Margin revenue from subtotal_cents",
"max_score": 8,
"description": "The margin calculation uses order.subtotal_cents as the revenue figure"
},
{
"name": "Margin cost from dropship total_cost",
"max_score": 8,
"description": "The cost figure is the sum of total_cost across all dropship_orders for the given order"
},
{
"name": "Margin percentage formula",
"max_score": 8,
"description": "Gross margin percentage is calculated as (grossMarginCents / revenue) * 100, with a guard against division by zero when revenue is 0"
},
{
"name": "SQL status filter",
"max_score": 8,
"description": "The supplier margin report SQL filters dropship_orders by status IN ('confirmed', 'shipped') — does NOT include 'pending', 'submitted', or 'failed' statuses"
},
{
"name": "SQL 30-day window",
"max_score": 7,
"description": "The supplier margin report SQL filters orders to the last 30 days (e.g., created_at >= NOW() - INTERVAL '30 days')"
},
{
"name": "NULLIF division guard in SQL",
"max_score": 4,
"description": "The SQL margin percentage calculation uses NULLIF or equivalent to prevent division by zero on the revenue sum"
}
]
}
Dropship Inventory Sync and Margin Reporting
Problem/Feature Description
A sporting goods retailer has been running a dropshipping operation with multiple suppliers for six months. Some suppliers provide their inventory data through a REST API, while others upload a CSV file to an FTP server each morning. The ops team has been burned twice recently: once when a product showed as available on the storefront but the supplier had already sold out (the inventory sync was too infrequent), and once when a product was discontinued by a supplier but continued to show in-stock because the old record was never cleared.
The finance team also needs a monthly vendor performance report showing gross margin by supplier so they can negotiate better pricing with underperforming partners. The existing codebase already has database access helpers (a db object), an downloadFtpFile(ftpConfig, filename) utility, and a decryptApiKey(encryptedKey) function available.
Output Specification
Produce the following files:
1. inventorySync.ts — A TypeScript module implementing:
- A
syncSupplierInventory(supplierId)function that handles both API and CSV/FTP feed sources - A scheduled job that automatically syncs all active suppliers on a regular cadence
2. marginCalculation.ts — A TypeScript module implementing:
- A
calculateDropshipMargin(orderId)function that returns revenue, cost, gross margin in cents, and gross margin percentage for a given order
3. marginReport.sql — A SQL query that produces a per-supplier margin summary, returning supplier name, order count, total revenue, total cost, gross margin amount, and gross margin percentage. Only include fulfilled orders and limit to recent activity.
You may use stub database access patterns (e.g., db.suppliers.findAll(...), db.raw(...)) for the TypeScript code.
{
"context": "Tests whether the agent implements correct supplier selection logic (cheapest in-stock), groups order lines by supplier before creating dropship orders, handles both API and non-API submission methods, uses proper authentication, correctly manages order status transitions and supplier references, and prevents duplicate submissions.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Cheapest supplier selection",
"max_score": 10,
"description": "The supplier selection logic orders by cost_price ascending (cheapest first) when multiple suppliers can fulfill a product"
},
{
"name": "Stock quantity filter",
"max_score": 8,
"description": "The supplier selection filters by stock_qty >= required quantity (not just stock_qty > 0) to ensure enough units are available"
},
{
"name": "Active supplier filter",
"max_score": 7,
"description": "The supplier selection filters by is_active = true to exclude inactive suppliers"
},
{
"name": "Group lines by supplier",
"max_score": 10,
"description": "Order lines for the same supplier are grouped together and result in a single dropship order per supplier (not one dropship order per order line)"
},
{
"name": "Bearer token authentication",
"max_score": 10,
"description": "API submissions use Bearer token authentication with the supplier's api_key passed through a decrypt function (e.g., decryptApiKey) rather than storing or using plaintext credentials directly"
},
{
"name": "Non-API method handling",
"max_score": 8,
"description": "When supplier.order_method is not 'api', the code branches to a different submission path (e.g., email/EDI/CSV) rather than attempting an API call"
},
{
"name": "Failed status on error",
"max_score": 8,
"description": "When the supplier API returns an error response, the dropship order status is updated to 'failed' before or alongside throwing/returning the error"
},
{
"name": "supplier_order_ref persisted",
"max_score": 10,
"description": "After a successful submission, the supplier's returned order reference/ID is saved to the supplier_order_ref field on the dropship order"
},
{
"name": "Status transition to submitted",
"max_score": 8,
"description": "After successful API submission, the dropship order status is updated to 'submitted' (not left as 'pending')"
},
{
"name": "Idempotency / duplicate prevention",
"max_score": 8,
"description": "The code includes a check for an existing supplier_order_ref or uses idempotency keys to prevent duplicate submission when retrying a timed-out request"
},
{
"name": "submitted_at timestamp",
"max_score": 7,
"description": "The submitted_at field is set to the current timestamp when a dropship order is successfully submitted"
},
{
"name": "total_cost calculated from lines",
"max_score": 6,
"description": "The total_cost for each dropship order is computed by summing costPrice * quantity across all order lines assigned to that supplier"
}
]
}
Supplier Order Routing Engine
Problem/Feature Description
A furniture retailer operates a dropshipping model with five active supplier partners. When a customer places an order containing multiple products, each product may be fulfilled by a different supplier depending on who has stock and at what cost. The platform needs a routing engine that automatically assigns each order line to the best available supplier and then dispatches the order to that supplier through whatever integration method the supplier supports.
Some suppliers offer a REST API for order placement, while others use email. The company has experienced occasional timeouts when contacting supplier APIs, and a handful of duplicate orders have already been sent to suppliers as a result of retry attempts — causing costly double-shipments to customers. Supplier API credentials are sensitive and must not be used or stored in plaintext anywhere in the codebase.
Output Specification
Write a TypeScript module named orderRouting.ts that exports:
1. A selectBestSupplier(productId, requiredQty) function that picks the optimal supplier for a given product and required quantity 2. A routeOrderToSupplier(orderId) function that groups all order lines and creates the appropriate dropship order records 3. A submitDropshipOrder(dropshipOrderId) function that sends a pending dropship order to the supplier
You may use stub implementations for database access (e.g., a db object with methods like db.supplierProducts.findOne(...)) and for any helper functions like decryptApiKey or submitViaEmail. The logic and structure of the code is what matters.
Include a brief DESIGN.md explaining your approach to preventing duplicate submissions.
{
"name": "finsi/dropshipping-integration",
"version": "0.1.0",
"summary": "Supplier order routing, inventory sync, and margin calculation for dropship",
"skills": {
"dropshipping-integration": {
"path": "SKILL.md"
}
}
}