5

I need Contact Keys of contacts on MobilePush Demographics. Can someone explain how can I manage to retrieve Contact Key on the custom attribute on MobilePush Demographics?

I've tried these, but none of them worked. I'm going to write each solution I tried, so that this may help others not to try these steps, because these won't work.

  1. Created a filtered MobilePushList and query activity to gather ContactKey and DeviceID attributes, but query kept saying that DeviceID field is not available. Then I learned that on mobile lists, only SubscriberKey is accessible. https://salesforce.stackexchange.com/a/286994/78225
  2. Extracted that list by using Data Extract and when I checked the csv of this activity, these are the fields that are available with mobile lists: SubscriberKey,CustomerKey,AudienceId,TrackingCode,AudienceCode,SegmentCode,SegmentName,Priority,SegmentID,SplitID,SplitName,SplitCode,SendGroupID

This makes no sense, since when you manually export mobile push lists, you can see that all MobilePush Demographics attributes are in that file, even Contact Key! I can't use this file in an automation, because files are different when you manually export and export with an automation.

  1. Checked _PushAddress data view, but there is only ContactID on that table, not ContactKey.
  2. There was a data view called AllContacts which was really useful as I can tell but for some reason Salesforce decided to make it unavailable: https://help.salesforce.com/articleView?id=000314893&type=1&mode=1
  3. Tried to use _Subscribers data view, since it has both SubscriberKey and SubscriberID, but not all of our contacts are in that table, so that is also dead end.
  4. Finally, tried this, which was the closest one to the solution: https://developer.salesforce.com/docs/api-explorer/sfmc/contacts/post-contacts-v1-addresses-search-attributename This also didn't work, because we have more than 4 million contacts, and this consumes our API limit like hell, and couldn't get the data for all of our contacts.

Is there anyone that can help me on this?

2
  • 1
    You need ContactKey and DeviceID? Option 6 is probably the way to go. For the time being, SFMC doesn't have any means of actively monitoring API usage against your quota. That doesn't mean they won't get cluey to it, but they're busy selling super message and contact quota upgrades. It's your data. Dispute any charge and it'll keep them spinning wheels forever. They don't really know which API calls come from you or are internal to SFMC. Say, "prove it was me that made that API call".
    – Macca
    Commented Aug 7, 2020 at 13:50
  • 1
    Thanks, I'll consider this information :)
    – Baran Sen
    Commented Aug 10, 2020 at 10:32

3 Answers 3

3

In Mobile Push >> Manage Contacts >> Lists

You can export a filtered lists, This will only export subscribers on that list that exist in Mobile Push, but it will include fields:

  • Subscriberkey
  • DeviceID
  • AppID
  • Platform
  • Platformversion
  • last modified
  • OptinDate
  • OptoutDate
  • Tags
  • Custom Attributes
1
  • 2
    Thanks but I need an automation to do this, since it's not possible to manually export and import all the time...
    – Baran Sen
    Commented Aug 9, 2020 at 21:18
1

I have a variant of your solution #6 by using "/contacts/v1/establish": https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/establish-contacts-detail.html

You can provide in the JSON severals ContactKey:

{
    "ContactKeys": ["ContactKeyA","ContactKeyB"]
}

And you get the corresponding contactIDs in the result

 "items": [
        {
            "value": {
                "requestedContactKey": "ContactKeyA",
                "isNewContact": false,
                "contactReference": {
                "contactID": 123456789,
                "contactType": "Default",
                "contactKey": "ContactKeyA",
                "contactStatus": "Active",
                "modifiedDate": "2023-04-03T09:06:25.27"
            }
        },
        "requestItemIndex": 0,
        "resultMessages": []
    },{
            "value": {
                "requestedContactKey": "ContactKeyB",
                "isNewContact": false,
                "contactReference": {
                "contactID": 1414141414,
                "contactType": "Default",
                "contactKey": "ContactKeyB",
                "contactStatus": "Active",
                "modifiedDate": "2023-04-03T09:06:25.27"
            }
        },
        "requestItemIndex": 1,
        "resultMessages": []
    }
],

If you have found a better solution since then, I'm curious to hear it

0

I am not sure this is possible or not but worth a try, please let me know if anyone had more insight:

  • In contact Builder > Data Designer > Mobile Push Demographic Table, create a custom attribute named ContactKey_Custom.
  • In the mobile app, try to have a manual one-off execution that set the contactkey for the device again and populate the newly created attribute with the same value.
  • In the mobile app, when registering new user, set the newly created attribute with the same value in addition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .