Steps to configure Push with Firebase in DANAconnect

It is important to have your mobile and/or web app integrated with Firebase FCM to receive Push Notifications.


  1. Generate the Service Account Key (serviceAccount.json)


  1. Go to Project Settings:
  • Go to the Firebase console and select your project.
  • Go to the "Service Accounts" tab.
  • In the sidebar, select "Service Accounts".


  1. Generate a new private key:
  • Click on the "Generate a new private key" button.
  • Ensure the key type is set to "JSON".
  • Click "Generate" and the serviceAccount.json file will be downloaded.


  1. Deliver the file to DANAconnect:
  • This file must be given to the DANAconnect account manager to process its configuration on the DANAconnect platform.
  • Request the serviceAccount.json file.
  • Request a default title (this is required for the initial setup). The title of each notification can be customized in the same node.
  • Request at least one device token for testing.
  • Request the name of the app or how you want it to appear in the PUSH node selection. Each of these steps must be repeated for every app the client wants configured in DANAconnect.


  1. Push configuration with FCM:

Once the above information is received, the configuration will be processed.


  1. Bounce Events:
  • 400: Indicates a missing parameter in the FCM console configuration or a parameter not being sent that FCM requires.
  • 404: Indicates the device token is not registered in the FCM app.
  • 500: Other sending errors.


  1. Push parameter options:
  • title: Dynamic title, which can be customized with tags.
  • image: The image that appears in the notification.
  • linkURL: This is for the link, but only functions for web notifications; it is not a mobile notification attribute.
  • richcontent: This tag is special, as notifications do not accept HTML. However, it will be sent in putdata for the app developer to use that HTML as needed.
  • Custom attributes: You can add any attribute the app requires, and data will be sent in the putDATA. You can set the necessary tag and the required value, which can come from the contact list, providing flexibility for app customization.


Example of use:If the mobile app developer requires a parameter like the client ID and chooses to use the IDCLIENT tag, the value can be extracted from the contact list with the $s{idcliente} tag. This flexibility allows the app developer to execute commands when a push notification is received.

Updated on: 09/13/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!