How to send custom data (userID, deviceID etc) to pushwoosh control panel

Answered

Comments

3 comments

  • Avatar
    Vitaly Romanychev

    Hello,

    To submit a device with a particular userID you can use our Tags feature. Please let me explain in details:

    First of all you should create a Tag in Pushwoosh Control Panel, then you should make a /setTags API request to set values for your tags:

    { "request":{ "application":"DEAD0-BEEF0", "hwid": "device hardware id", "tags": { "userID": "user1" }
    } }

    You can use the following method to set tag values on your device with Phonegap for iOS:

    https://rawgit.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin/master/Documentation/files/PushNotification-js.html#PushNotification.setTags

    Then you should create a filter in Control Panel and apply it to your messages while sending push (Filters tab) via Control Panel or adding "filter" parameter to your /createMessage request if sending via API.

  • Avatar
    sahabeip

    Thanks Vitaly,

    After creating { "request":{ "application":"DEAD0-BEEF0", "hwid": "device hardware id", "tags": { "userID": "user1" } } },

    Can I send Push Notification on the basis of UserId using Remote API

  • Avatar
    Vitaly Romanychev

    Sure thing! You can use either "conditions" or "filter" parameter in your /createMessage API request in order to do that. Please find a detailed description following this link:

    http://docs.pushwoosh.com/docs/createmessage

Please sign in to leave a comment.