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 makes several calls to our backend, such as /applicationOpen and /getInApps.
The SDK calls the public Device API base URL https://api.pushwoosh.com/json/1.3/. A few accounts are pinned to a dedicated or white-label endpoint; for those, the backend returns the host to use in the base_url field of every response and the SDK stores it, so their requests go to that host instead.
Pushwoosh request:
Url: https://api.pushwoosh.com/json/1.3/applicationOpen
Payload: {"request": {"jailbroken": 0, "notificationTypes": 7, "app_version": "3.4.1",
"application": "XXXXX-XXXXX", "device_type": 1,
"userId": "76051F70-....-46B5-B4BA-F3FC94BD3534", "language": "en",
"hwid": "76051F70-....-46B5-B4BA-F3FC94BD3534", "package": "com.pushwoosh.pushon",
"os_version": "18.5", "v": "7.2.0", "device_model": "iPhone16,2"}}
This records a device with its hwid (hardware id) in the Pushwoosh database and makes it eligible for receiving In-App messages, while app open stats are increased by one. Because at this point the push token does not exist yet, this device falls under the Total Devices category, not Push Enabled.
Once the device is recorded, you can start submitting Tags for it 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 the SDK sends a request to the /registerDevice endpoint with this token:
Url: https://api.pushwoosh.com/json/1.3/registerDevice
Payload: {"request": {"gateway": "production", "jailbroken": 0, "notificationTypes": 7,
"app_version": "3.4.1", "application": "XXXXX-XXXXX", "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": "18.5",
"push_token": "9c943351faaa7080a1c076343521.......17d220a0c68f42125cd98bb",
"v": "7.2.0", "device_model": "iPhone16,2"}}
Now that a push token is registered for the device, it is considered Push Enabled (reachable), and you can start sending push notifications to it.
When you send a push, APNs and FCM return the status of each recipient's push token. If a token is marked invalid or nonexistent, we remove it from the database and the number of push-enabled devices decreases accordingly. When the push token is removed, the device is no longer in the Push Enabled category, but continues receiving In-Apps as long as the user keeps the app on the device and opens it.
If Pushwoosh registers no activity for a given device within 90 days — no /applicationOpen requests from our SDK, no Events triggered — and such device does not have a push token, it is ultimately erased from the database. This period of inactivity is configurable: ask your Customer Success Manager or our Support team.
How does Pushwoosh identify if a device is reachable?
A device is reachable with push notifications and In-Apps, and will store messages in the Inbox, as long as its push token is registered with Pushwoosh and is not marked as invalid or inactive by the APNs/FCM gateways. A device is reachable with In-App Messages as long as it is active and the app gets opened.
I have fewer users in my CRM than in Pushwoosh. What can I do?
Pushwoosh will not learn that a push token is inactive unless you send a notification to such a device. The best practice for 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 invisible to the recipients.
See also: Types of registered devices and the Device API reference.
Comments
0 comments
Please sign in to leave a comment.