Opt in or out? Just when you thought that sending a push message is as easy as it gets, CiviMobile 5.0 rolls out featuring the looked-for Push Notification functionality.
Possibly you expected a complete no-brainer with short steps: check the box on the setting page of your CRM or get users to give permission for receiving notifications. However, the reality is more complicated: instead you don’t get to check the box for CiviMobile push notifications, so much more than that, you are asked to register at civimobile.org, leave information about your CiviCRM server, generate server key and use it to enable push messages for CiviMobile app.
Right, such activation process may raise eyebrows and definitely questions. And this article intents to clarify the nature of the process.
Why bother at all?
Push notifications are one of those few unique communication channels that give CiviMobile users peace of mind that the most up-to-date and relevant information reaches them timely. When new tasks are assigned, cases created, activities edited, new event registration added, etc. CiviMobile will instantly “push” alerts with notifications. Upon tapping the notification, the user will be taken directly to the corresponding activity or object in the app. Besides, push messages pop up on the user’s mobile device even when the app is not running. Accordingly, no relevant updates in CiviCRM will escape your notice.
How does it work?
Can’t CiviMobile users just give permission for CiviMobile app to receive notifications pushed by CiviCRM server? Actually, they should but it won’t be enough to activate push notifications, but could be enough to open security loopholes. Let’s just think it through to cut to the bottom-line.
Even though mobile app technologies are developing at a fast speed with new trends emerging on a regular basis, one fact still holds true: mobile apps do not generate notifications themselves (especially when not active) – an external server is required to “push” a message to the app on your mobile device, while mobile phones still won’t receive those messages without a push notification channel to the server.
The diagram below demonstrates how CiviMobile push notifications work in action.
1) When user clicks Allow button to receive mobile push notifications, the application registers at the Apple APN or Google GCM service by sending device ID and app ID.
2) If the registration is successful, Apple APNs or Google GCM service returns a token to application on the device.
3) This token and user ID are transmitted to the client’s CiviCRM server. The server stores user ID with token in its database.
Recurrent processes:
a) The moment a certain activity occurs on CiviCRM website, i.e new tasks assigned, relationships edited, event registration created, etc., CiviCRM server retrieves the token of a particular user and transmits client’s CiviCRM server key (generated on civimobile.org) + message + user token to proxy server.
b) Proxy server validates whether this particular client is entitled to send a notification. If yes, then whether its key matches IP. If match is confirmed, the notification with our key is sent to Firebase (FCM) that further forwards it to Apple APN or Google GCM.
c) Mobile phones interact with Apple APN or Google GCM services and display push notifications.
Why register?
CiviMobile app server, as any other app server, must be registered with a Push Notification Service Provider and issued with server key. Here comes a snag. There can be one and only one server using that key for Apple APN or Google GCM services. Yet there are numerous CiviCRM servers worldwide which work with CiviMobile app. The key has been generated by CiviMobile development team and therefore can’t be generated for each and every client.
We found the solution by setting up a proxy server. Once registered at civimobile.org you’ll easily generate server key for your CiviCRM. When CiviCRM server transmits a message with CiviCRM server key, proxy server verifies and replaces it with its own key.
This ensures that notifications your CiviCRM server sends will be received by those users of CiviMobile app those notifications were meant for. Besides, this adds to more secure operations.
How are CiviMobile Push Notifications activated?
Our team made the activation process smooth and simple. In order to use push notifications, you have to register at civimobile. org and copy a server key that identifies your CiviCRM. You may also generate unique keys for as many CiviCRM servers as you currently operate by clicking Add New button. Finally enter server key on CiviMobileAPI Setting Page of your CiviCRM.
With these quick steps CiviMobile Push Notification functionality gets activated. Quite a shortcut towards a simple, effective and secure way to engage with organization’s constituents.