适用于 AI 聊天机器人的 WhatsApp 集成
关于此集成
WhatsApp 是 Botpress 上最受欢迎的集成。它允许开发者将他们的聊天机器人和 AI 智能体连接到 WhatsApp 消息平台。
通常,我们的用户会使用 WhatsApp 集成在 WhatsApp 上部署聊天机器人——比如作为客服热线、潜在客户培育,或任何通过 WhatsApp 进行的信息交流。
该集成基于官方 WhatsApp Business API 构建,确保每一次交互都安全、可靠,并符合 WhatsApp 的政策。
我们预置的集成让您可以轻松构建 WhatsApp 聊天机器人,无论您的编程水平如何。
主要功能
- 自动化客户对话
- 发送实时通知
- 支持多媒体消息(图片、视频、语音)
- 利用聊天机器人数据个性化回复
- 支持与用户的双向消息互动
- 可根据 WhatsApp 互动触发工作流
- 支持跨地区、跨语言扩展服务
- 确保符合 WhatsApp Business API 的合规要求
常见问题
哪些聊天机器人平台可以集成 WhatsApp?
您需要申请 WhatsApp Business API 访问权限,然后将您的聊天机器人平台与已获批的账号连接。大多数平台(包括 Botpress)都提供连接器,您只需添加 WhatsApp Business 账号信息、电话号码和模板。连接后,聊天机器人即可通过 WhatsApp 发送和接收消息。
如何将聊天机器人连接到 WhatsApp Business API?
您需要一个 WhatsApp Business 账号、一个已验证的电话号码,以及 Meta 的 API 访问批准。缺少其中任何一项,都无法上线正式的 WhatsApp 聊天机器人。
将聊天机器人集成到 WhatsApp 需要多少钱?
在 Botpress 等平台上集成 WhatsApp 聊天机器人是免费的。但上线后,您需要为 LLM 的 API 和 WhatsApp(Meta)支付少量费用。通常每条消息约 $0.008 至 $0.063 美元,每月大约 $50-$150 美元,具体取决于用户量。
使用 WhatsApp 聊天机器人需要经过验证的企业账号吗?
需要。要访问 Business API 并确保消息符合 WhatsApp 规则,必须完成账号验证。
WhatsApp 聊天机器人可以发送图片、文件或语音吗?
可以。WhatsApp 聊天机器人可以处理文本、图片、PDF、文档、视频和语音消息。对于主动推送消息,通常需要在预先批准的消息模板中发送;而用户主动发起的对话则可以自由回复多媒体内容。
WhatsApp 聊天机器人是否安全且符合数据隐私规定?
如果基于官方 WhatsApp Business API 构建,则是安全的。所有通信均为端到端加密,Meta 也会确保符合 GDPR 及其他地区隐私标准。安全性还取决于您的聊天机器人平台如何存储客户数据,因此开发者应实施适当的访问控制,并遵循所属行业的合规要求。
在设置 WhatsApp 聊天机器人之前,我需要准备什么?
您需要一个 WhatsApp Business 账号、一个已验证的电话号码,以及 Meta 的 API 访问批准。缺少其中任何一项,都无法上线正式的 WhatsApp 聊天机器人。
获得 WhatsApp API 访问批准需要多长时间?
审批通常需要几天,但根据 Meta 审核进度,最长可能需要几周。流程会核查您的企业信息、电话号码归属权以及是否符合 WhatsApp 政策。
<iframe src="https://www.youtube.com/embed/Fs6dIxgEKoY" ></iframe>
The WhatsApp integration allows your AI-powered chatbot to seamlessly connect with WhatsApp, one of the most popular messaging platforms worldwide. Integrate your chatbot with WhatsApp to engage with your audience, automate conversations, and provide instant support. With this integration, you can send messages, handle inquiries, deliver notifications, and perform actions directly within WhatsApp. Leverage WhatsApp's powerful features such as text messages, media sharing, document sharing, and more to create personalized and interactive chatbot experiences. Connect with users on a platform they already use and enhance customer engagement with the WhatsApp Integration for Botpress.
## Migrating from 3.x to 4.x
### Automatic downloading of media files
Previously, accessing the content of media messages (such as images, videos, audio and documents) required authenticating with the WhatsApp API using a valid token. In version 4.0 of WhatsApp, the _Download Media_ parameter enables automatic downloading of media files. These downloaded files do not require authentication for access. However, they do count against your workspace's file storage. To continue using the WhatsApp API URLs, set the _Download Media_ parameter to disabled. The _Downloaded Media Expiry_ parameter allows you to set an expiry time for downloaded files.
### Interactive messages values
In version 4.0 of WhatsApp, all incoming button and list reply messages will include both the text displayed to the user (_text_) and the payload (_value_). Use `event.payload.text` to retrieve the label of a button or choice, and use `event.payload.value` to access the underlying value.
### _postback_ and _say_ messages prefix
In version 4.0 of WhatsApp, _postback_ and _say_ messages no longer use the prefixes `p:` or `s:`. If your bot relied on these prefixes for logic or transitions, you can update it to depend solely on the value set for the postback.
### Start conversation
Version 4.0 of WhatsApp introduces small changes in the call signature of the `startConversation` action:
- The `senderPhoneNumberId` parameter has been renamed to `botPhoneNumberId`
- The input object now includes a single property called `conversation`, which contains the actual arguments
If your bot used the `startConversation` action, make sure all parameters are set. Also, if you called `startConversation` from code, make sure the action is called with the correct arguments:
```ts
actions.whatsapp.startConversation({
conversation: {
userPhone: '+1 123 456 7890',
templateName: 'test_message',
templateLanguage: 'en',
templateVariablesJson: JSON.stringify(['First value', 'Second value'])
botPhoneNumberId: '1234567890'
}
})
```