Two-Way WhatsApp Webhook Sync Instant Action
Configure Meta's real-time Webhook listener so customer button clicks (Reschedule, GPS Pin, Cancel) trigger autonomous courier re-routing directly on your WooCommerce store.
1. Bi-Directional Webhook Architecture
How signals travel between your customer's WhatsApp chat, Meta Graph API, and your store:
2. Meta Callback URL & Verify Token Handshake
In your Meta Developer Console, navigate to WhatsApp > Configuration > Callback URL:
Callback URL
Your store's REST endpoint listening for incoming Meta events.
Verify Token
Secret phrase configured in ZeroRTO WhatsApp settings.
Your Store's Endpoint Format:
https://yourstore.com/wp-json/rescuedrop/v1/whatsapp-webhook
- Click Edit beside Callback URL in Meta Developer portal.
- Paste your store's endpoint URL:
https://yourstore.com/wp-json/rescuedrop/v1/whatsapp-webhook. - Enter your Verify Token (Default in settings is:
rescuedrop_secret_ndr_token). - Click Verify and Save. Meta will perform an instant GET verification handshake and display a green checkmark!
3. Subscribe to the "messages" Event (Crucial Step)
Once the webhook URL is verified, you must tell Meta which events to send:
Saving the Callback URL is not enough! Under Webhook Fields, find the row named messages and click Subscribe. If this is not toggled on, Meta will never notify your store when customers tap buttons.
4. How ZeroRTO Processes Inbound Customer Actions
ZeroRTO's autonomous engine supports button taps, plain text replies, and live GPS pins:
📅 Reschedule Signal
Calculates tomorrow's GMT date, calls the courier API to re-attempt, marks order status to rescheduled, and sends a WhatsApp confirmation.
📍 Address Update
Decodes native WhatsApp GPS coordinates into a Google Maps URL, transmits directions to the courier executive, and updates WooCommerce order notes.
❌ Immediate Cancellation
Instructs courier partner to abort delivery and return parcel to origin (RTO), updating WooCommerce order status directly to cancelled.
5. Troubleshooting Webhook Handshake Failures
- Cloudflare / WAF Blockers: If Meta says "The URL couldn't be validated", ensure Cloudflare Bot Fight Mode or Wordfence Firewall is not blocking requests to
/wp-json/rescuedrop/v1/. - Pretty Permalinks: Ensure WordPress Settings > Permalinks is set to Post name (Plain query permalinks can break REST endpoints).
- SSL Certificate: The URL must use valid HTTPS (Self-signed development certificates will be rejected by Meta).