Key | Type | Description |
---|
productId | String |
|
customerProductId | String |
|
originalPrice | String | Product's original price. (Not applied to auction item) |
discountPrice | String | Product's discount price. (Not applied to auction item) |
discountRate | String | Product's discount rate. (Not applied to auction item) |
name | String |
|
brand | String |
|
brandIdentifier | String |
|
description | String |
|
sku | String |
|
currency | String | e.g) "USD" |
url | String |
|
imageUrl | String |
|
showingNow | Bool |
|
stockStatus | String | IN_STOCK | LOW_IN_STOCK | SOLD_OUT |
auctionStatus | String | READY | ONGOING | ENDED | null |
|
|
|
Key | Type | Description |
---|
bidRound | Number |
|
bidStatus | String | ACCEPTED
REJECTED |
currentPrice | Number |
|
endedAt | Number | Time for auction to completely end |
endingAt | Number | Estimated time for auction to end ( can be increased) |
productId | String |
|
startingPrice | Number | The initial price for bid |
winner | winner |
|
winnerCheckoutScheme | String |
|
winningPrice | Number |
|
recommendedPrices | Number[] | The prices[Array] displayed on Bid button |
leader | leader |
|
Key | Type | Description |
---|
name | string |
|
uid | string |
|
userId | string |
|
Key | Type | Description |
---|
name | string |
|
uid | string |
|
userId | string |
|
Key | Type | Description |
---|
sellerId | string |
|
name | string |
|
profileUrl | string |
|
storeUrl | string |
|
description | string |
|
schemes | SellerSchemes |
|
Key | Type | Description |
---|
seeSellerProfile | string |
|
viewSellerStore | string |
|
messaeSeller | string |
|
takeSurvey | string |
|
saveThisSeller | string |
|
iOS
func handleReceivedCommand(_ command: String, with payload: Any?) {
print("handleReceivedCommand command: \(command) payload: \(String(describing: payload))")
let payloadData = parsePayload(payload: payload)
switch command {
case "ON_AUCTION_STARTED":
let product = payloadData["product"]
let brand = payloadData["brand"]
let productId = payloadData["productId"]
let auction = payloadData["auction"]
let bidStatus = payloadData["bidStatus"]
let currentPrice = payloadData["currentPrice"]
print("product \(product) brand \(brand) productId \(productId) auction \(auction) bidStatus \(bidStatus) currentPrice \(currentPrice)")
break
case "ON_BID_RESULT_RECEIVED":
break
case "ON_BID_STATUS_CHANGED":
break
case "ON_AUCTION_ENDED":
break
case "ON_AUCTION_WINNER_DETERMINED":
break
case "ON_AUCTION_WINNER_CHECKOUT_CLICKED":
break
default:
break
}
}
Android
override fun onReceivedCommand(context: Context, command: String, data: JSONObject) {
when(command) {
"ON_AUCTION_STARTED" -> {
val product = data.getJSONObject("product")
val brand = product.getString("brand")
val productId = product.getString("productId")
val auction = data.getJSONObject("auction")
val bidStatus = auction.getString("bidStatus")
val currentPrice = auction.getString("currentPrice")
Log.d(TAG, "brand=$brand, productId=$productId, bidStatus=$bidStatus, currentPrice=$currentPrice")
}
"ON_BID_RESULT_RECEIVED" -> {
}
"ON_BID_STATUS_CHANGED" -> {
}
"ON_AUCTION_ENDED" -> {
}
"ON_AUCTION_WINNER_DETERMINED" -> {
}
"ON_AUCTION_WINNER_CHECKOUT_CLICKED" -> {
}
}
}
When the Shoplive player is initialized. The player is ready to communicate with the Interface.
{
"campaignKey": String,
"isPreview": Boolean
}
When a user who is not eligible for bidding tries to make a bid, CAN_BID_REQUIRED is called with the empty payload.
When an auction starts, ON_AUCTION_STARTED event will be called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https://www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ONGOING"
},
"auction": {
"bidRound": 1,
"bidStatus": null,
"currentPrice": 5.5,
"endedAt": null,
"endingAt": 1662111912415,
"productId": "3751",
"startingPrice": 5.5,
"winner": null,
"winnerCheckoutScheme": null,
"winningPrice": null,
"recommendedPrices": [5.5],
"leader": null
}
}
When a user makes a bid, ON_BID_RESULT_RECEIVED event will be called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https//www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ONGOING"
},
"auction": {
"bidRound": 1,
"bidStatus": "ACCEPTED",
"currentPrice": 5.5,
"endedAt": null,
"endingAt": 1662111912415,
"productId": "3751",
"startingPrice": null,
"winner": null,
"winnerCheckoutScheme": null,
"winningPrice": null,
"recommendedPrices": [6.5],
"leader": {"name": "Joseph", "uid": "165458902895382534", "userId": "khw@shoplive.cloud"},
}
}
Whenever bid status changes (e.g., new leader, new current price), ON_BID_STATUS_CHANGED is called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https://www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ONGOING"
},
"auction": {
"bidRound": 2,
"bidStatus": null,
"currentPrice": 6.5,
"endedAt": null,
"endingAt": 1662111912415,
"productId": "3751",
"startingPrice": null,
"winner": null,
"winnerCheckoutScheme": null,
"winningPrice": null,
"recommendedPrices": [7.5],
"leader": {"name": "Joseph", "uid": "165458902895382534", "userId": "khw@shoplive.cloud"},
}
}
When an auction ends, ON_AUCTION_ENDED is called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https://www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ENDED"
},
"auction": {
"bidRound": 2,
"bidStatus": null,
"currentPrice": "0",
"endedAt": 1662110475797,
"endingAt": null,
"productId": "3751",
"startingPrice": 5.5,
"winner": {"name": "Joseph", "uid": "165458902895382534", "userId": "khw@shoplive.cloud"},
"winningPrice": 6.5,
"winnerCheckoutScheme": "ebay://livecommerce/callback/checkoutauctionitem?itemid=385086202973&imgurl=https%3A%2F%2Fi.ebayimg.com%2Fimages%2Fg%2Fd1IAAOSwHSxjCZXi%2Fs-l1600.jpg&title=Venusaur%20Pokemon%20card%20Japanese%20No.%20003%20Base%20Basic%20Set%20Holo%20K2&winningprice=6.5&userid=khw@shoplive.cloud",
"leader" : null
}
}
When an auction ends and a winner is determined, ON_AUCTION_WINNER_DETERMINED is called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https://www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ENDED"
},
"auction": {
"bidRound": 2,
"bidStatus": null,
"currentPrice": 0,
"endedAt": 1662110475797,
"endingAt": null,
"productId": "3751",
"startingPrice": 5.5,
"winner": {"name": "Joseph", "uid": "165458902895382534", "userId": "khw@shoplive.cloud"},
"winningPrice": 6.5,
"winnerCheckoutScheme": "ebay://livecommerce/callback/checkoutauctionitem?itemid=385086202973&imgurl=https%3A%2F%2Fi.ebayimg.com%2Fimages%2Fg%2Fd1IAAOSwHSxjCZXi%2Fs-l1600.jpg&title=Venusaur%20Pokemon%20card%20Japanese%20No.%20003%20Base%20Basic%20Set%20Holo%20K2&winningprice=6.5&userid=khw@shoplive.cloud",
"leader": null
}
}
When a winner clicks the checkout(or pay now) button, ON_AUCTION_WINNER_CHECKOUT_CLICKED is called with the following payload.
{
"campaignKey": "2e0bb63b0b18",
"product": {
"brand": "Shoplive",
"currency": "USD",
"customerProductId": "shoplive1003",
"discountPrice": "4.2",
"discountRate": "23%",
"name": "Venusaur Pokemon card Japanese No. 003 Base Basic Set Holo K2",
"originalPrice": "5.5",
"productId": "3751",
"sku": "385086202973",
"url": "https://www.ebay.com/itm/385086202973?",
"imageUrl": "https://image.shoplive.cloud/image.jpeg",
"auctionStatus": "ENDED"
},
"auction": {
"bidRound": 2,
"bidStatus": null,
"currentPrice": "0",
"endedAt": 1662110475797,
"endingAt": null,
"productId": "3751",
"startingPrice": "5.5",
"winner": {"name": "Joseph", "uid": "165458902895382534", "userId": "khw@shoplive.cloud"},
"winningPrice": "6.5",
"winnerCheckoutScheme": "ebay://livecommerce/callback/checkoutauctionitem?itemid=385086202973&imgurl=https%3A%2F%2Fi.ebayimg.com%2Fimages%2Fg%2Fd1IAAOSwHSxjCZXi%2Fs-l1600.jpg&title=Venusaur%20Pokemon%20card%20Japanese%20No.%20003%20Base%20Basic%20Set%20Holo%20K2&winningprice=6.5&userid=khw@shoplive.cloud",
"leader": null
}
}
When product data displayed on the carousel is changed.
{
"campaignKey": String,
"productList": [
{ product: PRODUCT, auction: AUCTION },
]
}
When a user clicks product on the carousel.
{
"campaignKey": String,
"productList": [
{ product: PRODUCT, auction: AUCTION },
]
}
When a user clicks 'BUY' button on the product within the carousel
{
"campaignKey": String,
"productList": [
{ product: PRODUCT, auction: null },
]
}
When a user clicks 'Bid' button on the product within the carousel. This event only occurs when the 'eBay Auction V2' option is enabled.
{
"campaignKey": String,
"productList": [
{ product: PRODUCT, auction: null },
]
}
When user clicks DSA button.
{
"campaignKey": String,
"campaignTitle": String,
"campaignStatus": String,
"seller": Seller
}
When user clicks 'Save seller' button.
{
"campaignKey": String,
"campaignTitle": String,
"campaignStatus": String,
"seller": Seller,
"saved": true
}
When user clicks seller's profile next to 'Save seller' button.
{
"campaignKey": String,
"campaignTitle": String,
"campaignStatus": String,
"seller": Seller
}
This event for "eBay auction V2" only. When the remaining time of auction is extended
{
"campaignKey": string,
"product": Product,
"auction": Auction
}
This event for "eBay auction V2" only. The auction has ended, but the winner has not yet been determined.
{
"campaignKey": string,
"product": Product,
"auction": Auction
}
This event for "eBay auction V2" only. This event replaces the display of the Winner Popup.
{
"campaignKey": string,
"product": Product,
"auction": Auction
}
This event for "eBay auction V2" only. When user clicks 'Custom' bid button
{
"campaignKey": string,
"product": Product,
"auction": Auction
}
This event for "eBay auction V2" only. When user clicks 'Credit button'
{ "campaignKey": string }
When user clicks coupon button.
{ "campaignKey": string }