Sending Test Messages

Before sending out a messaging campaign to your users, you may want to test it to make sure it looks right and operates in the intended manner. Creating and sending test messages to select devices or members of your team is very simple using the tools in the dashboard.

Creating a Designated Test Segment

Once you set up a test segment, you can utilize it to test any of our messaging channels. The process is very simple and if configured properly will only need to be done once.

Navigate to the “Segments” page in the dashboard and create a new segment. In the dropdown menu under “Add Filter”, you’ll find our testing filters at the bottom of the list.

Testing Filters

Our testing filters allow you to select users with specific email addresses or external user IDs.

Testing Filter Options

These filters have three options:

1) “Equals” - This will look for an exact match of the email or user ID that you provide. Use this if you only want to send the test campaigns to devices associated with a single email or user ID.

2) “Does Not Equal” - Use this if you want to exclude a particular email or user ID from test campaigns.

3) “Matches” - This will find users that have email addresses or user IDs that match part of the search term you provide. You could use this to find only the users that have an “@yourcompany.com” address, allowing you to send messages to everyone on your team.

These filters can also be used in conjunction with each other to narrow down your list of test users. For example, the test segment could include an email address filter that “matches” “@braze.com” and another filter that “does not equal” “sales@braze.com”. You can also select multiple specific emails by using the “matches” option and separating the email addresses with a | character (e.g. “matches” “email1@braze.com | email2@braze.com”).

After adding the testing filters to your test segment, you can verify that you’ve selected only the users you intended by clicking “Preview” at the top of the segment editor or by exporting that segment’s user data to CSV by clicking on the gear icon in the right hand corner of the editor and selecting “CSV Export All User Data” from the dropdown menu.

Verify Test Segment

Exporting the segment’s User Data to CSV will give you the most accurate picture of who falls under that segment. The “Preview” tab is only a sample of the users in the segment - see more details about this in our FAQ - and therefore may appear to have not selected all intended members.

Once you’ve confirmed that you’re only targeting the users that you want to receive the test message, you can either select this segment in an existing campaign that you want to test or click the “Start Campaign” button in the segment menu.

Sending a Test Push Notification or In-App Messages

In order to send test push notifications and/or in-app messages, you need to target your previously created test segment. Begin by creating your campaign and following the usual steps. When you reach the ‘Target Users’ section, select your test segment as shown below.

Test Segment

Finish confirming your campaign and launch it to test your push notification and in-app messages.

Be sure to check the box titled “Allow users to become re-eligible to receive campaign” under the Schedule portion of the campaign wizard if you intend to use a single campaign to send a test message to yourself more than once.

If you’re only testing email messages, you do not have to set up a test segment. In the first step of the campaign wizard where you compose your campaign’s email message, there is a “Send Test” button in the bottom left corner.

Sending a Test Email Message

Send Test Button

Clicking on this button causes a window to appear where you can enter the email address you would like the test email to be sent to. Click “Send Test” and your test email will be delivered shortly.

Testing In-App Messages and Push via CURL

Alternatively, if you’d like to test in-app and push notifications via the command-line you can follow the following examples below for each platform.

Testing Push with iOS Apps via CURL

You can send a single notification through the terminal via CURL and the Messaging API. You will need to replace the following fields with the correct values for your test case:

The examples below demonstrate the appropriate API endpoints for customers on the US-01 instance. If you are not on this instance please refer to our API documentation to see which endpoint to make requests to.

1
curl -X POST -H "Content-Type: application/json" -d "{\"api_key\":\"YOUR_API_KEY\",\"external_user_ids\":[\"YOUR_EXTERNAL_USER_ID\"],\"messages\":{\"apple_push\":{\"alert\":\"Test push\",\"extra\":{\"YOUR_KEY1\":\"YOUR_VALUE1\"}}}}" https://rest.iad-01.braze.com/messages/send

Testing Push with Android Apps via CURL

You can send a single notification through the terminal via cURL and the Messaging API. You will need to replace the following fields with the correct values for your test case:

The examples below demonstrate the appropriate API endpoints for customers on the US-01 instance. If you are not on this instance please refer to our API documentation to see which endpoint to make requests to.

1
curl -X POST -H "Content-Type: application/json" -d "{\"api_key\":\"YOUR_API_KEY\",\"external_user_ids\":[\"YOUR_EXTERNAL_USER_ID\"],\"messages\":{\"android_push\":{\"title\":\"Test push title\",\"alert\":\"Test push\",\"extra\":{\"YOUR_KEY1\":\"YOUR_VALUE1\"}}}}" https://rest.iad-01.braze.com/messages/send

Testing Push with Kindle Apps via CURL

You can send a single notification through the terminal via cURL and the Messaging API. You will need to replace the following fields with the correct values for your test case:

1
curl -X POST -H "Content-Type: application/json" -d "{\"api_key\":\"YOUR_API_KEY\",\"external_user_ids\":[\"YOUR_EXTERNAL_USER_ID\"],\"messages\":{\"kindle_push\":{\"title\":\"Test push title\",\"alert\":\"Test push\",\"extra\":{\"YOUR_KEY1\":\"YOUR_VALUE1\"}}}}" https://rest.iad-01.braze.com/messages/send

Testing Push with Windows Universal Apps via CURL

You can send a single notification through the terminal via cURL and the Messaging API. You will need to replace the following fields with the correct values for your test case:

The examples below demonstrate the appropriate API endpoints for customers on the US-01 instance. If you are not on this instance please refer to our API documentation to see which endpoint to make requests to.

1
curl -X POST -H "Content-Type: application/json" -d "{\"api_key\":\"YOUR_API_KEY\",\"external_user_ids\":[\"YOUR_EXTERNAL_USER_ID\"],\"messages\":{\"windows_push\":{\"push_type\":\"toast_text_01\",\"toast_text1\":\"test_title\"}}}" https://rest.iad-01.braze.com/messages/send

Testing Push with Windows Phone Apps via CURL

You can send a single notification through the terminal via cURL and the Messaging API. You will need to replace the following fields with the correct values for your test case:

The examples below demonstrate the appropriate API endpoints for customers on the US-01 instance. If you are not on this instance please refer to our API documentation to see which endpoint to make requests to.

1
curl -X POST -H "Content-Type: application/json" -d "{\"api_key\":\"YOUR_API_KEY\",\"external_user_ids\":[\"YOUR_EXTERNAL_USER_ID\"],\"messages\":{\"windows_push\":{\"push_type\":\"toast\",\"toast_title\":\"test_title\",\"toast_content\":\"message_goes_here\",\"toast_navigation_uri\":\"uri_goes_here\"}}}" https://rest.iad-01.braze.com/messages/send
WAS THIS PAGE HELPFUL?