WhatsApp Business API¶
Webhook configuration¶
integration:
name: "WhatsAppIntegration"
type: "webhook"
provider: "Meta"
endpoint: "/webhooks/whatsapp"
authentication:
verifyToken: "{env:WA_VERIFY_TOKEN}"
appSecret: "{env:WA_APP_SECRET}"
messageHandling:
# Incoming text message
- type: "text"
action:
findOrCreateContact:
phoneField: "from"
createActivity:
type: "WhatsAppMessage"
direction: "Inbound"
notifyUser:
role: "Dispatcher"
# Incoming image
- type: "image"
action:
downloadMedia: true
attachToContact: true
createLead:
name: "WhatsApp photo from {contact.name}"
source: "WhatsApp"
templates:
serviceConfirmation:
name: "service_confirmation"
language: "cs"
components:
- type: "body"
parameters:
- "{serviceRequest.number}"
- "{serviceTrip.scheduledStart}"
- "{technician.name}"
Message types¶
| Type | Description |
|---|---|
text |
Text message |
image |
Image |
document |
Document |
location |
Location |
contact |
Contact |
➡️ Continue to Google Maps.