Flutterflow + Pushfire Library
Using the Pre-built Custom Actions
The PushFire Library provides a suite of 8 custom actions to interact with the SDK. You can call these actions from any widget or action flow. Here is a breakdown of all available actions:
1. pushfireLoginSubscriber
Identifies the user to PushFire, creating or updating their subscriber profile. This should be called right after a user logs in or signs up.
- Purpose: Link the app user to a PushFire subscriber.
- Parameters:
- userId (String): The unique identifier for your user (e.g., Firebase Auth User ID).
- Implementation: In your "Login" or "Register" button's action flow, add this custom action and pass the authenticated user's ID.
2. pushfireUpdateSubscriber
Updates the core profile attributes of the currently logged-in subscriber.
- Purpose: Keep subscriber data like name, email, or phone number in sync with your app.
- Parameters:
- name (String): The user's updated name.
- email (String, Optional): The user's updated email address.
- phone (String, Optional): The user's updated phone number.
- Implementation: Call this action after a user successfully updates their profile information in your app's settings page.
3. pushfireLogoutSubscriber
Clears the currently active subscriber from the SDK's local storage. This is essential for apps that support multiple user accounts.
- Purpose: End the current user's session with PushFire.
- Parameters: None.
- Implementation: Call this action in your "Logout" button's action flow, alongside your primary logout logic (e.g., Firebase Auth Sign Out).
4. pushfireAddTag
Adds a new tag to the current subscriber to help you segment your audience.
- Purpose: Assign a characteristic or preference to a user.
- Parameters:
- tagId (String): The category for the tag.
You can copy this id from Pushfire Dashboard > Audience > Tags > #yourtag

- tagValue (String): The value of the tag (e.g., "Completed").
- Implementation: Call this when a user performs an action that indicates a preference, like liking an item.
5. pushfireUpdateTag
Modifies the value of an existing tag category for the current subscriber.
- Purpose: Change a user's preference or status.
- Parameters:
- tagId (String): The category of the tag to update.
You can copy this id from Pushfire Dashboard > Audience > Tags > #yourtag
- tagValue (String): The new value for the tag (e.g., "premium").
- Implementation: Use this when a user changes their settings or upgrades their account.

6. pushfireRemoveTag
Removes a tag category and its associated value from the subscriber.
- Purpose: Remove a characteristic that no longer applies.
- Parameters:
- tagId (String): The category/key of the tag to remove (e.g., "new_user_tour").
- Implementation: Call this after a user completes a specific phase, like an onboarding tutorial.
7. pushfireExecuteWorkflow
Triggers a pre-configured workflow in your PushFire dashboard for the current subscriber.
- Purpose: Start an automated marketing or engagement journey.
- Parameters:
- workflowId (String): The unique ID of the workflow from your PushFire dashboard.
- Implementation: Trigger this for key conversion events, such as completing a purchase or abandoning a cart.