Skip to main content
Published: September 12 2006, 4:18:00 PMUpdated: November 28 2020, 2:34:09 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 http://developer.ebay.com/DevZone/sandboxuser.asp

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>429</Version>
  <ApplicationDeliveryPreferences>
  <ApplicationURL>http://www.mycompany.com/notifyurl.cgi</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>429</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>473</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.  For example, use the ViewItem URL below and fill in your newly created item number: http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&item=110005795324


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>2006-09-12T23:27:18.671Z</Timestamp>
   <Ack>Success</Ack>
   <CorrelationID>95889860</CorrelationID>
   <Version>477</Version>
   <Build>e477_core_Bundled_3514903_R1</Build>
   <NotificationEventName>AskSellerQuestion</NotificationEventName>
   <RecipientUserID>mg_sandbox1</RecipientUserID>
   <MemberMessage>
    <MemberMessageExchange>
     <Item>
      <ItemID>110005795324</ItemID>
      <ListingDetails>
       <StartTime>2006-09-12T23:25:39.000Z</StartTime>
       <EndTime>2006-09-17T23:25:39.000Z</EndTime>
      <ViewItemURL>http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=110005795324&amp;category=14111</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>2006-09-12T23:27:18.000Z</CreationDate>
     <LastModifiedDate>2006-09-12T23:27:18.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