🐛 (whatsapp) Fix auto start input where it didn't display next bu… (#869)
…bbles <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ### Summary by CodeRabbit **Release Notes** - New Feature: Enhanced WhatsApp integration with improved phone number formatting and session ID generation. - Refactor: Updated the `startWhatsAppPreview` and `receiveMessagePreview` functions for better consistency and readability. - Bug Fix: Added a check for `phoneNumberId` in the `receiveMessage` function to prevent errors when it's undefined. - Documentation: Expanded the WhatsApp integration guide and FAQs in the docs, providing more detailed instructions and addressing common queries. - Chore: Introduced a new `metadata` field in the `whatsAppWebhookRequestBodySchema` to store the `phone_number_id`. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -17,3 +17,5 @@ It is possible that Meta automatically restricts your newly created Business acc
|
||||
4. Select `Business` type
|
||||
5. Give it any name and select your newly created Business Account
|
||||
6. On the app page, look for `WhatsApp` product and enable it
|
||||
|
||||
You can then follow the instructions in the Share tab of your bot to connect your Meta app to Typebot.
|
||||
|
||||
@@ -29,8 +29,32 @@ WhatsApp environment have some limitations that you need to keep in mind when bu
|
||||
- Google Analytics block
|
||||
- Meta Pixel blocks
|
||||
|
||||
## Configuration
|
||||
|
||||
You can customize how your bot behaves on WhatsApp in the `Configure integration` section
|
||||
|
||||
<img src="/img/whatsapp/configure-integration.png" alt="WhatsApp configure integration" />
|
||||
|
||||
**Session expiration timeout**: A number from 0 to 48 which is the number of hours after which the session will expire. If the user doesn't interact with the bot for more than the timeout, the session will expire and if user sends a new message, it will start a new chat.
|
||||
|
||||
**Start bot condition**: A condition that will be evaluated when a user starts a conversation with your bot. If the condition is not met, the bot will not be triggered.
|
||||
|
||||
## Contact information
|
||||
|
||||
You can automatically assign contact name and phone number to a variable in your bot using a Set variable block with the dedicated system values:
|
||||
|
||||
<img src="/img/whatsapp/contact-var.png" alt="WhatsApp contact system variables" />
|
||||
|
||||
## FAQ
|
||||
|
||||
### How many WhatsApp numbers can I use?
|
||||
|
||||
You can integrate as many numbers as you'd like. Keep in mind that Typebot does not provide those numbers. We work as a "Bring your own Meta application" and we give you clear instructions on [how to set up your Meta app](./whatsapp/create-meta-app).
|
||||
|
||||
### Can I link multiple bots to the same WhatsApp number?
|
||||
|
||||
Yes, you can. You will have to add a "Start bot condition" to each of your bots to make sure that the right bot is triggered when a user starts a conversation.
|
||||
|
||||
### Does the integration with WhatsApp requires any paid API?
|
||||
|
||||
You integrate your typebots with your own WhatsApp Business Platform which is the official service from Meta. At the moment, the first 1,000 Service conversations each month are free. For more information, refer to [their documentation](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#pricing---payment-methods)
|
||||
|
||||
@@ -33087,6 +33087,18 @@
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"phone_number_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"phone_number_id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -33388,6 +33400,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"metadata"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5746,7 +5746,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"pixelId": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Deprecated"
|
||||
},
|
||||
"pixelIds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"gtmId": {
|
||||
"type": "string"
|
||||
@@ -6396,28 +6403,48 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filePathProps": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typebotId": {
|
||||
"type": "string"
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typebotId": {
|
||||
"type": "string"
|
||||
},
|
||||
"blockId": {
|
||||
"type": "string"
|
||||
},
|
||||
"resultId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"typebotId",
|
||||
"blockId",
|
||||
"resultId",
|
||||
"fileName"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"blockId": {
|
||||
"type": "string"
|
||||
},
|
||||
"resultId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string"
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionId": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sessionId",
|
||||
"fileName"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"typebotId",
|
||||
"blockId",
|
||||
"resultId",
|
||||
"fileName"
|
||||
],
|
||||
"additionalProperties": false
|
||||
]
|
||||
},
|
||||
"fileType": {
|
||||
"type": "string"
|
||||
@@ -6604,6 +6631,18 @@
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"phone_number_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"phone_number_id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -6905,6 +6944,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"metadata"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
||||
BIN
apps/docs/static/img/whatsapp/configure-integration.png
vendored
Normal file
BIN
apps/docs/static/img/whatsapp/configure-integration.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
Reference in New Issue
Block a user