S
Shopline Integration Methodology 台灣電商:Shopline Integration Methodology
Released已發布 industry ecommerce
Integrate and operate Shopline in Taiwan e-commerce context via mcp-shopline. Use when the user needs to sync orders, manage products, run promotions, or reconcile inventory on Shopline stores; when comparing Shopline vs 91APP/Shopify for Taiwan DTC; or when debugging async write propagation. Do NOT use for API schema lookup (go to mcp-shopline docs) or non-Taiwan Shopline deployments.
台灣電商技能:Shopline Integration Methodology 分析與應用。
Assumptions前提假設
- {assumption grounded in a Shopline constraint}
- TODO: {anything that needs verification against mcp-shopline or Open API docs}
Output Format輸出格式
When completing a Shopline task, produce this structure:
# Shopline Task: {one-line summary}
Gotchas注意事項
- Order status split by channel —
confirmedvscompleted. Online orders useconfirmed; POS usescompleted. The tools include both by default, but if you pass a customstatusfilter and forget one, you silently lose half the data. Always verify withget_channel_comparisonthat online and POS counts look plausible. - Pagination caps.
per_pagemaxes at 50, and search returns are capped at 10,000 results total. For large windows, split the date range (Shopline Open API usesfetch_all_pages_by_date_segmentsinternally, but your own multi-step flows need the same discipline). A 30-day top-seller query on a high-volume merchant will hit the cap. - Async write propagation — read-after-write can be stale. After calling a
[WRITE]tool (e.g.,update_order_status,adjust_store_credit), an immediate read may still return the pre-write state. Do not gate downstream logic on a read-after-write within the same sync step. Build a reconciliation loop, or pass the write response's ownupdated_atforward. (TODO: verify exact propagation window with Shopline Open API support or mcp-shopline maintainers.) - No webhook support yet (as of 2026-04).
mcp-shoplineroadmap lists webhooks as pending. Until then, all event detection is polling. Budget API calls accordingly and pick a poll cadence (5-15 min for orders, hourly for inventory) that respects the 0.2s inter-page delay the tools enforce. - Channels endpoint often 403/422; fall back to order payload.
list_channels/get_channel_detailrequire a separate permission that most tokens don't carry. The same information (store name, channel type) is available viaorder.channel.created_by_channel_nameon any order detail — use that as the authoritative source when channel tools fail. - Write tools need explicit scope AND
SHOPLINE_TEST_WRITES=1in tests. Tokens default to read-only scope; production write failures usually mean the scope wasn't granted, not that the tool is broken. Start debugging withget_token_infoto confirm scope before assuming a bug. In test harnesses, writes are gated behind the env var — unset it in CI unless you have a dedicated test store.
Tags標籤
taiwane-commerceshoplineplatformintegration