Opt-in and opt-out
Overview
Handling WhatsApp opt-ins and opt-outs is crucial as WhatsApp monitors your phone number quality rating, and low ratings may result in your message limits being reduced. One way to ensure a high-quality rating is to prevent users from blocking or reporting your business. This can be done by providing high-quality messaging (i.e., value to your users), controlling message frequency, and allowing customers to opt-out of receiving future communications.
Opt-ins can come from external sources or from Braze methods such as SMS or in-app and in-browser messages. Opt-outs can be dealt with using keywords set in Braze and WhatsApp marketing buttons. Reference the following methods for guidance on setting up opt-ins and opt-outs.
Opt-in methods
Opt-out methods
Set up opt-ins for your Braze WhatsApp channel
For WhatsApp opt-ins, you must comply with WhatsApp’s requirements. You will also need to provide Braze with the following information:
- A
external_id
, a phone number, and an updated subscription status for every user. This can be done by using the SDK or through the/users/track
endpoint to update the phone number and subscription status.
Note that Braze has recently released an improvement to the /users/track
endpoint that allows updates to the subscription status updates. However, if you have already created opt-in protocols using the /subscription/status/set endpoint
, you may continue to do so there.
External to Braze opt-in methods
Your app or website (account registration, checkout page, account settings, credit card terminal) to Braze.
Wherever you already have marketing consent for email or texting, include an additional section for WhatsApp. Once a user opts-in, they need an external_id
, a phone number, and updated subscription status. To do this, depending on how your install of Braze is set up, either leverage the /subscription/status/set
endpoint or use the SDK.
Externally built opt-in list
If you have used WhatsApp previously, you may have already built a user list with opt-ins per the WhatsApp requirements. In this case, upload a CSV or use the API with the following information into Braze.
Outbound message in customer support WhatsApp channel
In your customer support channel, follow up on resolved issues with an automatic message asking if they want to opt-in to marketing messaging. The functionality here depends on the feature availability in your customer support tool of choice and where you keep user information.
- Provide a [message link] from your WhatsApp Business phone number.
- Provide quick reply actions where the customer replies “Yes” to indicate opt-in
- Set up custom keyword trigger.
- For either of those ideas, you will probably need to finish the path with the following:
- Call the /users/track endpoint to either update or create a user
- Leverage the /subscription/status/set endpoint or use the SDK
Inbound WhatsApp message
Have customers send an inbound message to the WhatsApp number.
This can be set up as a Canvas or a campaign, depending on whether you’d like the user to receive a confirmation message on the new channel.
- Create a webhook campaign
Example webhook method: - Create a campaign with the action-based delivery trigger of an inbound message
Note that you can build a URL or QR code to join a WhatsApp channel from within the WhatsApp manager under Phone Number > Message Links.
Braze-powered opt-in methods
SMS message
In Canvas, set up a campaign that asks customers if they want to opt-in to receiving WhatsApp messages. For example:
- Customer segment: subscribed marketing group outside of the US
- Custom keyword trigger setup
- Update method:
- Braze-to-Braze webhook that updates the subscription status via Rest API
- Update user profile via advanced JSON editor with the following template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "attributes": [ { "subscription_groups": [{ "subscription_group_id": "subscription_group_identifier_1", "subscription_state": "unsubscribed" }, { "subscription_group_id": "subscription_group_identifier_2", "subscription_state": "subscribed" }, { "subscription_group_id": "subscription_group_identifier_3", "subscription_state": "subscribed" } ] } ] }
In-app or in-browser message
Create an in-app message or in-browser pop-up prompting customers to opt-in to WhatsApp usage.
Use HTML in-app message with JavaScript “bridge” to interface with Braze SDK. Make sure to use the WhatsApp subscription group ID.
Set up opt-outs for your Braze WhatsApp channel
General opt-out keywords
You can set up a campaign or Canvas that allows users who message in particular words to opt-out of future messaging. Canvases can be especially beneficial as they allow you to include a follow-up message that confirms the successful opt-out.
Step 1: Create a Canvas with a trigger of “Inbound WhatsApp Message”
When selecting keyword triggers, include words like “Stop” or “No Message”. If you choose this method, ensure your customers know your opt-out words. For example, after receiving the initial opt-in, include a follow-up response like “To opt-out of these messages, message “Stop” at any time.”
Step 2: Update the user’s profile
Update the user’s profile by using the advanced JSON editor or creating a Braze-to-Braze webhook.
-
Using the “Update user profile” Canvas action advanced JSON editor, use the following template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "attributes": [ { "subscription_groups": [{ "subscription_group_id": "subscription_group_identifier_1", "subscription_state": "unsubscribed" }, { "subscription_group_id": "subscription_group_identifier_2", "subscription_state": "subscribed" }, { "subscription_group_id": "subscription_group_identifier_3", "subscription_state": "subscribed" } ] } ] }
-
Creating a Braze-to-Braze webhook that updates the user’s subscription status to “unsubscribed”. A similar example can be seen below:
Optionally, you can include a follow-up message that lets the user know that they’ve been unsubscribed from the channel. Make sure this occurs before the unsubscribe step occurs, as you will no longer be able to message the user.
Marketing opt-out selection
Within the WhatsApp message template creator, you can include the “marketing opt-out” option. Any time you include this, ensure the template is used in a Canvas with a subsequent step for a subscription group change.
- Create a message template with the “marketing opt-out” quick reply.
- Create a Canvas that uses this message template.
- Follow the steps in the preceding example but with the trigger text “STOP PROMOTIONS”.
- Update the user’s subscription status.
- Create a Braze-to-Braze webhook that updates the user’s subscription status to “unsubscribed”
- Use the “update user profile” Canvas advanced JSON editor and use the following template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "attributes": [ { "subscription_groups": [{ "subscription_group_id": "subscription_group_identifier_1", "subscription_state": "unsubscribed" }, { "subscription_group_id": "subscription_group_identifier_2", "subscription_state": "subscribed" }, { "subscription_group_id": "subscription_group_identifier_3", "subscription_state": "subscribed" } ] } ] }
Note that Braze has plans to automatically process these marketing opt-outs within the next year but requires a manual process to set it up.