> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/recipes/woocommerce-order-to-wecom.md).

# 在 Duaer 里把 WooCommerce 新订单推送到企业微信群

在 Duaer 里，WooCommerce 每来一个新订单，就把订单号、金额、客户和商品推到企业微信群。
## 在 Duaer 里搭订单通知

1. 在 WordPress 后台的 WooCommerce › 设置 › 高级 › REST API 里新建密钥，权限选读/写（触发器要用它注册 Webhook）。
2. 在 Duaer 建 [WooCommerce 凭证](/zh/integrations/builtin/credentials/woocommerce.md)，填 Consumer Key、Consumer Secret 和店铺地址。
3. 加 [WooCommerce Trigger](/zh/integrations/builtin/trigger-nodes/duaer-nodes-base.woocommercetrigger.md)，Event 选 order.created。
4. 接 [企业微信](/zh/build/wecom.md) 节点，资源选「消息推送」，用群机器人 Webhook 凭证。
5. 内容写：新订单 #{{ $json.number }}，{{ $json.total }} {{ $json.currency }}，{{ $json.billing.first_name }}，商品：{{ $json.line_items.map(i => i.name + " x" + i.quantity).join("；") }}
6. 发布数字组织。

## 常见问题

- 只想推大单：在推送前加 [If](/zh/build/if.md)，条件 {{ Number($json.total) }} 大于 1000。
- 群里没收到：看企业微信节点输出的 errcode，见 [群机器人发送失败排查](/zh/troubleshooting/wecom-feishu-bot-webhook-errors.md)。
- WooCommerce 站点要能通过 HTTPS 访问，Duaer 也要能被 WooCommerce 访问到，Webhook 才推得过来。
## Questions

### Duaer 能把 WooCommerce 订单推到钉钉或飞书吗？

能。把 Duaer 流程里的企业微信节点换成 HTTP Request，调用对应机器人的 Webhook 地址。

### Duaer 的 WooCommerce 密钥为什么要读写权限？

Duaer 的 WooCommerce Trigger 要在店铺里注册 Webhook，只读密钥做不到。

## 相关

- [在 Duaer 里配置 WooCommerce 凭证](https://doc.duaer.com/zh/integrations/builtin/credentials/woocommerce.md)
- [在 Duaer 里用企业微信发消息](https://doc.duaer.com/zh/build/wecom.md)
- [在 Duaer 里排查企业微信、飞书群机器人发送失败](https://doc.duaer.com/zh/troubleshooting/wecom-feishu-bot-webhook-errors.md)

