The lifecycle of a device in Pushwoosh starts when a user opens the app with Pushwoosh SDK for the first time after installation. Once the app is launched, our SDK will make several calls to our backend, such as /applicationOpen and /getInApps. For example:
Pushwoosh request:
Url: https: //go.pushwoosh.com/json/1.3/applicationOpen
Payload: {"request": {"jailbroken": 0, "notificationTypes": 7,
"app_version": "1.11.2","application": "66716-7F06D","device_type": 1,
"userId": "76051F70-....-46B5-B4BA-F3FC94BD3534", "language": "en",
"hwid": "76051F70-....-46B5-B4BA-F3FC94BD3534","package": "com.pushwoosh.pushon",
"os_version": "12.1.4","v": "5.9.1","device_model": "iPhone10,1"}}
This will record a device with its hwid (hardware id) to Pushwoosh database and make it eligible for receiving In-App messages, while app open stats will be increased by one.
Because at this point of time the push token does not exist yet, this device will fall under Total Devices category, not Push Enabled.
Once the device is recorded to a database, you can start submitting Tags for this device and assign a userID, if necessary. As soon as the user agrees to receive push notifications, the push token is issued by cloud gateways, such as APNS and FCM, and our SDK sends an API request to /registerDevice endpoint of Pushwoosh with this token:
Pushwoosh request:
Url: https: //go.pushwoosh.com/json/1.3/registerDevice
Payload: {"request": {"gateway": "production", "jailbroken": 0,
"notificationTypes": 7, "app_version": "1.11.2", "application": "66716-7F06D",
"sounds": ["bubble.wav"], "device_type": 1, "userId": "76051F70-....-46B5-B4BA-F3FC94BD3534",
"language": "en", "hwid": "76051F70-....-46B5-B4BA-F3FC94BD3534",
"package": "com.pushwoosh.pushon", "timezone": "25200", "os_version": "12.1.4",
"push_token": "9c943351faaa7080a1c076343521.......17d220a0c68f42125cd98bb",
"v": "5.9.1", "device_model": "iPhone10,1"}}
Now, since we have a push token registered in our database for a device, it is considered Push-Enabled (reachable), and you can start sending push notifications to it.
When you are sending a push, the APNS and FCM return us the status of each recipient's push token. If any token is marked invalid or nonexistent, we will remove it from the database and the number of push-enabled devices will decrease accordingly.
When the push token is removed from the system, the device is no longer in Push Enabled category, but will continue receiving In-Apps as long as the user keeps the app on the device and opens it.
If Pushwoosh registered no activity for a given device within 90 days, e.g. no /applicationOpen requests from our SDK, no Events triggered, and such device does not have a push token, it will be ultimately erased from the database. This period of inactivity is configurable.
How does Pushwoosh identify if a device is reachable?
- Device is reachable with Push Notifications, In-Apps and will store messages in Inbox as long as its push token is registered with Pushwoosh and is not marked as invalid or inactive by APNS/FCM gateways.
- Device is reachable with In-App Messages as long as it is active and the app gets opened.
I have less users in my CRM than in Pushwoosh. What can I do?
It is important to note that Pushwoosh will not learn that the push token is inactive unless you decide to submit a notification to such device. Therefore, the best practice of keeping your audience up-to-date is to either send broadcast push campaigns that reach everyone, or silent pushes that also reach everyone but are completely invisible to the recipients.
Comments
0 comments
Please sign in to leave a comment.