0

In my outbound push notification, I am trying to get a demographics field using ampscript but I am not getting anything.

For instance having this:

enter image description here

what is the Ampscript code to get the value corrisponding to the field Application?

1 Answer 1

1

Since the MobilePush Demographics is not directly accessible using a Lookup(), what you can do is try to get the data from the _PushAddress Data View.

Only problem with that is you can't Look for your value using your ContactKey, you can only use your ContactID. If you want to use the ContactKey you should at first look for your ContactID using the ContactKey and then use it to find your attribute in a second lookup. But this will work only if the contact is in Subscribers.

your AmpScript should be something like this :

%%[

var @Application, @ContactID
set @ContactID = subscriberid
set @Application = Lookup("_PushAddress", "_APID", "_ContactID", @ContactID)

]%%

The full list of _PushAddress Attributes can be found here : Attributes in _PushAddress and _PushTag Data Views

You must log in to answer this question.

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