dalongxia/remote_sync/product-retention-decision.SKILL.md
2026-03-04 13:25:48 +08:00

64 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: product-retention-decision
description: Evaluate profit-based aftersale handling by product number and region, include return depreciation loss (default 20%), and recommend among return vs discount-compensation vs release-goods.
metadata:
{ "openclaw": { "emoji": "💰", "os": ["linux"], "requires": { "bins": ["company-db", "product-retention-decision"] } } }
---
# product-retention-decision Skill (OpenClaw)
Use this skill when user asks:
- 货号 + 省市区,判断退货还是补偿更划算
- 计算该订单利润后给出补偿区间
- 希望尽量留客、降低售后成本
- 要求把退回折旧损失(如20%)纳入决策
- 要求比较“退回/优惠/放货”三种方案
## Required inputs
- `product_no` (货号/商品ID/SPU/SKU)
- `province`
- Optional: `city`, `district`
## Command
```bash
product-retention-decision --product-no "<货号>" --province "<省>" [--city "<市>"] [--district "<区县>"] --days 15 --warehouse-transfer-fee 0 --depreciation-rate 0.20 --limit 10
```
## Cost model (15 days)
估算按订单均值:
- 销售价格(avg_sale_amount_per_order)
- 产品成本(avg_cost_amount_per_order)
- 发货运费(est_outbound_freight_per_order_15d)
- 退货运费(est_return_freight_per_order_15d)
- 仓储转运费(warehouse_transfer_fee_used)
- 退回折旧损失(depreciation_loss_if_return = 产品成本 * depreciation_rate)
公式:
`est_profit_per_order = 销售 - 成本 - 发货运费 - 退货运费 - 仓储转运费`
三方案净收益比较:
- `option_return_net_profit = -(发货运费 + 退货运费 + 仓储转运费 + 退回折旧损失)`
- `option_discount_net_profit_{low/high} = (销售 - 成本 - 发货运费) - 补偿金额`
- `option_release_net_profit = -(产品成本 + 发货运费)` (放货:仅退款不退货)
## Output result sets
1. 样本概览(订单数、发货件数、退货率)
2. 利润估算因子(5项成本+利润)
3. 处置建议(退回/优惠/放货三方案净收益、补偿区间、推荐方案、置信度)
4. 快递策略TOP(近15天)
5. 仓库策略TOP(近15天)
## Execution rules
1. Always run `exec: company-db health` once per turn before this command.
2. Piece/order counts first; amount as model inputs.
3. If no sample, return clear fallback (放宽地区条件或延长周期) and do not fake compensation.
4. This route must stay in SQL only.