Skip to main content
Published: September 12 2006, 4:18:00 PMUpdated: July 26 2022, 10:50:50 PM

How can I test Ask Seller a Question Notifications?

Summary

An AskSellerQuestion notification is sent when an eBay buyer uses the Ask Seller a Question form on the eBay site. In order to test AskSellerQuestion notifications, you need to first set up notifications at the application and user level. You with then need to create test scenarios in the sandbox. This article walks through the steps needed to test AskSellerQuestion notifications.


Detailed Description

1. Create 2 Sandbox test users. For the purposes of this article, we will call them testseller1 and testbuyer1.  Use the sandbox user creation tool at https://developer.ebay.com/api-docs/static/oauth-ui-tokens.html

2. Create tokens for all three users via the Token Generation Tool at  http://developer.ebay.com/tokentool/

3. Set up Application Level notification preferences via the SetNotificationPreferences call. You may use any user’s token for setting Application Level preferences.

Example:
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>1149</Version>
  <ApplicationDeliveryPreferences>
  <ApplicationURL>https://m****************.com</ApplicationURL>
  <ApplicationEnable>Enable</ApplicationEnable>
  </ApplicationDeliveryPreferences>
</SetNotificationPreferencesRequest>

Note: If you have not yet set up your notifications listener URL or are not sure if you are actually receiving notifications, you can set your <ApplicationURL> to use SMTP and send you the notification via email. To do this, set the <ApplicationURL> property to mailto://youremailaddress@yourdomain.com.

4. Set up User Level notification preferences to enable the AskSellerQuestion notification via the SetNotificationPreferences call. Make the call using testseller1's token, as you need this notification set up for the seller.

Example:
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>1149</Version>
  <UserDeliveryPreferenceArray>
  <NotificationEnable>
     <EventType>AskSellerQuestion</EventType>
     <EventEnable>Enable</EventEnable>
  </NotificationEnable>
  </UserDeliveryPreferenceArray>
</SetNotificationPreferencesRequest>

5. List a FixedPriceItem using testseller1’s token

Example:

<?xml version="1.0" encoding="utf-8"?>
<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>1149</Version>
  <ErrorLanguage>en_US</ErrorLanguage>
  <WarningLevel>High</WarningLevel>
  <Item>
    <ListingType>FixedPriceItem</ListingType>
    <Country>US</Country>
    <Currency>USD</Currency>
    <Description>Test AskSellerQuestion Item</Description>
    <ListingDuration>Days_5</ListingDuration>
    <Location>San Jose, CA</Location>
    <PaymentMethods>PaymentSeeDescription</PaymentMethods>
    <PrimaryCategory>
      <CategoryID>14111</CategoryID>
    </PrimaryCategory>
    <Quantity>1</Quantity>
    <StartPrice>100.0</StartPrice>
    <ShippingTermsInDescription>True</ShippingTermsInDescription>
    <Title>Test AskSellerQuestion Itme</Title>
  </Item>
  <RequesterCredentials>
    <eBayAuthToken>x</eBayAuthToken>
  </RequesterCredentials>
</AddItemRequest>


6. Log into the sandbox as testbuyer1 and submit a question via the Ask Seller a Question link on the View Item page.  


7. The Ask Seller a Question notification you receive will look something like the example below:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <ebl:RequesterCredentials soapenv:mustUnderstand="0" xmlns:ns="urn:ebay:apis:eBLBaseComponents" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
  <ebl:NotificationSignaturexmlns:ebl="urn:ebay:apis:eBLBaseComponents">pHqMz7SdSVlt49Nt+VbC5A==</ebl:NotificationSignature>
  </ebl:RequesterCredentials>
 </soapenv:Header>
 <soapenv:Body>
  <GetMemberMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
   <Timestamp>2019-11-04T21:58:44.514Z</Timestamp>
   <Ack>Success</Ack>
   <CorrelationID>95889860</CorrelationID>
   <Version>1149</Version>
   <Build>E1127_CORE_APIMSG_19083139_R1</Build>
   <NotificationEventName>AskSellerQuestion</NotificationEventName>
   <RecipientUserID>mg_sandbox1</RecipientUserID>
   <MemberMessage>
    <MemberMessageExchange>
     <Item>
      <ItemID>1**********2</ItemID>
      <ListingDetails>
       <StartTime>2019-09-16T18:52:41.000Z</StartTime>
       <EndTime>2019-09-23T18:52:41.000Z</EndTime>
      <ViewItemURL>http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1**********2&category=3*7</ViewItemURL>
      </ListingDetails>
      <Seller>
       <UserID>mg_sandbox1</UserID>
      </Seller>
      <SellingStatus>
       <CurrentPrice currencyID="USD">100.0</CurrentPrice>
      </SellingStatus>
      <TimeLeft>P4DT23H58M21S</TimeLeft>
      <Title>Test AskSellerQuestion Itme</Title>
     </Item>
     <Question>
      <MessageType>AskSellerQuestion</MessageType>
      <QuestionType>General</QuestionType>
      <DisplayToPublic>false</DisplayToPublic>
      <SenderID>mg_sandbox2</SenderID>
      <SenderEmail>mg_sandbox2@yahoo.com</SenderEmail>
      <RecipientID>428271</RecipientID>
      <Subject>Question for item #110005795324 - Test AskSellerQuestion Itme</Subject>
      <Body>Hello this is a test question for testing Notifications</Body>
      <MessageID>188558</MessageID>
     </Question>
     <MessageStatus>Unanswered</MessageStatus>
     <CreationDate>2019-09-16T19:22:26.000Z</CreationDate>
     <LastModifiedDate>2019-09-16T19:22:26.000Z</LastModifiedDate>
    </MemberMessageExchange>
   </MemberMessage>
   <PaginationResult>
    <TotalNumberOfPages>1</TotalNumberOfPages>
    <TotalNumberOfEntries>1</TotalNumberOfEntries>
   </PaginationResult>
   <HasMoreItems>false</HasMoreItems>
  </GetMemberMessagesResponse>
 </soapenv:Body>
</soapenv:Envelope>


8. At this point, the seller will receive this notification on their notification listener.  The seller can respond to the question via the AddMemberMessageRTQ API Example:

<?xml version="1.0" encoding="utf-8"?>
<AddMemberMessageRTQRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <ItemID>110005795324</ItemID>
  <MemberMessage>
    <Body>This is the answer to your question. Thanks for asking!</Body>
    <ParentMessageID>188558</ParentMessageID>
    <RecipientID>mg_sandbox2</RecipientID>
  </MemberMessage>
  <RequesterCredentials>
    <eBayAuthToken>x</eBayAuthToken>
  </RequesterCredentials>
</AddMemberMessageRTQRequest>

 


Additional Resources

 

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