Docs

Firebase + FlutterFlow Synchronization: Activate Your Audience for Advanced Engagement

Getting Started

If you developed your application with FlutterFlow and your backend resides in Firebase, this guide will allow you to import your entire audience into PushFire in minutes, maintaining data integrity and enabling personalized notifications and engagement flows.

image.png

Prerequisites

Before starting, assuming Firebase credentials are already configured in PushFire, ensure that:

  • You have access to the Firebase project with read permissions.
  • The user collection is named users and the device subcollection is fcm_tokens.

Steps

Step 1: Access the Synchronization Settings

  1. Log in to your PushFire project.
  2. Go to the AudienceSynchronization section.
  3. Select FlutterFlow + Firebase as the data source.
image.png

Technical Note: PushFire assumes your user collection is users and maps it to the subscribers table, and that your device subcollection is fcm_tokens (typical in FlutterFlow) and maps it to devices. This synchronization is recommended for a single execution to initialize your subscriber base, although you can resync to update data.

Step 2: Audience Field Configuration

The main configuration consists of mapping Firebase fields to PushFire's internal properties to ensure the functionality of engagement services.

NoSQL Data Handling and Fallback Values: Since Firebase is a NoSQL database, not all user documents may contain every field. PushFire allows you to define a Fallback Value (default value) for each field. If a field does not exist or is empty in a Firebase document, this default value will be automatically assigned, ensuring data integrity within PushFire.

Field Mapping for the users Collection (Subscribers):

  • External ID: Maps to your uid field. Required (✅ Yes). It is the unique user identifier.
  • Name: Maps to your display_name field. Not Required (❌ No).
  • Email Address: Maps to your email field. Not Required (❌ No).
  • Phone Number: Maps to your phone field. Not Required (❌ No).
image.png

Step 3: Device Mapping (Subcollection fcm_tokens)

Mapping the device subcollection is vital for sending Push Notifications.

Field Mapping for the fcm_tokens Subcollection (Devices):

  • FCM Token: Maps to your fcm_token field. Unique token for sending notifications.
  • OS Type: Maps to your device_type field. Operating System (iOS/Android).
  • OS Version: Maps to your os_version field. Operating System version.
  • Manufacturer: Maps to your manufacturer field. Device manufacturer.
  • Device Model: Maps to your model field. Specific device model.
  • Language: Maps to your language field. Device language.
  • App Version: Maps to your app_version field. Your application's version.
  • Push Notifications: Maps to your notification_settings.SystemPushEnabled field. User's push notification status.
image.png

Step 4: Additional Metadata (Dynamic Segmentation)

Leverage PushFire's flexibility to import any additional user attributes as Metadata. This information is static and relevant for identification and personalization, such as signup dates or demographic features. These fields are converted into key-value pairs and are crucial for granular segmentation and deep personalization of your messages.

  • Metadata Examples: age, createdAt, updatedAt, last_active_date, country.
image.png

Note on User Characteristics: If the goal is to save binary or categorical characteristics for user segmentation (e.g., isPremium: true, preferences: "sports"), we recommend using PushFire's Tags system. Tag synchronization is achieved by assigning labels to each subscriber. For more information on using labels for handling characteristics, please consult the Tags section.

Step 5: Start Synchronization

  1. Review the summary of your mapping configuration.
  2. Click "Start Synchronization".
  3. The "Synchronization History" panel will display the progress: Pending → In Process → Completed.
image.png

Step 6: Post-Synchronization and Activation

Once the task is complete:

  1. Verify: Confirm that your subscribers and their devices were imported correctly in the Audience → Subscribers section.
  2. Activate: Create segments and automated Workflows based on the imported metadata to maximize engagement and conversion.

Best Practices and Performance

  • Perform Testing: Run an initial sync on a development project or with a limited data sample.
  • Key Security: Keep your Service Account Keys secure (though already loaded, avoid exposure).
  • Synchronization Time: Sync during low-traffic hours to minimize impact on Firebase rate limits.
  • Documentation: Internally document all field mappings and imported metadata for future reference and consistency.