@wix/agent-skills 1.28.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/skills/wix-app/references/editor-react-component/PARTS.md +1 -1
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -1
- package/skills/wix-headless/references/astro.md +1 -1
- package/skills/wix-headless-kit/SKILL.md +7 -5
- package/skills/wix-headless-kit/install/pins.json +3 -3
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +1 -1
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +1 -1
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +4 -4
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +1 -1
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +2 -2
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +1 -1
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +1 -1
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +2 -2
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +2 -2
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-seasonal-promotion.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +2 -2
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +3 -3
- package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-free-shipping.md +3 -3
- package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-optimize-rates.md +1 -1
- package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-setup-rates.md +3 -3
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +1 -1
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.cjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/agent-skills",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Wix Skills for AI coding agents — versioned npm distribution of the wix/skills content.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "https://github.com/wix/skills/issues"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
-
"version": "node .github/scripts/sync-plugin-versions.mjs && git add .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json plugin.json gemini-extension.json"
|
|
15
|
+
"version": "node .github/scripts/sync-plugin-versions.mjs && git add .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json plugin.json gemini-extension.json skills/wix-headless-kit/install/pins.json"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"skills/**",
|
|
@@ -76,7 +76,7 @@ customTriggers.provideHandlers({
|
|
|
76
76
|
1. **Trigger IDs must match** - The `customTriggerId` in `getEligibleTriggers` must match an `_id` from `listTriggers`
|
|
77
77
|
2. **Both handlers required** - You must implement both `getEligibleTriggers` and `listTriggers`
|
|
78
78
|
3. **Dynamic eligibility** - `getEligibleTriggers` is called during checkout to determine which triggers are currently active
|
|
79
|
-
4. **Static list** - `listTriggers` provides the
|
|
79
|
+
4. **Static list** - `listTriggers` provides the full list of all possible triggers for configuration in the Wix dashboard
|
|
80
80
|
5. **Manual step required, every time** — this plugin only supplies *eligibility*. It has no visible effect until the merchant creates an Automatic Discount that uses your trigger. Tell the user this step is required; don't imply the discount is live just because the plugin is installed. Confirmed live, click-by-click in the dashboard:
|
|
81
81
|
1. Go to **Catalog** (left sidebar) → **Discounts** → **Automatic Discounts**.
|
|
82
82
|
2. Click **Create Discount**.
|
|
@@ -81,7 +81,7 @@ The **per-vertical values** — which `WIX_APPS.*PageMetadata` accessor + `seoTa
|
|
|
81
81
|
|
|
82
82
|
## 7 — Caveats (the gaps the docs don't mention)
|
|
83
83
|
|
|
84
|
-
The heart of the file:
|
|
84
|
+
The heart of the file: hard-won knowledge the docs won't surface. These are **guidance the model must follow when it writes the frontend** — not things this skill writes for it.
|
|
85
85
|
|
|
86
86
|
| Caveat | What it says |
|
|
87
87
|
|---|---|
|
|
@@ -23,11 +23,13 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
23
23
|
|
|
24
24
|
- **Shipped code is the implementation.** Every vertical ships in the repository's
|
|
25
25
|
`wix-headless-templates` skill (`skills/wix-headless-templates/<vertical>/`), not in this skill's
|
|
26
|
-
folder
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
folder. `node <SKILL_ROOT>/install/templates.mjs` prints where that skill is: the sibling folder
|
|
27
|
+
`<SKILL_ROOT>/../wix-headless-templates/` when the install carried both skills (the cold start
|
|
28
|
+
does), else a one-time fetch into `<SKILL_ROOT>/templates/` (a second); every script below
|
|
29
|
+
resolves it the same way. **Every `templates/...` path in this document is relative to that
|
|
30
|
+
printed root** — there is no `templates/` folder inside this skill when the sibling exists.
|
|
31
|
+
The folder stays with the project (only the composed `project/` scaffolds are left out of its
|
|
32
|
+
repository), so a later session reads the version the project was built from. Each vertical holds:
|
|
31
33
|
- `app/` — the framework-agnostic core (TypeScript): a data layer that returns **plain,
|
|
32
34
|
serializable DTOs** (images resolved to https URLs, prices pre-formatted), React hooks, and
|
|
33
35
|
routing-free headless components. Works in Astro islands, Vite SPAs, and Next.
|
|
@@ -21,7 +21,7 @@ export interface MenuItemLabel {
|
|
|
21
21
|
iconUrl: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/** One price variant of an item ("
|
|
24
|
+
/** One price variant of an item ("Small" / "Large"). An item has price OR variants. */
|
|
25
25
|
export interface MenuItemVariant {
|
|
26
26
|
variantId: string;
|
|
27
27
|
name: string;
|
|
@@ -21,7 +21,7 @@ export interface MenuItemLabel {
|
|
|
21
21
|
iconUrl: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/** One price variant of an item ("
|
|
24
|
+
/** One price variant of an item ("Small" / "Large"). An item has price OR variants. */
|
|
25
25
|
export interface MenuItemVariant {
|
|
26
26
|
variantId: string;
|
|
27
27
|
name: string;
|
|
@@ -45,9 +45,9 @@ size, or a `modifierGroups` entry) when the restaurant takes orders, so the dish
|
|
|
45
45
|
{ "name": "Branzino", "description": "Whole roasted sea bass, lemon, herbs.",
|
|
46
46
|
"price": 28, "imageUrl": "https://…" }
|
|
47
47
|
] },
|
|
48
|
-
{ "name": "
|
|
49
|
-
{ "name": "
|
|
50
|
-
"variants": [{ "name": "
|
|
48
|
+
{ "name": "Pizze", "items": [
|
|
49
|
+
{ "name": "Margherita", "description": "San Marzano tomato, fior di latte, basil.",
|
|
50
|
+
"variants": [{ "name": "Small", "price": 14 }, { "name": "Large", "price": 22 }], "imageUrl": "https://…" }
|
|
51
51
|
] },
|
|
52
52
|
{ "name": "Dolci", "items": [
|
|
53
53
|
{ "name": "Tiramisù", "description": "Espresso-soaked ladyfingers, mascarpone.",
|
|
@@ -65,7 +65,7 @@ size, or a `modifierGroups` entry) when the restaurant takes orders, so the dish
|
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
- `price` — a number; stored as a decimal string in the **site currency** (never send one per item).
|
|
68
|
-
An item has `price` OR `variants` (each `{ name, price }` — "
|
|
68
|
+
An item has `price` OR `variants` (each `{ name, price }` — "Small" / "Large"), never both; an
|
|
69
69
|
item with neither renders as "Market price" and can't be ordered online.
|
|
70
70
|
- `modifierGroups` — per item: `{ name, required?, min?, max?, modifiers: [{ name, price?, preSelected?, inStock? }] }`.
|
|
71
71
|
`required: true, min: 1, max: 1` is a single choice (radios); `max` alone is "choose up to";
|
|
@@ -166,7 +166,7 @@ export async function createModifierGroups(ctx, groups) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
* Bulk-create price variants (the reusable "
|
|
169
|
+
* Bulk-create price variants (the reusable "Small" / "Large" names; the price per item lives on
|
|
170
170
|
* the item's priceVariants reference). Returns ids in input order.
|
|
171
171
|
* docs: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/items/item-variants/bulk-create-variants.md
|
|
172
172
|
*/
|
|
@@ -29,9 +29,9 @@ if (!siteId) {
|
|
|
29
29
|
console.log(JSON.stringify({ error: "no site: pass --site <siteId> or run in a folder with wix.config.json" }));
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
|
-
const token = execFileSync("npx", ["-y", "@wix/cli@1.1.
|
|
32
|
+
const token = execFileSync("npx", ["-y", "@wix/cli@1.1.258", "token", "--site", siteId], { encoding: "utf8" }).trim();
|
|
33
33
|
if (!token) {
|
|
34
|
-
console.log(JSON.stringify({ error: "the Wix CLI returned no token — run `npx @wix/cli@1.1.
|
|
34
|
+
console.log(JSON.stringify({ error: "the Wix CLI returned no token — run `npx @wix/cli@1.1.258 login` first" }));
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
try {
|
|
@@ -8,7 +8,7 @@ import { delimiter, join } from "node:path";
|
|
|
8
8
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
9
9
|
|
|
10
10
|
// The CLI version the fallback installs; equal to `@wix/cli` in wix-headless-kit/install/pins.json.
|
|
11
|
-
const WIX_CLI_VERSION = "1.1.
|
|
11
|
+
const WIX_CLI_VERSION = "1.1.258";
|
|
12
12
|
|
|
13
13
|
export function resolveWixCli(cwd = process.cwd()) {
|
|
14
14
|
const bin = process.platform === "win32" ? "wix.cmd" : "wix";
|
|
@@ -64,7 +64,7 @@ Interpret the result:
|
|
|
64
64
|
|
|
65
65
|
> **The hidden-service trap.** A service that's **hidden** from the site, or has **online booking turned off**, can still list slots here — so bookable slots do **not** prove customers can book it. When the complaint is "customers can't book / can't find this service" (as opposed to "the calendar is empty"), **run [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking) before trusting the slot count** — it's the single most common cause and neither `ListAvailabilityTimeSlots` nor `DiagnoseAvailability` detects it.
|
|
66
66
|
|
|
67
|
-
If **no slots come back at all**, also
|
|
67
|
+
If **no slots come back at all**, also double-check the inputs before concluding "no availability": the queried window isn't entirely in the past, and any `locations` filter is actually offered by the service.
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
@@ -39,7 +39,7 @@ Set up and tune how a store ships — what rates to charge, which regions are co
|
|
|
39
39
|
|
|
40
40
|
### Troubleshoot
|
|
41
41
|
|
|
42
|
-
> - [Shipping rate incorrect (customer charged wrong shipping)](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-optimize-rates) — tags: `[intent:rate-incorrect]` · priority 0 · *audit rates via the Rate Pricing
|
|
42
|
+
> - [Shipping rate incorrect (customer charged wrong shipping)](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-optimize-rates) — tags: `[intent:rate-incorrect]` · priority 0 · *audit rates via the Rate Pricing Plausibility guardrail, then correct the rate structure*
|
|
43
43
|
|
|
44
44
|
## Tag matching
|
|
45
45
|
|
|
@@ -53,7 +53,7 @@ The agent matches the merchant's natural-language query to an `intent:*` tag (cu
|
|
|
53
53
|
| "How much should I charge for shipping?" | any | `ecom-shipping-setup-rates` via `[intent:setup-rates]` |
|
|
54
54
|
| "I want customers to pick up from my shop" | any | `ecom-shipping-setup-pickup` via `[intent:setup-pickup]` |
|
|
55
55
|
| "Some regions have no shipping option" | any | `ecom-shipping-fix-coverage` via `[intent:fix-coverage]` |
|
|
56
|
-
| "A customer was charged the wrong shipping" | any | `ecom-shipping-optimize-rates` via `[intent:rate-incorrect]` (runs rate-
|
|
56
|
+
| "A customer was charged the wrong shipping" | any | `ecom-shipping-optimize-rates` via `[intent:rate-incorrect]` (runs rate-plausibility guardrail first) |
|
|
57
57
|
|
|
58
58
|
## Base recipe (fallback)
|
|
59
59
|
|
package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md
CHANGED
|
@@ -68,7 +68,7 @@ Check for: duplicate codes, overlapping scopes with active coupons, and cross-me
|
|
|
68
68
|
|
|
69
69
|
- **Duplicate / conflicting code** — reject a code already in use.
|
|
70
70
|
- **Cross-mechanism stacking** — coupons stack with automatic discount rules at checkout. Query active discount rules on overlapping scope; if found, warn with the combined effective discount ("a 20% coupon during a 20% automatic sale = ~36% off"). Only one coupon applies per checkout, but automatic rules are unlimited.
|
|
71
|
-
- **%
|
|
71
|
+
- **% plausibility** — > 50% warn (show a $100 → $(100−pct) example); = 100% block unless confirmed; > 100% always block.
|
|
72
72
|
- **Margin** — if cost data is available, ensure the discount doesn't push price below cost; otherwise warn for > 40%.
|
|
73
73
|
- **User override** — explicit merchant values override these caps; document the override in your reasoning.
|
|
74
74
|
|
|
@@ -129,10 +129,10 @@ These checks guard every discount creation (rule **or** coupon). Run them before
|
|
|
129
129
|
- **Time overlap** — overlapping `activeTimeInfo` on the same scope (`existingStart < newEnd AND existingEnd > newStart`) → warn about the overlap window.
|
|
130
130
|
- **Cross-mechanism (automatic + coupon)** — automatic discounts and coupons both apply at checkout. If creating a rule, query active coupons on overlapping scope (and vice-versa); warn with the combined effective discount. (Only one coupon per checkout, but automatic rules are unlimited.)
|
|
131
131
|
|
|
132
|
-
**Margin /
|
|
132
|
+
**Margin / plausibility:**
|
|
133
133
|
- **Global cap** — default max discount **25%**; flag anything higher (proceed only on explicit request).
|
|
134
134
|
- **Minimum margin** — default floor **15%**; if cost data is available, `effective_margin = (price − cost − discount_amount) / price × 100` must stay ≥ 15% (block + explain otherwise).
|
|
135
|
-
- **%
|
|
135
|
+
- **% plausibility** — > 50% warn (show a $100 → $(100−pct) example); = 100% block unless confirmed ("makes the product free"); > 100% always block.
|
|
136
136
|
- **Stacking margin** — when a new discount overlaps existing active ones, evaluate the *combined* discount against the cap and margin floor, not just the new one in isolation.
|
|
137
137
|
|
|
138
138
|
| Scenario | Action |
|
|
@@ -4,7 +4,7 @@ description: "BUNDLE_AND_SAVE sub-flow — load [Goal: Drive Cross-Sells] FIRST
|
|
|
4
4
|
---
|
|
5
5
|
# Flow: Bundle & Save Campaign
|
|
6
6
|
|
|
7
|
-
> **Before executing this skill**, read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-
|
|
7
|
+
> **Before executing this skill**, read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-plausibility).
|
|
8
8
|
|
|
9
9
|
Creates a discount that rewards customers for purchasing multiple items, encouraging product discovery and cross-selling. The discount activates when the cart contains a minimum number of items, and targets categories or products where bundling makes strategic sense.
|
|
10
10
|
|
|
@@ -8,7 +8,7 @@ description: "SEASONAL sub-flow — load [Goal: Seasonal Revenue] FIRST (it owns
|
|
|
8
8
|
>
|
|
9
9
|
> This flow is a sub-step, not a direct entry point. If you have not yet called `ReadFullDocsArticle` on [Goal: Seasonal Revenue](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/goal-seasonal-revenue) in this conversation, **stop and load it now**. The goal skill owns the SEASONAL classification rule, the time-window presentation requirement, and the priority rule that gates access to this flow.
|
|
10
10
|
>
|
|
11
|
-
> **Before executing this flow**, also read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-
|
|
11
|
+
> **Before executing this flow**, also read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-plausibility).
|
|
12
12
|
|
|
13
13
|
Creates event-driven promotional discounts tied to holidays, shopping events, or seasonal milestones. The flow identifies upcoming events based on the site's country and current date, calculates optimal campaign start/end windows, and targets event-relevant product categories with appropriately sized discounts.
|
|
14
14
|
|
package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "Stock-mover clearance sub-flow — load [Goal: Clear Inventory] FI
|
|
|
6
6
|
|
|
7
7
|
> **Routing rule (READ FIRST).** This recipe is a sub-step of [Goal: Clear Inventory](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/goal-clear-inventory). If you arrived here directly from the WixREADME index, load the goal recipe NOW before executing — it owns the velocity scoring, classification cues, and the per-recommendation presentation rules (including the **margin-floor guardrail** surfacing requirement).
|
|
8
8
|
>
|
|
9
|
-
> **Then** read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-
|
|
9
|
+
> **Then** read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-plausibility).
|
|
10
10
|
|
|
11
11
|
Creates a discount targeting slow-moving inventory — products with high stock levels and low sales velocity. The discount depth is proportional to how overstocked the product is, with deeper discounts for the most stagnant items. Margin protection guardrails are especially important here since clearance discounts tend to push closer to cost.
|
|
12
12
|
|
|
@@ -99,7 +99,7 @@ If scope is CATEGORY, call `getCategoryIds` to convert category names to GUIDs.
|
|
|
99
99
|
|
|
100
100
|
## Step 6: Run guardrail checks
|
|
101
101
|
|
|
102
|
-
**Run the pre-create guardrails in [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) → "Guardrails" before creating the rule** (conflict/stacking, %-
|
|
102
|
+
**Run the pre-create guardrails in [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) → "Guardrails" before creating the rule** (conflict/stacking, %-plausibility, margin floor). Clearance is the **most margin-sensitive** case: discounts push closest to cost, so the margin-floor check (effective margin ≥ 15% unless the merchant overrides) is the one most likely to fire here — verify it per candidate product.
|
|
103
103
|
|
|
104
104
|
---
|
|
105
105
|
|
package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md
CHANGED
|
@@ -4,7 +4,7 @@ description: "UPSELL_BOOST sub-flow — load [Goal: Increase AOV] FIRST (it owns
|
|
|
4
4
|
---
|
|
5
5
|
# Flow: Upsell Boost Campaign
|
|
6
6
|
|
|
7
|
-
> **Before executing this skill**, read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-
|
|
7
|
+
> **Before executing this skill**, read [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) with `ReadFullDocsArticle` — it contains the discount-rule mechanics **and** the pre-create guardrails (conflict/stacking, margin floor, %-plausibility).
|
|
8
8
|
|
|
9
9
|
Creates a discount that incentivizes customers to spend more per order by setting a minimum subtotal threshold above the store's current AOV. The discount percentage is scaled to the store's average profit margin, and the scope targets high-margin categories or products.
|
|
10
10
|
|
|
@@ -29,7 +29,7 @@ Catalog analytics and product data are already in conversation context — do NO
|
|
|
29
29
|
- `siteData.aov` — site-level AOV (revenue / ordersCount). Loaded by eCommerce Load Context.
|
|
30
30
|
|
|
31
31
|
Extract from context:
|
|
32
|
-
- `effective_aov` — use `siteData.aov`; run AOV
|
|
32
|
+
- `effective_aov` — use `siteData.aov`; run AOV plausibility check: if AOV < price_p25, override with price_p50 as effective AOV
|
|
33
33
|
- `avg_profit_margin` — from the "All Products" group in `siteData.catalogAnalytics`
|
|
34
34
|
- `price_p50`, `price_p75`, `price_p90` — from quantiles in `siteData.catalogAnalytics`
|
|
35
35
|
- Top products by price and order volume — from `siteData.productCatalogData`
|
|
@@ -90,7 +90,7 @@ Max 3 categoryIds per discount rule.
|
|
|
90
90
|
|
|
91
91
|
## Step 6: Run guardrail checks
|
|
92
92
|
|
|
93
|
-
**Run the pre-create guardrails in [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) → "Guardrails" before creating the rule** — conflict/stacking (scope, time, coupon cross-stacking), the 25% cap, the 15% margin floor, and %-
|
|
93
|
+
**Run the pre-create guardrails in [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/pricing-create-discount-rule) → "Guardrails" before creating the rule** — conflict/stacking (scope, time, coupon cross-stacking), the 25% cap, the 15% margin floor, and %-plausibility. Present any warnings to the merchant and get confirmation before proceeding.
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
@@ -8,7 +8,7 @@ description: Creates a free shipping option with an AOV-calibrated threshold to
|
|
|
8
8
|
|
|
9
9
|
> **Before executing this skill**, read [Setup: Shipping Rates](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-set-up-rates) with `ReadFullDocsArticle` for the rate-object mechanics.
|
|
10
10
|
|
|
11
|
-
## Rate pricing
|
|
11
|
+
## Rate pricing plausibility (inline guardrail)
|
|
12
12
|
|
|
13
13
|
Validate every rate you create or update against the store's AOV; flag any that fail:
|
|
14
14
|
|
|
@@ -101,7 +101,7 @@ If the threshold needs adjustment, update the shipping option via PATCH (see Ste
|
|
|
101
101
|
|
|
102
102
|
---
|
|
103
103
|
|
|
104
|
-
## Step 3: Run AOV
|
|
104
|
+
## Step 3: Run AOV plausibility check
|
|
105
105
|
|
|
106
106
|
Before calculating a threshold, validate that AOV is reliable by comparing it against catalog price distribution.
|
|
107
107
|
|
|
@@ -263,7 +263,7 @@ Report to the merchant:
|
|
|
263
263
|
| `deliveryRegionId is not a valid GUID` | Used `deliveryRegionIds` (plural) instead of `deliveryRegionId` (singular) | Use the singular `deliveryRegionId` field |
|
|
264
264
|
| `SHIPPING_OPTION_NOT_FOUND` | Option ID doesn't exist when trying to update | Re-query shipping options to get current IDs |
|
|
265
265
|
| `REVISION_MISMATCH` | Revision doesn't match the current version when updating | Re-fetch the option for the latest revision, then retry |
|
|
266
|
-
| Threshold seems unreasonable | AOV data is unreliable (too few orders, data anomaly) | Run the AOV
|
|
266
|
+
| Threshold seems unreasonable | AOV data is unreliable (too few orders, data anomaly) | Run the AOV plausibility check (Step 3) and use `effective_aov` instead of raw AOV |
|
|
267
267
|
| Free shipping not visible at checkout | Region linked to the option has `active=false` | Check region active status and activate if intended |
|
|
268
268
|
|
|
269
269
|
## References
|
|
@@ -6,7 +6,7 @@ description: Analyzes catalog price distribution and current rate structure to r
|
|
|
6
6
|
|
|
7
7
|
> **Routing rule:** BEFORE taking any action, call `ReadFullDocsArticle` on [Shipping API Reference](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-api-reference). The Query Shipping Options and Update/Create Shipping Option endpoints used in Steps 2–4 live there. Do NOT query or modify any shipping options without loading it first.
|
|
8
8
|
|
|
9
|
-
## Rate pricing
|
|
9
|
+
## Rate pricing plausibility (inline guardrail)
|
|
10
10
|
|
|
11
11
|
Validate every rate you create or update against the store's AOV; flag any that fail:
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Shipping: Set Up Rates"
|
|
3
|
-
description: Configures shipping option rates — rate types (flat, tiered, free), condition types and operators, free shipping threshold calibration, AOV
|
|
3
|
+
description: Configures shipping option rates — rate types (flat, tiered, free), condition types and operators, free shipping threshold calibration, AOV plausibility check, per-item penalty avoidance, and tier gap detection.
|
|
4
4
|
---
|
|
5
5
|
# Shipping Rates
|
|
6
6
|
|
|
7
|
-
## AOV
|
|
7
|
+
## AOV Plausibility Check
|
|
8
8
|
|
|
9
9
|
**MANDATORY before any threshold calculation that references AOV.** Raw AOV can be misleading due to data issues or bulk purchases.
|
|
10
10
|
|
|
@@ -80,6 +80,6 @@ When ALL of the following are true, flat rate is optimal and no change is needed
|
|
|
80
80
|
|
|
81
81
|
Sort all conditions by value and look for gaps between ranges. Gaps mean some cart totals have no matching rate, which can cause checkout failures.
|
|
82
82
|
|
|
83
|
-
## Shipping Cost
|
|
83
|
+
## Shipping Cost Plausibility Check
|
|
84
84
|
|
|
85
85
|
Any rate `amount > AOV x 0.15` (15% of average order value) should be flagged as a cart abandonment risk.
|
|
@@ -1624,7 +1624,7 @@ function normalizeV5Contact(contact = {}) {
|
|
|
1624
1624
|
return normalized;
|
|
1625
1625
|
}
|
|
1626
1626
|
// Legacy V4-style `info` payloads (pre-GA generated transforms) convert through this
|
|
1627
|
-
// STRICT
|
|
1627
|
+
// STRICT allowlist: unknown keys throw instead of silently dropping source data.
|
|
1628
1628
|
// `extendedFields` and `labelKeys` throw because they have no mechanical V5 equivalent —
|
|
1629
1629
|
// V5 custom fields live under extendedFields.namespaces (Data Extension Schema) and
|
|
1630
1630
|
// labels became tags (Tags API); both need a setup-time decision, not a converter guess.
|
|
@@ -326,7 +326,7 @@ async function enableOnlineReservations(ctx, reservationLocationId, revision) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// ══ EXPERIENCES (setup-restaurant-experiences.md) ══════════════════════════════════════════════════
|
|
329
|
-
// An experience is a reservation that IS a curated dining occasion (
|
|
329
|
+
// An experience is a reservation that IS a curated dining occasion (chef's table, tasting menu). Feature
|
|
330
330
|
// of the Table Reservations app — no separate install. Created against a reservationLocationId (from
|
|
331
331
|
// listReservationLocations). The full create payload lives in the live docs (fields evolve) — build each
|
|
332
332
|
// `experience` from the Create-Experience doc; this only wires the loop. Set configuration.visible:true.
|