To get delivery status and incoming WhatsApp Messages, you need to set webhook endpoints in CRM Messaging Developer Console Text Messaging for Marketers and Sales Reps – CRM Messaging (crm-messaging.cloud)
Delivery Status Payload
You will get real time updates on your delivery webhook endpoint with message status as sent, delivered and read in status field.
In case your message fails to deliver, you will get response with error code as shown below
Error code description can be found on Facebook Whatsapp error logs (1) Error Codes – WhatsApp Business Platform Cloud API (facebook.com)
Incoming WhatsApp Message
For each incoming Whatsapp message, you will be notified on the incoming webhook with payload looking like,
Note that msg field will have message body and media field will have a media attachment URL.