I am trying to create a personalized push notification and I need the Subscriber Key to do this.

So my Solution has an 'interaction' type push message, a  journey that is triggered by a data extension and the push message added to this journey. The push Message has an AMPScript to fetch the parameters.

Sample :


  VAR @something
  SET @something = [DeviceID] 

The device id is '%%=v(@something)=%%'

a) I was not able to fetch the parameters from the data extension used in the journey, and eventually learnt that the fields are from Mobile Demographics

b) Can't see a field called 'Contact Key' on mobile demographics but according to the documentation this field corresponds to the subscriber key. However, tried sending both the parameters (ContactID - which is visible on the DataExtension AND ContactKey) in my push message and both were blank in the delivered push message.

c) The Remaining fields of the Mobile push demographics like - DeviceID, SourceObjectId etc gets sent dynamically without any issues

c) Found another post that talks about fetching the DeviceLanguage from a dataExtension - PushAddressExtension and this worked - any clue as to what this data extension is ? Still no luck on getting the subscriber ID from here either.


VAR @something
SET @something = Lookup("_PushAddressExtension", "DeviceLanguage", "ContactId", DeviceID) 

The subscriber key is '%%=v(@something)=%%'

d) If I click Manage under the MobilePush Tab , I can see that the Contact Key is populated with the subscriber Id.

Any Help in getting this resolved will be greatly appreciated.


This answer has been removed until further analysis.

  • Thanks Narasimha, for the answer. I have raised a case with Marketing Cloud Support and will ask them to do this. Can't we do this ourselves?. Also can't we query this information out like in the example above where we are querying _PushAddressExtension?. Also any idea what this data extention represents and the fields it has --> _PushAddressExtension ? Sep 27 '16 at 20:42
  • Salesforce support created the _allcontacts view which took about a week and then I was able to send the subscriberkey using the same . Thank you for your help the issue is resolved. Dec 2 '16 at 11:42
  • What's up with the edits? Dec 16 '16 at 12:29
  • I am not sure why this answer was edited but it worked for me. Basically, once I raised the case with Salesforce to expose the _Allcontacts, I could query PushAddressExtension Jan 7 '18 at 12:20

The contact_Key is populated via setsubscriberkey by mobile app, but, as you said, is visible only in the interface. it is not available for queries on MobilePushDemographics (which is _PushAddress data view) not for AMP scripts. In order to make it available for queries and scripts our solution was to create a custom atribute in Mobile Push Demographics (via Marketing Cloud interface) and populated via Mobile App (documentation: iOS / Android ). Once the field is populated in Mobile Push Demographics, you can use it the same you've done for deviceid, using AMP script.


I'm trying to do the same thing and I am looking for a bit of guidance. Were you able to find a solution / workaround? The accepted answer has since been removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.