{ "name": "competitor-pricing-analysis", "displayName": "竞品定价策略分析", "description": "分析竞品定价策略,包括5分位价格带分布、黄金价格带评分、毛利估算、促销建议和盈亏平衡销量分析", "category": "competitor-analysis", "version": "1.3.0", "type": "orchestration", "parameters": { "categoryKeyword": { "type": "string", "required": true, "description": "品类关键词" }, "competitorAsins": { "type": "array", "items": { "type": "string" }, "required": true, "description": "竞品ASIN列表" }, "ownPrice": { "type": "number", "required": false, "description": "自身产品当前价格,用于对比定位" }, "domain": { "type": "integer", "required": false, "default": 1, "description": "Amazon站点(1=美国)" } }, "pipeline": [ { "step": 1, "name": "搜索品类Top100产品价格数据", "api": { "service": "EcomDataService.searchProductsByQuery", "endpoint": "/api/ProductQuery", "method": "POST", "forwardUrl": "https://server.fmode.cn/api/voc-ecom/forward", "headers": { "Authorization": "Bearer {{vocToken}}" }, "requestBody": { "Page": 1, "Query": "1", "QueryType": "7", "Pattern": "${categoryKeyword}" }, "queryParams": { "domain": "${domain}" } }, "output": "categoryProducts", "responseExtract": "Array<{ Asin, Title, Price, Rating, RatingsCount, MonthlySales, Brand, BSR }>" }, { "step": 2, "name": "批量获取竞品详细定价信息", "forEach": "competitorAsins", "api": { "service": "EcomDataService.getProductDetail", "endpoint": "/api/ProductRequest", "method": "POST", "forwardUrl": "https://server.fmode.cn/api/voc-ecom/forward", "headers": { "Authorization": "Bearer {{vocToken}}" }, "requestBody": { "ASIN": "${asin}", "Trend": 1, "QueryTrendStartDt": "", "QueryTrendEndDt": "" }, "queryParams": { "domain": "${domain}" } }, "output": "competitorDetails", "responseExtract": "{ Title, Brand, SalesPrice, ListPrice, CouponInfo, FBAFee, Ratings, RatingsCount, MonthlySales }" }, { "step": 3, "name": "获取竞品历史价格趋势", "forEach": "competitorAsins", "api": { "service": "EcomDataService.getMonitorData", "endpoint": "/api/MonitorQuery", "method": "POST", "forwardUrl": "https://server.fmode.cn/api/voc-ecom/forward", "headers": { "Authorization": "Bearer {{vocToken}}" }, "requestBody": { "ASIN": "${asin}" }, "queryParams": { "domain": "${domain}" } }, "output": "priceHistory", "responseExtract": "{ PriceHistory, RankHistory }" }, { "step": 4, "name": "5分位价格带分析", "type": "compute", "logic": "analyzePriceBands(categoryProducts)", "algorithm": { "quintile": "按P20/P40/P60/P80划分为低价带/中低/黄金中价/中高/高价带", "perBand": "每带统计: skuCount, avgSales, avgRating, avgBsr", "goldenBandScore": "bandScore = avgSales×0.5 + avgRating×20 + (skuCount>0?10:0),最高分为量利平衡最优带" }, "output": "priceBands" }, { "step": 5, "name": "竞品定价策略识别+毛利估算", "type": "compute", "logic": "analyzeCompetitorPricing(competitorDetails, priceHistory, priceBands, ownPrice)", "algorithm": { "pricingStrategy": "渗透定价(低于P20)/跟随定价(黄金带内)/溢价定价(高于P80)", "marginEstimate": "15%佣金+$5FBA+30%采购成本 → grossMargin%, 盈亏平衡销量", "ownPosition": "自身价格在哪个价格带的哪个百分位", "optimalPrice": "goldenBandMin + (goldenBandMax-goldenBandMin)*0.6 * min(1.15, max(0.85, selfRating/bandAvgRating))", "promotionAdvice": "价格战风险检测,优先多件折扣/满减替代降价" }, "output": "pricingAnalysis" } ], "response": { "type": "object", "properties": { "priceBands": { "type": "array", "description": "5分位价格带分布", "items": { "type": "object", "properties": { "range": { "type": "string" }, "label": { "type": "string" }, "productCount": { "type": "integer" }, "avgRating": { "type": "number" }, "avgSales": { "type": "integer" }, "isGolden": { "type": "boolean" } } } }, "competitorPricing": { "type": "array", "description": "竞品定价详情", "items": { "type": "object", "properties": { "asin": { "type": "string" }, "brand": { "type": "string" }, "currentPrice": { "type": "number" }, "listPrice": { "type": "number" }, "coupon": { "type": "number" }, "pricingStrategy": { "type": "string" }, "priceHistory": { "type": "array" }, "estimatedMargin": { "type": "number" } } } }, "ownPricePosition": { "type": "object", "properties": { "band": { "type": "string" }, "percentile": { "type": "number" }, "competitiveness": { "type": "string" } } }, "recommendation": { "type": "object", "properties": { "optimalRange": { "type": "array", "items": { "type": "number" } }, "goldenBand": { "type": "string" }, "strategy": { "type": "string" }, "reasons": { "type": "array", "items": { "type": "string" } } } }, "marginEstimate": { "type": "object", "properties": { "currentMargin": { "type": "number" }, "suggestedMargin": { "type": "number" }, "breakEvenSales": { "type": "integer" } } }, "promotionAdvice": { "type": "array", "items": { "type": "string" } } } }, "timeout": 120000, "retry": { "maxAttempts": 2, "delay": 2000, "backoffMultiplier": 2 }, "tokenConfig": { "type": "bearer", "configFile": "~/.openclaw/voc-credentials.json", "tokenField": "vocToken", "resolutionOrder": [ "configFile" ], "apigId": "7HwdQZk55B", "paymentUrlResolution": { "description": "动态构建充值URL:在已存在 session token 时查出用户 objectId,拼接到专属充值页面", "steps": [ "1. 从 voc-credentials.json 获取当前 session token", "2. 调用 GET https://server.fmode.cn/parse/users/me (Header: X-Parse-Application-Id: ncloudmaster, X-Parse-Session-Token: {token})获取用户 objectId", "3. 拼接充值URL: https://app.fmode.cn/dev/apig-pay/?user={objectId}&apigid=7HwdQZk55B&fun_id=HOkkX72PMF", "4. 将该URL展示给用户,引导扫码支付" ], "userResolveEndpoint": "https://server.fmode.cn/parse/users/me", "userResolveHeaders": { "X-Parse-Application-Id": "ncloudmaster", "X-Parse-Session-Token": "{vocToken}" }, "paymentBaseUrl": "https://app.fmode.cn/dev/apig-pay/", "paymentParams": { "user": "{resolvedUserId}", "apigid": "7HwdQZk55B", "fun_id": "HOkkX72PMF" }, "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig" }, "onMissing": { "action": "showPaymentQR", "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?apigid=7HwdQZk55B&fun_id=HOkkX72PMF", "title": "扫码开通 VOC-AI 数据服务", "message": "此 Skill 需要有效的 API Token。请先打开充值页面完成登录和充值;当用户提供 session token 后,请由 OpenClaw 运行 node scripts/tools/set-voc-token.js 写入 ~/.openclaw/voc-credentials.json 的 vocToken 字段,再重试当前 Skill。", "tokenSetupCommandTemplate": "node scripts/tools/set-voc-token.js {sessionToken}", "tokenSetupInstructions": "当用户完成登录和充值后,如果用户把 session token 发给你,请直接运行 node scripts/tools/set-voc-token.js 写入 ~/.openclaw/voc-credentials.json,然后重试当前 Skill。" }, "onBalanceInsufficient": { "action": "resolveUserThenShowPayment", "title": "VOC-AI Token 余额不足,请扫码充值", "message": "当前 Token 余额不足,我将为你生成专属充值链接,扫码支付后即可继续使用。" } }, "errorHandling": { "balanceInsufficient": { "conditions": [ { "responseField": "code", "operator": "in", "value": [ -2, -3, -10, 402, 429 ] }, { "responseField": "msg", "operator": "contains", "value": [ "余额不足", "insufficient", "balance", "quota", "没有开通", "权限或余额" ] }, { "responseField": "mess", "operator": "contains", "value": [ "余额不足", "insufficient", "balance", "quota", "没有开通", "权限或余额" ] }, { "responseField": "message", "operator": "contains", "value": [ "余额不足", "insufficient", "balance", "没有开通", "权限或余额" ] } ], "matchMode": "any", "trigger": "tokenConfig.onBalanceInsufficient" }, "unauthorized": { "conditions": [ { "responseField": "code", "operator": "in", "value": [ 401, 403 ] }, { "responseField": "msg", "operator": "contains", "value": [ "unauthorized", "token", "invalid", "auth" ] } ], "matchMode": "any", "trigger": "tokenConfig.onMissing" } } }