In this guide you will learn when, why and how to send Message Feedback to report the outcome of whether the recipient of a message performed a specific tracked user action.
- Allows Twilio to optimize message deliverability.
- Supports gathering of Messaging Insights on the conversion of One-Time Passwords (OTP) and similar tracked user actions performed by the message recipient.
Message Feedback is intended for use cases where sending a message leads to a trackable user action performed by the message recipient. The primary use case is the sending of messages with one-time passwords (OTP) and similar authentication or account verification codes (PINs) in two-factor or multi-factor authentication (2FA or MFA) scenarios.
In these cases, there are consistently occurring trackable user actions which are uniquely identifiable, so they can be traced back to a specific sent Message and its Message Feedback subresource.
Examples of such trackable user actions include:
- A user receives a message with a one-time verification code and enters it into a website or app for 2FA/MFA.
- A user receives a message with a temporary password and uses it to reset the account password.
- A user receives a message and replies to it with a call or message.
- A user clicks on a unique link contained in the message.
Sending messages nationally or internationally is not a one-size-fits-all operation. Message deliverability varies by geography, involved carriers, use case, and even for individual customers. Twilio uses a mix of automated algorithms and manual adjustments to ensure the best possible message deliverability for customers.
By providing Message Feedback you serve two related purposes:
- You complement the delivery status data automatically captured by Twilio and involved carriers throughout the message lifecycle with valuable information about the actual performance of user actions by the message recipient. This additional information allows Twilio to further optimize message deliverability both in the aggregate and for your account specifically.
- You provide the very data that allow the real-time Messaging Insights OTP Conversion Report in the Console to be compiled. This report is a conversion funnel analysis tool covering messages tracked with feedback from sending, through successful delivery to confirmed user action performance.
Submitting Message Feedback to Twilio is a four-step process:
- Send a Message with
- Store Message SID retrievable in response to the tracked user action
- Track the user action performed in response to Message receipt
- Send Message Feedback to confirm the tracked user action was performed
For illustration purposes, the following steps assume that
- You send a message to the recipient (user) containing a URL with a unique confirmation
idas a query parameter.
- The tracked user action is the opening of the URL by the message recipient.
- You implemented a means of retrieving the unique Message SID for a sent confirmation message on the basis of the confirmation
Create a new Message with the
ProvideFeedback parameter set to
True to send the message underlying the uniquely trackable user action.
ProvideFeedback must be set to
True at time of Message creation so that:
- Twilio starts
- Capturing the necessary data to track delivery performance from Message creation and sending to the expected confirmation that the tracked user action was performed.
- Incorporating the gathered information in the Message Insights OTP Conversion Report immediately.
- You can send Message Feedback in Step 4 to confirm the actual performance of the tracked user action.
We recommend using the
ProvideFeedback parameter only on OTP messages to ensure a clean set of OTP-related data in the OTP Conversion report.
Store the Message SID of the Message created in Step 1 such that you can retrieve it on the basis of the uniquely identifiable user action you are tracking.
For purposes of the illustrative scenario, the Message SID must be stored and retrievable on the basis of the unique
id query parameter value contained in the URL sent with the Step 1 message.
Track the performance of the unique user action performed in response to the successful receipt of the Message sent in Step 1.
For purposes of the illustrative scenario, you know the tracked user action has been performed, when your backend route handler for the URL sent in Step 1 is called with the unique confirmation
id as a query parameter.
Once you determine that the unique tracked user action in Step 3 has been performed by the message recipient, you
- Retrieve the unique Message SID of the specific Message underlying the tracked user action.
- Update the Message Feedback for the Message with
confirmedto report to Twilio that the tracked user action was performed.
Update the Message Feedback even if the Message is received with a delay once the conditions for confirmation are met. This ensures the Messaging Insights are current and message delivery optimizations are based on complete information.
Do not update the Message Feedback if the tracked user action is not performed, this will result in the Message Feedback resource's
outcome status correctly remaining
Now that you have learned why, when and how to provide Message Feedback, you may wish to check out the following:
- View your reported Message Feedback information in the Console to help you monitor and understand your message deliverability.
- Looking for step-by-step instructions on tracking the delivery of your sent messages based on Twilio- and carrier-captured status data? Follow our guide to Tracking the Message Status of Outbound Messages in the programming language of your choice.