Firebase Cloud Messaging Connector Setup Guide
Firebase Cloud Messaging is a cross-platform messaging solution that lets you reliably deliver messages at no cost. This article describes how to set up the Firebase Cloud Messaging Connector service in your Customer Data Hub profile.
Requirements
- Firebase Cloud Messaging Server Key
Supported Actions
Action Name | Trigger on Audience | Trigger on Streams |
---|---|---|
Send Message to Android Device | ✓ | ✓ |
Send Message to iOS Device | ✓ | ✓ |
Send Message to Web App | ✓ | ✓ |
Configure Settings
Go to the Connector Marketplace and add a new Firebase Cloud Messaging connector. Read the Connector Overview article for general instructions on how to add a connector.
To configure your vendor, follow these steps:
- In the Configure tab, provide a title for the connector instance
- Enter the server key located under project settings on the Cloud Messaging tab
- Provide additional notes about your implementation
Action Settings - Parameters and Options
Click Next or go to the Actions tab. It’s where you’ll set up actions and trigger them.
This section describes how to set up parameters and options for each action.
Action - Send Message to Android Device
Parameters
- Message Options: (Required) Configure recipient, delivery behavior, and UI for a push notification
- Data: (Optional) Specify non-visible data such as a call to synchronize
- Template Variables: Map Attribute(s) to template variable names. Template variables are available for substitution and rendering of all templates Refer to our Template Variables Guide for details
- Templates: Provide one or more templates to render. Typically, a single template is used to construct message data. Refer to our Templates Guide for common syntax and extensions
Options - Message Options
Option | Description |
---|---|
To | The recipient of a message. The value can be a device’s registration token, a device group’s notification key, or a single topic (prefixed with /topics/ ) |
Collapse Key | Identifies a group of messages (for example, with collapse_key: "Updates Available" ) that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active |
Priority | normal or high . See: Setting the priority of a message |
Time to Live | Specify how long (in seconds) the message should be kept in FCM storage if the device is offline. See: Setting the lifespan of a message |
Restricted Package Name | Specify the package name of the application where the registration tokens must match in order to receive the message |
Dry Run | When set to true, allows developers to test a request without actually sending a message |
Title | User-visible notification title |
Body | User-visible notification body |
Android Channel Id | Notification’s channel ID |
Icon | Must be a drawable resource name |
Sound | Filename located in /res/raw/ |
Tag | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer |
Color | Notification’s icon color, expressed in #rrggbb format |
Click Action | Value used for an intent filter when the user clicks on the notification |
Action - Send Message to iOS Device
Parameters
- Message Options: (Required) Configure recipient, delivery behavior, and UI for a push notification
- Data: (Optional) Specify non-visible data such as a call to synchronize
- Template Variables: Map Attribute(s) to template variable names. Template variables are available for substitution and rendering of all templates. Refer to our Template Variables Guide for details
- Templates: Provide one or more templates to render. Typically, a single template is used to construct message data. Refer to our Templates Guide for common syntax and extensions
Options - Message Options
Option | Description |
---|---|
To | Specifically, the recipient of a message. The value can be a device’s registration token, a device group’s notification key, or a single topic (prefixed with /topics/ ) |
Collapse Key | Identifies a group of messages (for example, with collapse_key: "Updates Available" ) that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active |
Priority | normal or high . See: Setting the priority of a message |
Content Available | When a notification or message is sent and this is set to true, an inactive client app is awoken, and the message is sent through APNs as a silent notification and not through the FCM connection server |
Mutable Content | When a notification is sent, and this is set to true, the content of the notification can be modified before it is displayed, using a Notification Service app extension |
Time to Live | Specify how long (in seconds) the message should be kept in FCM storage if the device is offline. See: Setting the lifespan of a message |
Restricted Package Name | Specify the package name of the application where the registration tokens must match in order to receive the message |
Dry Run | When set to true, allows developers to test a request without actually sending a message |
Title | User-visible notification title |
Body | User-visible notification body |
Sound | Sound files can be in the main bundle of the client app or in the Library/Sounds folder of the app’s data container |
Badge | Value of the badge on the home screen app icon. If not specified, the badge is not changed. If set to 0 , the badge is removed |
Click Action | Action associated with a user click on the notification. Corresponds to category in the APNs payload |
Subtitle | User-visible notification subtitle |
Action - Send Message to Web App
Parameters
- Message Options: (Required) Configure recipient, delivery behavior, and UI for a push notification
- Data: (Optional) Specify non-visible data such as a call to synchronize
- Template Variables: Map Attribute(s) to template variable names. Template variables are available for substitution and rendering of all templates. Refer to our Template Variables Guide for details
- Templates: Provide one or more template to render. Typically, a single template is used to construct message data. Refer to our Templates Guide for common syntax and extensions
Options - Message Options
Option | Description |
---|---|
To | Specifically, the recipient of a message. The value can be a device’s registration token, a device group’s notification key, or a single topic (prefixed with /topics/ ) |
Collapse Key | Identifies a group of messages (for example, with collapse_key: "Updates Available" ) that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active |
Priority | normal or high . See: Setting the priority of a message |
Time to Live | Specify how long (in seconds) the message should be kept in FCM storage if the device is offline. See: Setting the lifespan of a message |
Restricted Package Name | Specify the package name of the application where the registration tokens must match in order to receive the message |
Dry Run | When set to true, allows developers to test a request without actually sending a message |
Title | User-visible notification title |
Body | User-visible notification body |
Icon | User-visible notification icon URL |
Click Action | For all URL values, secure HTTPS is required |
Vendor Documentation
APIs
Additional References
This page was last updated: January 23, 2020