Shopee Affiliate: sign in, search the affiliate catalog, make affiliate links, read earnings.
Generated from the node definitions in
src/lib/flow/node/shopee/and the English labels (component.flow.node.shopee). Every node also has the common settings.
Contents
- Affiliate link —
shopee/affiliate - Earnings report —
shopee/report - Search products —
shopee/search - Sign in to Shopee —
shopee/signin
Affiliate link
shopee/affiliate · icon badge-percent
Your affiliate link for a product from the search
Fields
| Field | Label | Kind | Default | Shown for |
|---|---|---|---|---|
account | Account | dataset.account | ||
id | Product ID (from Search products) | text | ||
subId | Sub ID (empty: the campaign's id) | text | ||
keyword | Keyword to search again when the product isn't on the page | text |
Links are kept per Shopee account and Sub ID in shopee/affiliate/link (30 days, key <product id>|<Sub ID>): the same product for the same campaign comes from there. When the search came from the cache, the product isn't on the page, so it searches keyword again first.
Output dots
next— Nexterror— Error
Output shape
Later nodes read it as {{ nodes.<id>.output… }}.
{
"id": "string",
"link": "string",
"subId": "string",
"isCached": "boolean",
"error": "string"
}
Default settings
timeout 5 minutes, on error human; the rest are the common defaults.
Example node
{
"id": "affiliate",
"type": "shopee/affiliate",
"name": "Affiliate link",
"field": {},
"setting": {
"retry": {
"count": 0,
"waitMs": 1000,
"backoff": "fixed"
},
"error": { "mode": "human", "fallback": null, "break": { "count": 3, "waitMs": 600000 } },
"timeoutMs": 300000,
"disabled": false
},
"pin": null
}
In a campaign an empty Sub ID becomes the campaign's id, so Earnings report puts its commission on that campaign's dashboard. The output adds subId.
Earnings report
shopee/report · icon chart-bar
Reads Shopee Affiliate's conversion report for the last days into shopee/report/earning (per Shopee account): one row per day and Sub ID with orders and commission. A Sub ID that is a campaign's id puts the row on that campaign's dashboard (Charts: Commission, Orders). Columns are found by their header text (Sub ID, date, order, commission); a report it can't read logs the headers it saw and leaves through empty.
Built against Shopee's report page as known; not yet verified on a live account. Run it once and check the log.
Fields
| Field | Label | Kind | Default | Shown for |
|---|---|---|---|---|
account | Account | dataset.account | ||
days | Last days | number | 7 |
Output dots
next— Nextempty— Nothing read
Output shape
{
"rows": [
{
"date": "string",
"subId": "string",
"order": "number",
"commission": "number"
}
],
"count": "number"
}
Default settings
on error ask a human, timeout 5 minutes; the rest are the .
Run it as its own daily campaign on the Shopee account (a flow: Schedule or Manual → Sign in to Shopee → Earnings report). Shopee confirms commission days later, so re-reading the last days updates them.
Search products
shopee/search · icon package-search
Searches the Shopee Affiliate catalog (price, sold, commission)
Fields
| Field | Label | Kind | Default | Shown for |
|---|---|---|---|---|
account | Account | dataset.account | ||
region | Region | select: ID (Indonesia), MY (Malaysia), SG (Singapore), TH (Thailand), VN (Vietnam), PH (Philippines) | "ID" | |
keyword | Keyword | text | ||
max | Maximum products | number | 20 | |
cacheMs | Keep results for (ms, per account; 0: off) | number | 86400000 |
Results are kept per Shopee account in shopee/search/product (key: the keyword, lower case): the same keyword again within cacheMs, from any campaign using this account, comes from there without touching the browser (isCached: true, log … from this account's cache). If Shopee sends the account to its login mid-search, the account shows Signed out and the step asks you to scan the QR again.
Output dots
next— Nextempty— Empty
Output shape
Later nodes read it as {{ nodes.<id>.output… }}.
{
"items": [
{
"id": "string",
"name": "string",
"price": "number",
"sold": "number",
"commission": "number",
"text": {
"price": "string",
"sold": "string",
"commission": "string"
},
"image": "string",
"url": "string"
}
],
"keyword": "string",
"isCached": "boolean"
}
Default settings
timeout 5 minutes, on error human; the rest are the .
Example node
{
"id": "search",
"type": "shopee/search",
"name": "Search products",
"field": {
"region": "ID",
"max": 20
},
"setting": {
"retry": {
"count": 0,
"waitMs": 1000,
"backoff": "fixed"
},
"error": { "mode": "human", "fallback": null, "break": { "count": 3, "waitMs": 600000 } },
"timeoutMs": 300000,
"disabled": false
},
"pin": null
}
Sign in to Shopee
shopee/signin · icon qr-code
Opens Shopee Affiliate; sign in once by scanning the QR code
Session: it runs in the campaign's browser (or the one of the campaign it runs in; a Studio test's own). Signed out, it shows the QR for you to scan (up to 6 hours, then the run fails). Then it reads who it is (the SPC_U cookie) and checks it with mooflair. See . Sign-ins take turns per browser: when two campaigns start together, the second finds it signed in.
It shows a rich intervention while you scan: the steps, Show QR again (a fresh code) and Done (checks first; it also notices by itself). It goes on once Shopee Affiliate is open.
Fields
| Field | Label | Kind | Default | Shown for |
|---|---|---|---|---|
account | Account | dataset.account |
Output dots
next— Next
Output shape
Later nodes read it as {{ nodes.<id>.output… }}.
{
"username": "string",
"region": "string",
"already": "boolean"
}
Default settings
timeout 10 minutes, on error human; the rest are the .
Example node
{
"id": "signin",
"type": "shopee/signin",
"name": "Sign in to Shopee",
"field": {},
"setting": {
"retry": {
"count": 0,
"waitMs": 1000,
"backoff": "fixed"
},
"error": { "mode": "human", "fallback": null, "break": { "count": 3, "waitMs": 600000 } },
"timeoutMs": 600000,
"disabled": false
},
"pin": null
}