- Print
Parameter object (Payload)
- Print
This guide introduces the parameter object payload of the messageCallback
functions provided by ShopLive.
ON_CLICK_CAMPAIGN_LIST_ITEM
On clicking a campaign on the list
Payload | Type |
---|---|
campaign |
ON_PLAYER_MODAL_SHOWN
On player modal UI is shown
Payload | Type |
---|---|
campaign |
ON_PLAYER_MODAL_HIDDEN
On player modal is closed and hidden
Payload | Type |
---|---|
campaign |
ON_CLICK_CLOSE_PLAYER_MODAL
On user click the close button of player modal UI
Payload | Type |
---|---|
campaign |
ON_LIVE_MINI_PREVIEW_SHOWN / ON_LIVE_MINI_PREVIEW_HIDDEN
On Live Mini Preview is shown / hidden
ON_CLICK_CLOSE_LIVE_MINI_PREVIEW
On user click the Close button of Live Mini Preview
CLICK_PRODUCT
On clicking an item on the product list
Payload | Type |
---|---|
payload |
LINK_NEW_WINDOW
On clicking the product banner
(Pop-up setting: Click event - ‘Link(New Window)')
Payload | Type |
---|---|
url | string |
CLICK_SHARE_BTN
On clicking the Share button
Payload | Type |
---|---|
campaignKey | string |
shareUrl | string |
NOW_ONAIR_CHECKED
On checking whether the campaign is On Air or not.
Payload | Type |
---|---|
campaign |
CLICK_PRODUCT
On clicking an item on the product list
Payload | Type |
---|---|
payload |
ON_CLICK_BUY_BUTTON
On clicking the Buy button on the product list
Payload | Type |
---|---|
payload |
CLICK_PRODUCT_CART
On clicking the Cart button on the product list
Payload | Type |
---|---|
payload |
ON_PRODUCT_LIST_SHOWN
On product list pop-up is shwon
Payload | Type |
---|---|
productList | Array<Goods> |
LINK
On clicking pop-up (pop-up - Click event ‘Link’ required)
If you do not override it
WEB: Leaving the current page, display linkUrl in a current window
APP(SDK): Enter PIP mode and call NAVIGATION
Payload | Type | Description |
---|---|---|
campaignKey | string | Unique key of campaign |
popupResourceId | string | Unique key of popup |
type | string | Type of popup |
url | string | link URL |
LINK_NEW_WINDOW
On clicking pop-up (pop-up - Click event ‘Link(New window)’ required)
If you do not override it
WEB: Display linkUrl in a new window
APP(SDK): Enter PIP mode and call NAVIGATION
Payload | Type | Description |
---|---|---|
campaignKey | string | Unique key of campaign |
popupResourceId | string | Unique key of popup |
type | string | Type of popup |
url | string | link URL |
DOWNLOAD_COUPON
On clicking pop-up (pop-up - Click event Download coupon required)
Payload | Type | Description |
---|---|---|
campaignKey | string | Unique key of campaign |
popupResourceId | string | Unique key of popup |
type | string | Type of popup |
coupon | string | Coupon code |
CUSTOM_ACTION
On clicking pop-up (pop-up - Click event User defined required)
Name | Type | Description |
---|---|---|
campaignKey | string | Unique key of campaign |
id | string | Unique key of popup |
type | string | Type of popup |
payload | object | User-defined payload object |
Payload types
PluginCampaign
Name | Type | Description |
---|---|---|
campaignKey | string | Unique key of campaign |
campaignStatus | "READY" | "ONAIR" | "CLOSED" | Status of campaign |
title | string | Campaign title |
scheduledAt | number (Timestamp in milliseconds) | Scheduled start time of campaign |
tags | array<string> | Tags registered to campaign |
memo | string? | Campaign description |
backgroundUrl | string? | Background Image URL |
rehearsal | boolean? | Whether the campaign is in rehearsal |
Goods
Name | Type | Example | Description |
---|---|---|---|
sku | string | "SKU" | Product code |
name | string | "PRODUCT_NAME" | Product title |
brand | string | "BRAND" | Brand title |
url | string | link URL | |
showingNow | boolean | true / false | Whether showing ‘NOW’ icon |
salesStatus | string | "ON_SALE" | "SOLDOUT" | "ALMOST_SOLDOUT" | On sale / Sold out / Almost sold out |
originalPrice | LosslessNumber | {"value": "10000"} | Original price |
discountedPrice | LosslessNumber | {"value": "9000"} | Discounted price |
discountPercentage | LosslessNumber | {"value": "10.0"} | Discount percentage |
currency | string | "KRW" | Currency |
goodsId | LosslessNumber | {"value": "1"} | Unique key of product |
description | string | "Description" | Description |
campaignId | LosslessNumber | {"value": "1"} | Unique key of campaign |
isCartOn | boolean? | true / false | Add to cart / Remove from cart |