Skip to main content
Published: December 30 2014, 11:43:00 AMUpdated: November 28 2020, 10:26:11 PM


Detailed Description

  An application subscribing to Platform Notifications can set UserData.ExternalUserData to identify user account

  To enable platform notification events and also associate the UserData.ExternalUserData for each of your platform notification subscribers, you will need to make two SetNotificationPreferences calls with the same Auth & Auth token for each users or subscribers. Here are the steps:

1. Subscribe to platform notification user events by passing through the UserDeliveryPreferenceArray container as below in SetNotificationPreferences call:

 <?xml version="1.0" encoding="utf-8"?>
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>765</Version>
  <RequesterCredentials>
    <eBayAuthToken>TOKEN FOR USER_1</eBayAuthToken>
  </RequesterCredentials>
  <UserDeliveryPreferenceArray>
    <NotificationEnable>
      <EventType>EndOfAuction</EventType>
      <EventEnable>Enable</EventEnable>
    </NotificationEnable>
    <NotificationEnable>
      <EventType>AuctionCheckoutComplete</EventType>
      <EventEnable>Enable</EventEnable>
    </NotificationEnable>
    <NotificationEnable>
      <EventType>Feedback</EventType>
      <EventEnable>Enable</EventEnable>
    </NotificationEnable>
     ....
  </UserDeliveryPreferenceArray>
</SetNotificationPreferencesRequest>


2. Use the same auth tokon and make SetNotificationPreferences call to associate the UserData.ExternalUserData for the use

 <?xml version="1.0" encoding="utf-8"?>
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>765</Version>
  <RequesterCredentials>
    <eBayAuthToken> TOKEN FOR USER_1</eBayAuthToken>
  </RequesterCredentials>

<ApplicationDeliveryPreferences>
    <ApplicationURL>END POINT URL</ApplicationURL>
    <ApplicationEnable>Enable</ApplicationEnable>
         <PayloadVersion>751</PayloadVersion>
  </ApplicationDeliveryPreferences>
  <UserData>
    <ExternalUserData> Sample ExternalUserData  </ExternalUserData>
  </UserData>
</SetNotificationPreferencesRequest>

 3. Make GetNotificationPreferences call  and pass PreferenceLevel to 'UserData'  in the request in order to retrieve UserData.ExternalUserData: 

 <?xml version="1.0" encoding="utf-8"?>
<GetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>765</Version>
<RequesterCredentials>
<eBayAuthToken>TOKEN FOR USER_1</eBayAuthToken>
</RequesterCredentials>
<PreferenceLevel>UserData</PreferenceLevel>
</GetNotificationPreferencesRequest>

How well did this answer your question?
Answers others found helpful