Let’s get you started sending mobile push notifications with Customer.io! There are two parts to setup:
Before you can add a push notification to your workflow, you’ll first need to enable it in your Email & Actions settings. There, you’ll see fields for both Android and iOS platform configuration.
Sending push notifications to Android devices is done via Firebase Cloud Messaging. You’ll need to generate a .JSON server key, which you enter in the push notification settings. Here’s how you do that:
This will generate the JSON key that you can upload into your Android settings:
You will see this option in your iOS configuration:
What it means is that we can use Firebase Cloud Messaging to identify and send messages to iOS devices as well, provided that you’ve set up FCM to do so. This might make sense for you if FCM is a critical part of your infrastructure, and you don’t plan on configuring the Apple Push Notification Service anytime soon.
If you select the option, you will be able to send to iOS via FCM. Please note, you will still need to setup the configuiration for Android if you haven’t yet done so.
Sending push notifications to Apple devices is done via the Apple Push Notification service (APNs). You’ll need a few things:
There are a couple of ways to make sure that your initial configuration is working. You can send a single test message from the settings, or (if you have an iOS app) use a separate sandbox environment for your tests.
If you want to send a single test message to make sure your configuration and certificates are working, you can do that from within a platform settings page, right next to the platform certificates (after they have been uploaded):
Enter your token you’d like to test with (see how to find those here), and you’ll hopefully get a test push to that device with the following content: “If you’re reading this, it means your integration with Customer.io is working!” and you’re set to start adding push notifications to your campaigns.
Your iOS certificate may have both sandbox and production environments. If you’d like to send all of your push notifications to your sandbox environment, you can choose that option in your iOS configuration.
When it comes time to add push notifications to your campaign, you’ll see it as an enabled action in your workflow. Go ahead and add it:
Then, you can add content to your push notification, change its behaviour from Queue Draft to Send Automatically, or Don’t Send (skip), add action conditions, etc.
You will also see an option to choose which platform you’d like to send your push notification to (for example, if you only want to send to one of iOS or Android):
When you click to add content, you’ll be brought to the composer, where your message has three elements:
To: By default, your push notification will go to all devices associated with a particular user. However, you have two other options:
Title is what appears above the main text of your message. This is optional. If you don’t specify one, then…
Message is your message text. This can be as long as you like, though brevity will likely serve you well!
And that’s it! Save, and you’ve set up a push notification in Customer.io. Next, you’re ready to track their success.
To preview your push notification, hit the Preview toggle to see what it might look like:
We’ve chosen an “Alert” style for our display, but kept it fairly generic due to the sheer amount of devices that might be out there. To truly see what it looks like on a specific device, we encourage you to send a test to that device.
If you’d like to test one aspect of a push notification’s content (a slight copy change, perhaps), you can do that by creating an A/B test from the push notification workflow item, like this:
Then, once you start your test and your campaign is active, you can check in on the results in the A/B test tab:
If you want to send a single test push to a particular device for QA purposes, you’ll need to have a device token ready.
You may already have some test device tokens handy, but if you want to test with a specific user, you can find these in a few places on an individual Person page. First, you’ll find them on the Overview, as well as in the Devices tab:
From either of these places, you can quickly copy a device token to your clipboard.
To see your push notification’s content on a single device, paste your device token into the “Send test…” box in the Push composer and send a test to it. You may see a “Device type” option if you have both Android and iOS enabled, and you’ll need to tell us which type your test device is:
If you’ve chosen to send to sandbox in your Push settings, that will be enabled here. To disable it, you’ll need to return to your settings and uncheck that box:
Once you’ve sent a test, you’ll be able to quickly re-use that token, too. Check the box and we’ll auto-fill the value for you:
As with all other Customer.io messages, you can use relevant customer data in your notification! If you’ve got an event or API triggered broadcast campaign, you can also use event and broadcast data! Here’s an example of a weather alert using data, and its preview result:
We are actively working to improve on this feature! Please let us know your feedback.