Control Panel User's Manual Push Notifications Management
last update 2015-9-25

Device Auto-Cleaning

Auto-Cleanup Settings for Unreachable Devices

Even if it fails to deliver Push Notifications to certain devices,
next time you reserve new deliveries, you will still get
the failed devices as you set target devices for the deliveries.
You could search at Devices Management page for devices with errors
to manually delete them, but you probablly may want to use
our Auto-Cleanup feature described here.

Choosing Conditions

On the app you are working on, select “Push Notification”.
On Push Notification page, select “Basic Settings”.

On your Basic Settings page, right beneath the “Device Push” section,
you will find “Device Cleanup” pane.
Although you may notice that the pane consists of two parts, one for iOS
and another for Android, they are no different in terms of
the items you are setting for the Auto-Cleanup feature.

Filter by NUMBER OF DELIVERY ERRORS

You can filter the target devices for Auto-Cleanup by the number of errors occured to the devices.

Check the checkbox where it says “having errors for XX times or more”.
Select from the pulldown menu for the number of errors.
The devices having errors for the set number of times will be the target of Auto-Cleanup.
If you un-check the checkbox, the condition will not applied.

When it says “having errors”, the “errors” refer to different types
for iOS and Android. Follow the actual error codes for each platform.

iOS

    “Invalid Token”

Android

    “Missing Registration”
    “Invalid Registration”
    “Not Registered”

For further details, please refer “Table of Delivery Errors”.

Filter by DATA OBSOLESCENCE

Not only you can filter the target devices by the number of errors, but you can filter them
by how frequently the data are updated. When “Device ID” and its “Attributes” are registered
for the first time, Appiaries keeps track of the registration datetime.
So does it keep track of the datetime when the “Attributes” of the devices are updated.
If you set the minimum number of days for the device data not been updated,
Auto-Cleanup will target the devices with data which have not been updated
for more than the set minimum days.

Check the checkbox where it says “having no updates on data for more than XX days”.
Select from the pulldown menu for the minimu number of days not been updated.
The devices with data which have not been updated for more than the set days
will be the target for Auto-Cleanup”.

If you un-check the checkbox, the condition will not applied.

AND / OR for filter combinations

If you want BOTH “NUMBER OF DELIVERY ERRORS” and “DATA OBSOLESCENCE”,
then you choose “AND” . If you want EITHER of the filters, then you choose “OR” .

Realtime Checks On Filters Chosen

Realtime Checks will take your condition filters you currently selected
in your browser form, apply the conditions to the current set of devices
in Appiaries, and see how much devices will be subjected for Auto-Cleanup.

However, keep in mind, that the tools only apply the filter conditions
to devices currently available just to simulate the outcome,
the result differs from that of when the actual Auto-Cleanup is performed.
Realtime Checks only offer indices for your reference.

Check (1): Calculate Total

With your currently selected filter conditions on your browser,
it will apply the conditions to the currently registered devices,
and will calculate the total number of target devices for Auto-Cleanup .

Clicking “Calculate” next to “Cleanup Target Devices” will
calculate the current total of target devices.

Check (2): Exporting Devices

With your currently selected filter conditions on your browser,
it will apply the conditions to the currently registered devices,
and will export a list of target devices for Auto-Cleanup .

Clicking “Export” next to “Export Above Target Devices” will
export (*1) a list of target devices with TSV formatted data.

(*1) —— It will export the list per platform.
        Exported list from iOS section will contain only the APNs (iOS) data.
        Exported list from Android section will contain only the GCM (Android) data.

Bellow describes rules for the downloaded files.

cleanup_devices_[App ID]_[Platform Type]_[Date]_[Time].csv

Example)
cleanup_devices_angelaCosmetics_150924_211900.txt

Exported Data Format

First row is the header portion, and it lists all the field names which the rest of the data contains.
The body portion, beginning the second row, list all the data portions of what defined in the header
with each value is seperated by tabs.

You can copy the content of TSV data downloaded, paste it to your new MS Excel document,
the tab separated TSV data will be automatically placed to the appropriate cells of MS Excel.

* Make sure the list is exported per platform.

Follow the descriptions for the headers.

Headers Items Descriptions
_id Device ID Device’s “Device ID” (what iOS calls “Device Token” / Android “Registration ID”).
Unique identifier to identify the app as the app is installed.
attr Device Attributes “Attributes” given by the client apps when registering Device ID.
Developers may freely defined any attributes when registering. Listed in JSON format.

    Example:
        {
            “”name””: “”Melissa””,
            “”sex””: “”f””,
            “”age””: 18,
            “”favorite””: “”salad””,
        }

errors Errors The errors occured to the device (*2) and their numbers. Listed in JSON format.
It may sometimes contain errors other than specified error types. (*3)

    Example:
        [
            {
                “”error””: “”Missing Registration””
                “”cnt””: 4
            },
            {
                “”error””: “”Invalid Registration””
                “”cnt””: 1
            }
        ]

regist_datetime Last Updated Last updated datetime when errors occured.
Converted to format: Y/n/j H:s

(*2) —— For the above errors, refer “Table of Delivery Errors” for further details.

(*3)・・・「発生エラー回数」の対象である「不正エラー」と呼ばれるエラーはプラットフォーム毎に限られたそれのみが対象となるので
            「発生エラー回数」のみを条件として設定する限りは当然ながら Android は3種類、iOS は1種類のみが表示されます。
            しかし「デバイス更新頻度」のみが条件として設定されている場合は一致した対象デバイスがそれ以外のエラーを持つ可能性もあるため、
            その場合は この項目には限定されたエラー以外のエラーが記載される事もある ということになります。

設定を保存する

すべての条件を選択し終えたら 「保存」 を押下します。

※ 保存する前にリアルタイムチェックをおこなうことをお勧めします。

クリーンアップは、設定された条件に合致するデバイスに対し、毎日、深夜に実行 されます。