Use the PurchaseListingEventBuilder when a buyer completes a purchase and that purchase is confirmed.

This can include but is not limited to:

  • Winning an auction
  • An offer is accepted
  • A user completes a "buy-it-now" purchase



Create an empty PurchaseListingEventBuilder

 PurchaseListingEventBuilder(String listing_id)

Create an PurchaseListingEventBuilder with just a listing ID

 PurchaseListingEventBuilder(String listing_id, String transaction_id, Double pricePerUnit, Integer quantity)

Create an PurchaseListingEventBuilder with all required properties

Public Methods

 PurchaseListingEventBuilder setBidID(String bid_id)

Set the Bid ID used when the buyer initially bid on the item. This should match the Bid ID used with the BidListingEventBuilder previously.

 PurchaseListingEventBuilder setBuyType(String buy_type)

Set the type of purchase, such as "Auction", "Offer", "BIN". 

PurchaseListingEventBuilder setListingID(String listing_id)

Set the unique Listing Identifier used to reference this specific listing. This Listing Identifier is used in other calls to edit the Listing, add the listing the a customers cart, purchase the listing, etc.

 PurchaseListingEventBuilder setOfferID(String offer_id)

Set the Offer ID used when the buyer initially made an offer on the item. This should match the Offer ID used with the MakeOfferListingEventBuilder previously.

 PurchaseListingEventBuilder setPricePerUnit(Double price)

Set the price per individual item in a listing. A multipack is considered a single item.

 PurchaseListingEventBuilder setQuantity(Integer quantity)

Set the quantity purchased.

 PurchaseListingEventBuilder setRevenuePerUnit(Double revenue)

Set the total revenue YOU as a marketplace will make on the sale of this item.

 PurchaseListingEventBuilder setShippingPrice(Double shipping_price)

Set how much the shipping was calculated as when purchased

 PurchaseListingEventBuilder setShippingType(String shipping_type)

Set the method of shipment requested. Common shipment methods might be:

  • UPS
  • USPS
  • FedEx
  • 2-Day
  • 1-Day
 PurchaseListingEventBuilder setTransactionID(String transaction_id)

Set the unique Transaction Identifier used to reference this specific purchase transaction.

Methods inherited from EventBuilder

 Object build()

Returns the object required by the track() method in the Kahuna SDK. This should be used just as a KahunaEventBuilder would.

 EventBuilder addProperty(String key, String value)

Sets the event property named "key" with the value "value".

Intelligent Event campaign filters ignore the letter case of event names, property keys, and property values. For example, the event WATCH_MOVIE matches the filter value watch_movie, Watch_Movie, and Watch_movie.

The property key must be a string value.

Property keys cannot start with k_, because this prefix is reserved for Kahuna system keys.

Property values must be a single string. You can provide a set of values by calling addProperty() multiple times with the same key, passing in a different value each time.

You can add up to 25 properties to a single builder object.

Because multiple values for a key are stored as a set, you can't add the same value more than once. If you try, you still have one occurrence of that value in the set.

If you try to set an empty key or value, addProperty ignores the call and writes a message to the debug logs.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request