We have a requirement to send mobile push messages from the data extensions as we need to segment data and put in the data extension.The data extension have only contact key.We need to export the devid id and system token from all contacts to the DE.We donot have any dataviews to fetch the deviceid and system token.Can you please advise how we can pull the device id information from all contacts and put in the data extension.
You can retrieve data from the
_PushAddress DE (using SQL or Ampscript of course). It contains all of the mobilePush attributes, including the deviceId.
for more information regarding the attributes themselves, check this topic: Attributes in _PushAddress and _PushTag Data Views
Hope I could help.
Is there any particular reason you need the Device ID and System Token in the Data Extension? When sending to a DE in MobilePush, you only need the Contact Key in that Data Extension. The System Token and Device ID fields live on the MobilePush Demographics table, as long as you send to a Contact Key, Mobile Push will know where to fetch those values from.
If your mobile application is using the SDK properly it will add/subscribe contacts to the mobile push channel and you will be able to access the information you need by running below query:
select _SystemToken as Token ,_DeviceID as deviceID from _pushAddress
You could add custom fields to the MobilePush data model and they will be then accessible in the _pushAddress address data view (without the underscore prefix)...
You could create a custom field called "PrimaryKey" and push there a value that you are using to set the ContactKey for specific record... You do not want let the SDK to use GUID to set the value of a ContactKey in most cases as this case cause a huge influx of data.
You can have multiple devices linked to one Contact (1:N relationship).
There is no easy way to find related ContnactKey (without using custom fields and some coding on the mobile side) if one was registered first via MobilePush channel and your Contactkey is a GUID set via the SDK.
You can also create a filtered mobile list and use SQL activity to select from that.