With the Delivery Receipts feature, you can obtain information about the status of Conversations Messages sent to non-ChatParticipants (i.e. SMS and WhatsApp channels).
You can verify if the Messages were sent, delivered or even read (for OTT) by other Conversations Participants.
Let's get started!
What are Delivery Receipts?
Delivery Receipts are summaries that contain detailed information about the messages sent to Participants in non-Chat channels.
This feature includes information about:
A summary of the Message's delivery statuses
The number of Messages sent
The number of Conversation Participants the message(s) was sent to
Types of Delivery Receipt Message Statuses
Delivery Receipts can contain the following message statuses:
sent
delivered
read
failed
undelivered
Aggregated Delivery Receipts
An Aggregated Delivery Receipt contains a general summary of the delivery statuses of a Message to all non-Chat Participants in the Conversation.
Use aggregated receipts to represent the overall delivery status of a Message.
You can retrieve the Aggregated Delivery Receipts summaries from any Message object in a Conversation that contains non-Chat recipients. This is often enough to confirm successful delivery of the message.
Aggregated Delivery Receipts
Node.js
Typescript
_17
/* Retrieving Delivery Receipts (aggregated and detailed) for rendering */
alert(`Out of ${totalReceipts} sent messages, ${deliveredReceipts} were delivered, ${failedReceipts} have failed.`);
_17
}
Detailed Delivery Receipts
A Detailed Delivery Receipt represents the Message delivery status to a specific non-Chat Participant in the Conversation.
Use detailed receipts when you want to show the specific recipient who didn't receive the message.
You can also get a list of the Detailed Delivery Receipts by calling the correct method on the same object. This is useful if you want to render separate sent/delivered/read statuses for specific Participants.
Retrieving detailed receipts is necessary for error retrieval and handling. Each detailed receipt for a message that failed will contain a Twilio error code indicating the failure reason.
If the message status is failed or undelivered, you can handle the error code accordingly.