Business Flowchart
用户意图
│
├─ 模糊意图("想逛逛/看看有什么潮玩")─→ searchProducts(keyword='') → 推荐列表卡片
│ │
├─ 明确关键词("Molly/SP/盲盒/手办")─→ searchProducts(keyword) → 搜索结果卡片 ─┤
│ │
│ 用户点击卡片选择某款商品 │
│ ↓ │
│ getProductDetail → 商品详情卡片 │
│ │ │
│ ┌───────────────┴───────────────┐ │
│ ↓ ↓ │
│ 用户点击"查看门店库存" 用户点击"立即购买" │
│ ↓ ↓ │
│ checkStoreStock → 库存卡片 placeOrder → 下单成功卡片 │
│ │
└─ 查询门店库存("XX在哪有货")──→ checkStoreStock → 门店库存卡片
The Agent cannot skip getProductDetail and directly call placeOrder——There must first be a valid productId returned by getProductDetail. The Agent cannot fabricate productId or storeId——They must be the original values returned by the upstream interface. Before placeOrder returns success, it is forbidden to announce to the user that "the order has been placed successfully."
Atomic Interface Dependencies
| Interface | Function | Component | Prerequisite |
|---|---|---|---|
| searchProducts | Search/recommend trendy toy products | product-list-card | — |
| getProductDetail | View product details | product-detail-card | Already has productId (from searchProducts) |
| checkStoreStock | Query store inventory | stock-check-card | Already has productId (from getProductDetail) |
| placeOrder | Place order and purchase | order-success-card | Already has productId + storeId (from getProductDetail/checkStoreStock) |
Business Constraints (Iron Rules Across Interfaces)
1. Output Format
- For all interfaces that return successfully (isError=false) and are bound to a component,a card must be displayed, and it is forbidden to list the detail data in the card as plain text.
- When replying, the Agent may add a brief guiding phrase (such as "I've recommended these trendy toys for you, click the card to view details"), butit is forbidden to expand product names, prices, etc. in the form of a markdown list。
2. Execution Order
placeOrderOnly after the call succeeds (isError=false) may it be announced to the user that "the order has been placed successfully."placeOrderMust be called aftergetProductDetailsucceeds.- Concurrent calls to
placeOrderare forbidden; you must wait for the previous transaction to end before initiating the next one.
3. Data Source
productIdMust come fromsearchProducts/getProductDetailreturneditems[].productIdorproductIdoriginal value, fabrication is forbidden.storeIdMust come fromcheckStoreStock/getProductDetailreturnedstores[].storeIdoriginal value, fabrication is forbidden.
4. Inventory Query
checkStoreStockWhen no storeId is specified, returns the inventory status of all stores.- Inventory data is simulated data; actual inventory is subject to the store.
User Intent Routing
Direct Intent (Triggers This SKILL)
- "Want to browse trendy toys"
- "What blind box recommendations are there"
- "Take a look at figures"
- "What new styles does Molly have"
- "SP limited edition"
- "Where is XX in stock"
- "Help me place an order for this"
- "Buy one"
- "Recommend trendy toys"
- "What new products are there recently"
Intent Routing Rules
- If the user only says vague expressions such as "want to browse/recommend" →
searchProducts(keyword='') - If the user says a specific product name/category/brand →
searchProducts(keyword='用户说的关键词') - If the user clicks and selects a product from a card →
getProductDetail(productId is passed in by the card sendFollowUpMessage) - If the user asks about stores/inventory →
checkStoreStock - If the user wants to purchase →
placeOrder(requires productId and storeId first) - If the user expresses an ambiguous phrase (such as "that one") → ask a clarifying question first, guessing is forbidden