{ "name": "brand-profile", "displayName": "品牌六维画像", "description": "生成品牌六维量化画像,标注机会/风险标签、识别核心短板、输出竞争定位建议和《品牌认知校准卡》", "category": "synthesis", "version": "1.3.0", "type": "orchestration", "parameters": { "brandName": { "type": "string", "required": true, "description": "品牌名称" }, "brandAsins": { "type": "array", "items": { "type": "string" }, "required": true, "description": "品牌核心ASIN列表" }, "categoryKeyword": { "type": "string", "required": true, "description": "品类关键词(用于品类基准对比)" }, "categoryLandscape": { "type": "object", "required": false, "description": "category-landscape 输出(如有则跳过重复查询)" }, "domain": { "type": "integer", "required": false, "default": 1, "description": "Amazon站点(1=美国)" } }, "pipeline": [ { "step": 1, "name": "批量获取品牌产品详情", "forEach": "brandAsins", "api": { "service": "SorftimeApiService.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": "productDetails", "responseExtract": "{ Title, Brand, SalesPrice, Ratings, RatingsCount, BSR, Category, MonthlySales, fiveStartRatings, fourStartRatings, threeStartRatings, twoStartRatings, oneStartRatings }" }, { "step": 2, "name": "批量获取销量数据", "forEach": "brandAsins", "api": { "service": "SorftimeApiService.getAsinSalesVolume", "endpoint": "/api/AsinSalesVolume", "method": "POST", "requestBody": { "ASIN": "${asin}" }, "queryParams": { "domain": "${domain}" } }, "output": "salesData" }, { "step": 3, "name": "采样获取评论概况", "forEach": "brandAsins", "api": { "service": "SorftimeApiService.getProductReviews", "endpoint": "/api/ProductReviewsQuery", "method": "POST", "forwardUrl": "https://server.fmode.cn/api/voc-ecom/forward", "headers": { "Authorization": "Bearer {{vocToken}}" }, "requestBody": { "ASIN": "${asin}", "PageIndex": "1" }, "queryParams": { "domain": "${domain}" } }, "output": "reviewSamples" }, { "step": 4, "name": "获取品类基准数据(如未传入categoryLandscape)", "condition": "!categoryLandscape", "api": { "service": "SorftimeApiService.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": "categoryBaseline" }, { "step": 5, "name": "六维评分计算", "type": "compute", "logic": "calcSixDimensions(productDetails, salesData, reviewSamples, categoryBaseline || categoryLandscape)", "algorithm": { "pricing": { "weight": 0.2, "method": "品牌均价 vs 品类中位价的偏离度" }, "rating": { "weight": 0.2, "method": "平均评分 + 差评率(1-2星占比)" }, "traffic": { "weight": 0.15, "method": "BSR中位数在品类中的百分位" }, "salesEfficiency": { "weight": 0.15, "method": "品牌月销量 vs 品类均值" }, "growthPotential": { "weight": 0.15, "method": "新品比例 + 销量趋势 + 品类CR5位置" }, "vocReputation": { "weight": 0.15, "method": "好评率 + 评论增速 + Helpful比例" } }, "output": "dimensions" }, { "step": 6, "name": "竞争定位+标签+建议", "type": "compute", "logic": "generatePositioning(dimensions, productDetails, brandName)", "algorithm": { "quadrant": "四象限图坐标(价格-评分)", "opportunityTags": "从每个维度评分提取优势机会", "riskTags": "识别低分维度作为风险点", "coreShortcoming": "最低分维度的具体诊断和改进建议", "priorityActions": "按紧迫度排序的改进任务" }, "output": "positioning" } ], "response": { "type": "object", "properties": { "brandName": { "type": "string" }, "dimensions": { "type": "object", "description": "六维评分", "properties": { "pricing": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } }, "rating": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } }, "traffic": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } }, "salesEfficiency": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } }, "growthPotential": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } }, "vocReputation": { "type": "object", "properties": { "score": { "type": "integer" }, "label": { "type": "string" }, "detail": { "type": "string" } } } } }, "overallScore": { "type": "number" }, "positioning": { "type": "object", "properties": { "quadrant": { "type": "string" }, "x": { "type": "number" }, "y": { "type": "number" }, "xLabel": { "type": "string" }, "yLabel": { "type": "string" } } }, "strengths": { "type": "array", "items": { "type": "string" } }, "weaknesses": { "type": "array", "items": { "type": "string" } }, "opportunityTags": { "type": "array", "items": { "type": "string" } }, "riskTags": { "type": "array", "items": { "type": "string" } }, "coreShortcoming": { "type": "object", "properties": { "dimension": { "type": "string" }, "score": { "type": "integer" }, "diagnosis": { "type": "string" }, "advice": { "type": "string" } } }, "priorityActions": { "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string" }, "priority": { "type": "integer" } } } }, "calibrationCard": { "type": "string", "description": "品牌认知校准卡(Markdown格式)" } } }, "timeout": 300000, "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" } } }