@wix/agent-skills 1.0.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/LICENSE +21 -0
- package/README.md +111 -0
- package/package.json +29 -0
- package/skills/wix-app/SKILL.md +344 -0
- package/skills/wix-app/references/APP_IDENTIFIERS.md +35 -0
- package/skills/wix-app/references/APP_MARKET_REVIEW.md +311 -0
- package/skills/wix-app/references/APP_VALIDATION.md +171 -0
- package/skills/wix-app/references/BACKEND_API.md +233 -0
- package/skills/wix-app/references/BACKEND_EVENT.md +116 -0
- package/skills/wix-app/references/CODE_QUALITY.md +33 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +587 -0
- package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +157 -0
- package/skills/wix-app/references/DASHBOARD_MODAL.md +283 -0
- package/skills/wix-app/references/DASHBOARD_PAGE.md +403 -0
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +205 -0
- package/skills/wix-app/references/DATA_COLLECTION.md +451 -0
- package/skills/wix-app/references/DOCUMENTATION.md +42 -0
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +65 -0
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +468 -0
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +96 -0
- package/skills/wix-app/references/SERVICE_PLUGIN.md +235 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +436 -0
- package/skills/wix-app/references/STORES_VERSIONING.md +334 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +84 -0
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +345 -0
- package/skills/wix-app/references/dashboard-menu-plugin/blog-slots.md +71 -0
- package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +58 -0
- package/skills/wix-app/references/dashboard-menu-plugin/crm-slots.md +8 -0
- package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +17 -0
- package/skills/wix-app/references/dashboard-menu-plugin/events-slots.md +29 -0
- package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +27 -0
- package/skills/wix-app/references/dashboard-menu-plugin/stores-slots.md +35 -0
- package/skills/wix-app/references/dashboard-page/API_SPEC.md +138 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +573 -0
- package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +269 -0
- package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +164 -0
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +294 -0
- package/skills/wix-app/references/data-collection/WIX_DATA.md +270 -0
- package/skills/wix-app/references/data-collection/extension-template.ts +107 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +138 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +454 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +165 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +576 -0
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +170 -0
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +6 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +25 -0
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +203 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +167 -0
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +137 -0
- package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +112 -0
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +118 -0
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +87 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +86 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +135 -0
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +79 -0
- package/skills/wix-app/references/service-plugin/VALIDATIONS.md +68 -0
- package/skills/wix-app/references/site-plugin/EXAMPLES.md +311 -0
- package/skills/wix-app/references/site-plugin/SLOTS.md +263 -0
- package/skills/wix-design-system/SKILL.md +129 -0
- package/skills/wix-design-system/references/file-structure.md +56 -0
- package/skills/wix-design-system/scripts/wds.cjs +531 -0
- package/skills/wix-headless/SKILL.md +418 -0
- package/skills/wix-headless/references/DISCOVERY.md +332 -0
- package/skills/wix-headless/references/ORCHESTRATION.md +269 -0
- package/skills/wix-headless/references/SETUP.md +154 -0
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +152 -0
- package/skills/wix-headless/references/blog/BLOG_PAGES.md +299 -0
- package/skills/wix-headless/references/blog/BLOG_SETUP.md +218 -0
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +32 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +373 -0
- package/skills/wix-headless/references/cms/FAQ_KNOWLEDGE_BASE.md +229 -0
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +40 -0
- package/skills/wix-headless/references/cms/PORTFOLIO.md +454 -0
- package/skills/wix-headless/references/cms/RESOURCE_LIBRARY.md +356 -0
- package/skills/wix-headless/references/cms/TEAM_DIRECTORY.md +299 -0
- package/skills/wix-headless/references/commands/install-app.md +42 -0
- package/skills/wix-headless/references/commands/known-apps.json +5 -0
- package/skills/wix-headless/references/commands/mcp-bootstrap.md +28 -0
- package/skills/wix-headless/references/designer/INSTRUCTIONS.md +828 -0
- package/skills/wix-headless/references/ecom/CART_PAGES.md +120 -0
- package/skills/wix-headless/references/ecom/CART_WIRING.md +103 -0
- package/skills/wix-headless/references/ecom/COMPONENTS_CSS.md +132 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +59 -0
- package/skills/wix-headless/references/forms/CONTACT_FORM.md +477 -0
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +43 -0
- package/skills/wix-headless/references/gift-cards/COMPONENTS.md +119 -0
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +51 -0
- package/skills/wix-headless/references/gift-cards/PAGES.md +129 -0
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +359 -0
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +8 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +185 -0
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +155 -0
- package/skills/wix-headless/references/shared/MCP_PREFIX.md +105 -0
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +97 -0
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +423 -0
- package/skills/wix-headless/references/shared/STYLING.md +117 -0
- package/skills/wix-headless/references/stores/BACK_IN_STOCK.md +178 -0
- package/skills/wix-headless/references/stores/CATEGORY_PAGES.md +86 -0
- package/skills/wix-headless/references/stores/COMPONENTS_CSS.md +129 -0
- package/skills/wix-headless/references/stores/HOME_AND_NAV.md +227 -0
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +96 -0
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +249 -0
- package/skills/wix-headless/references/stores/PRODUCT_PAGES.md +213 -0
- package/skills/wix-headless/references/stores/SHARED_WIRING.md +164 -0
- package/skills/wix-headless/references/verticals/_schema.json +160 -0
- package/skills/wix-headless/references/verticals/_schema.md +185 -0
- package/skills/wix-headless/references/verticals/blog.md +125 -0
- package/skills/wix-headless/references/verticals/cms.md +121 -0
- package/skills/wix-headless/references/verticals/ecom.md +96 -0
- package/skills/wix-headless/references/verticals/forms.md +106 -0
- package/skills/wix-headless/references/verticals/gift-cards.md +121 -0
- package/skills/wix-headless/references/verticals/stores.md +167 -0
- package/skills/wix-headless/scripts/check-manifest.mjs +198 -0
- package/skills/wix-headless/scripts/copy-utility-templates.mjs +153 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +77 -0
- package/skills/wix-headless/scripts/finalize-run-json.mjs +141 -0
- package/skills/wix-headless/scripts/init-site-json.mjs +63 -0
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +124 -0
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +190 -0
- package/skills/wix-headless/scripts/preview.sh +45 -0
- package/skills/wix-headless/scripts/release.sh +73 -0
- package/skills/wix-headless/scripts/scaffold.sh +53 -0
- package/skills/wix-headless/scripts/seed-utilities.sh +55 -0
- package/skills/wix-headless/shared-utilities/analytics.ts +40 -0
- package/skills/wix-headless/shared-utilities/ricos.ts +179 -0
- package/skills/wix-headless/shared-utilities/wix-image.ts +72 -0
- package/skills/wix-headless/templates/ecom/CartBadge.tsx +84 -0
- package/skills/wix-headless/templates/ecom/CartView.tsx +543 -0
- package/skills/wix-headless/templates/ecom/cart.astro +13 -0
- package/skills/wix-headless/templates/ecom/components-ecom.css +215 -0
- package/skills/wix-headless/templates/ecom/discounts.ts +71 -0
- package/skills/wix-headless/templates/ecom/thank-you.astro +24 -0
- package/skills/wix-headless/templates/gift-cards/GiftCardPurchase.tsx +172 -0
- package/skills/wix-headless/templates/gift-cards/_home-teaser-snippet.astro +42 -0
- package/skills/wix-headless/templates/gift-cards/_nav-snippet.astro +11 -0
- package/skills/wix-headless/templates/gift-cards/components-gift-cards.css +219 -0
- package/skills/wix-headless/templates/gift-cards/gift-cards.astro +51 -0
- package/skills/wix-headless/templates/gift-cards/gift-cards.ts +75 -0
- package/skills/wix-headless/templates/stores/AddToCartButton.tsx +77 -0
- package/skills/wix-headless/templates/stores/BackInStockForm.tsx +176 -0
- package/skills/wix-headless/templates/stores/CategoryRail.astro +69 -0
- package/skills/wix-headless/templates/stores/ProductCard.astro +79 -0
- package/skills/wix-headless/templates/stores/ProductPurchase.tsx +397 -0
- package/skills/wix-headless/templates/stores/SeoTags.astro +21 -0
- package/skills/wix-headless/templates/stores/back-in-stock.ts +67 -0
- package/skills/wix-headless/templates/stores/categories.ts +155 -0
- package/skills/wix-headless/templates/stores/category/[slug].astro +130 -0
- package/skills/wix-headless/templates/stores/components-stores.css +295 -0
- package/skills/wix-headless/templates/stores/products/[slug].astro +128 -0
- package/skills/wix-headless/templates/stores/products/index.astro +101 -0
- package/skills/wix-manage/SKILL.md +280 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +155 -0
- package/skills/wix-manage/references/app-installation/list-installed-apps.md +124 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +226 -0
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +95 -0
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +416 -0
- package/skills/wix-manage/references/bookings/bookings-staff-setup.md +255 -0
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +462 -0
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +278 -0
- package/skills/wix-manage/references/bookings/external-calendar-integration.md +258 -0
- package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +231 -0
- package/skills/wix-manage/references/calendar/configure-default-business-hours.md +226 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +422 -0
- package/skills/wix-manage/references/cms/cms-data-operations-extended.md +263 -0
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +136 -0
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +160 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +143 -0
- package/skills/wix-manage/references/contacts/bulk-delete-contacts.md +73 -0
- package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +67 -0
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +434 -0
- package/skills/wix-manage/references/ecommerce/api-recommendation-tracking.md +420 -0
- package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +267 -0
- package/skills/wix-manage/references/ecommerce/flow-bundle-and-save.md +290 -0
- package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +300 -0
- package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +364 -0
- package/skills/wix-manage/references/ecommerce/flow-seasonal-promotion.md +315 -0
- package/skills/wix-manage/references/ecommerce/flow-stock-mover.md +308 -0
- package/skills/wix-manage/references/ecommerce/flow-upsell-boost.md +271 -0
- package/skills/wix-manage/references/ecommerce/goal-clear-inventory.md +118 -0
- package/skills/wix-manage/references/ecommerce/goal-drive-cross-sells.md +122 -0
- package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +132 -0
- package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +148 -0
- package/skills/wix-manage/references/ecommerce/goal-seasonal-revenue.md +146 -0
- package/skills/wix-manage/references/ecommerce/guardrail-discount-conflicts.md +118 -0
- package/skills/wix-manage/references/ecommerce/guardrail-margin-protection.md +88 -0
- package/skills/wix-manage/references/ecommerce/guardrail-rate-pricing-sanity.md +108 -0
- package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +124 -0
- package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +299 -0
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +582 -0
- package/skills/wix-manage/references/ecommerce/setup-coupons.md +338 -0
- package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +444 -0
- package/skills/wix-manage/references/ecommerce/setup-shipping-rates.md +86 -0
- package/skills/wix-manage/references/ecommerce/setup-shipping-regions.md +56 -0
- package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +209 -0
- package/skills/wix-manage/references/ecommerce/skill-graph.md +139 -0
- package/skills/wix-manage/references/ecommerce/troubleshoot-checkout-delivery-dropoff.md +124 -0
- package/skills/wix-manage/references/ecommerce/troubleshoot-discount-not-applying.md +95 -0
- package/skills/wix-manage/references/events/list-events.md +203 -0
- package/skills/wix-manage/references/forms/create-form.md +260 -0
- package/skills/wix-manage/references/get-paid/create-payment-links.md +212 -0
- package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +57 -0
- package/skills/wix-manage/references/get-paid/payment-links-for-bookings.md +101 -0
- package/skills/wix-manage/references/media/upload-media-to-wix.md +216 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +77 -0
- package/skills/wix-manage/references/pricing-plans/pricing-plans-bookings-integration.md +166 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +336 -0
- package/skills/wix-manage/references/rich-content/ricos-converter-service.md +295 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +59 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +183 -0
- package/skills/wix-manage/references/sites/query-sites.md +125 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +57 -0
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1041 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v1.md +125 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +824 -0
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +566 -0
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +194 -0
- package/skills/wix-manage/references/stores/query-products-catalog-v1.md +80 -0
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +99 -0
- package/skills/wix-manage/references/stores/update-product-pre-order.md +213 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +318 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Flow: Bundle and Save"
|
|
3
|
+
description: Creates a discount campaign promoting product discovery and cross-selling by requiring minimum item quantities. Targets high-margin categories with complementary products.
|
|
4
|
+
layer: flow
|
|
5
|
+
references:
|
|
6
|
+
- name: "Guardrail: Discount Conflicts"
|
|
7
|
+
path: ecommerce/guardrail-discount-conflicts.md
|
|
8
|
+
load: true
|
|
9
|
+
- name: "Setup: Discount Rules"
|
|
10
|
+
path: ecommerce/setup-discount-rules.md
|
|
11
|
+
load: true
|
|
12
|
+
---
|
|
13
|
+
# Flow: Bundle & Save Campaign
|
|
14
|
+
|
|
15
|
+
> **Before executing this skill**, read these referenced skills with `ReadFullDocsArticle`:
|
|
16
|
+
> - [Guardrail: Discount Conflicts](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/guardrail-discount-conflicts)
|
|
17
|
+
> - [Setup: Discount Rules](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/setup-discount-rules)
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- Wix Stores installed on the site
|
|
24
|
+
- Products exist in the catalog across multiple categories
|
|
25
|
+
- Access to `getCatalogAnalytics` and `getProductCatalogData` tools
|
|
26
|
+
- Categories with 2+ products suitable for bundling
|
|
27
|
+
|
|
28
|
+
## Required APIs
|
|
29
|
+
|
|
30
|
+
- [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/create-discount-rule)
|
|
31
|
+
- [Query Discount Rules](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/query-discount-rules)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 1: Gather catalog data
|
|
36
|
+
|
|
37
|
+
Call `getCatalogAnalytics` and `getProductCatalogData` concurrently to assess the catalog's bundle potential.
|
|
38
|
+
|
|
39
|
+
**getCatalogAnalytics** call:
|
|
40
|
+
```
|
|
41
|
+
aggregates: min(price), max(price), avg(profitMargin), count
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**getProductCatalogData** call:
|
|
45
|
+
```
|
|
46
|
+
ordered: price DESC, ordersCount DESC
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Save the following values:
|
|
50
|
+
- `min_price`, `max_price` — price range determines viable bundle combinations
|
|
51
|
+
- `avg_profit_margin` — sets the discount ceiling
|
|
52
|
+
- `count` — catalog breadth; more products = more bundling options
|
|
53
|
+
- Top products by price and order count — identifies popular items for bundle anchoring
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Step 2: Analyze cross-sell patterns
|
|
58
|
+
|
|
59
|
+
Evaluate the catalog for bundling opportunities:
|
|
60
|
+
|
|
61
|
+
1. **Category diversity**: Look for categories with multiple products at complementary price points (e.g., a $50 main item + $15 accessories).
|
|
62
|
+
2. **Price range suitability**: Wide price ranges (large gap between min_price and max_price) suggest tiered bundles. Narrow ranges suggest quantity-based bundles.
|
|
63
|
+
3. **High-margin categories**: Categories with above-average profit margin are better candidates because the discount erodes less absolute profit.
|
|
64
|
+
4. **Popular + discoverable**: Pair best-selling products (high ordersCount) with lower-visibility products to drive discovery.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 3: Set minimum item quantity
|
|
69
|
+
|
|
70
|
+
Determine the `minItemQuantity` based on catalog characteristics:
|
|
71
|
+
|
|
72
|
+
| Catalog Profile | Recommended minItemQuantity | Rationale |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| High-price items (avg price > price_p75) | 2 | Customers are less likely to buy 3+ expensive items |
|
|
75
|
+
| Medium-price items | 2-3 | Standard bundle size |
|
|
76
|
+
| Low-price items (avg price < price_p25) | 3-4 | Lower price per item makes larger bundles feasible |
|
|
77
|
+
| Many items in category (count > 10) | 3 | More products to choose from |
|
|
78
|
+
| Few items in category (count <= 5) | 2 | Limited selection constrains bundle size |
|
|
79
|
+
|
|
80
|
+
Default to `minItemQuantity: 2` if data is ambiguous.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 4: Select discount percentage
|
|
85
|
+
|
|
86
|
+
Scale the discount to the average margin, rewarding multi-item purchases without eroding profitability:
|
|
87
|
+
|
|
88
|
+
| Margin Tier | Condition | Recommended Discount |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| Low margin | `avg_profit_margin < 25%` | 10% |
|
|
91
|
+
| Medium margin | `25% <= avg_profit_margin <= 50%` | 15% |
|
|
92
|
+
| High margin | `avg_profit_margin > 50%` | 20% |
|
|
93
|
+
| No data | Margin unavailable | 10% |
|
|
94
|
+
|
|
95
|
+
Verify that the discount respects the global cap of 25% and the minimum margin threshold of 15% (`discount <= avg_profit_margin - 15%`).
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Step 5: Determine discount scope
|
|
100
|
+
|
|
101
|
+
Select the scope based on bundling analysis:
|
|
102
|
+
|
|
103
|
+
- **CATEGORY** (preferred): When analytics show a clear category with cross-sell potential — multiple products, high margin, complementary items. Target that category.
|
|
104
|
+
- **ITEMS**: When specific complementary products are identified for bundling (max 5 productIds). Use when cross-sell pairs are specific rather than category-wide.
|
|
105
|
+
- **SITE**: When the goal is store-wide multi-buy incentive. Less targeted but simpler.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Step 6: Convert category names to GUIDs (if CATEGORY scope)
|
|
110
|
+
|
|
111
|
+
If scope is CATEGORY, call `getCategoryIds` to convert category names to GUIDs.
|
|
112
|
+
|
|
113
|
+
- Never use category names as scope IDs — always use the GUID.
|
|
114
|
+
- Exclude the "All Products" system category.
|
|
115
|
+
- Max 3 categoryIds per discount rule.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Step 7: Run guardrail checks
|
|
120
|
+
|
|
121
|
+
**Run the Guardrail: Discount Conflicts checks before creating the rule.**
|
|
122
|
+
|
|
123
|
+
1. Query existing active discount rules:
|
|
124
|
+
|
|
125
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/discount-rules/query`
|
|
126
|
+
|
|
127
|
+
**Request**:
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"query": {
|
|
131
|
+
"filter": {
|
|
132
|
+
"active": true
|
|
133
|
+
},
|
|
134
|
+
"paging": {
|
|
135
|
+
"limit": 100
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
2. Check for scope overlap with existing rules. Bundle discounts are especially prone to stacking — a customer buying 3 items in a category with both a bundle discount and a catalog-wide sale would get both.
|
|
142
|
+
3. Check for coupon stacking risks.
|
|
143
|
+
4. If conflicts found, present to merchant and get confirmation.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Step 8: Create the discount rule with minItemQuantity condition
|
|
148
|
+
|
|
149
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/discount-rules`
|
|
150
|
+
|
|
151
|
+
**Request** — Buy 2+ items from a category, get 15% off:
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"discountRule": {
|
|
155
|
+
"name": "Buy 2+, Save 15% on Accessories",
|
|
156
|
+
"active": true,
|
|
157
|
+
"discounts": [
|
|
158
|
+
{
|
|
159
|
+
"discount": {
|
|
160
|
+
"discountType": "PERCENTAGE",
|
|
161
|
+
"percentage": 15
|
|
162
|
+
},
|
|
163
|
+
"scope": {
|
|
164
|
+
"id": "accessories-category-guid",
|
|
165
|
+
"type": "COLLECTION"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"conditions": {
|
|
170
|
+
"itemQuantityRange": {
|
|
171
|
+
"from": 2
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Response**:
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"discountRule": {
|
|
182
|
+
"id": "d4e5f6a7-b8c9-0123-def0-234567890123",
|
|
183
|
+
"revision": "1",
|
|
184
|
+
"name": "Buy 2+, Save 15% on Accessories",
|
|
185
|
+
"active": true,
|
|
186
|
+
"discounts": [
|
|
187
|
+
{
|
|
188
|
+
"discount": {
|
|
189
|
+
"discountType": "PERCENTAGE",
|
|
190
|
+
"percentage": 15
|
|
191
|
+
},
|
|
192
|
+
"scope": {
|
|
193
|
+
"id": "accessories-category-guid",
|
|
194
|
+
"type": "COLLECTION"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"conditions": {
|
|
199
|
+
"itemQuantityRange": {
|
|
200
|
+
"from": 2
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Request** — Buy 3+ specific items, get 10% off:
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"discountRule": {
|
|
211
|
+
"name": "Bundle 3 Best Sellers, Save 10%",
|
|
212
|
+
"active": true,
|
|
213
|
+
"discounts": [
|
|
214
|
+
{
|
|
215
|
+
"discount": {
|
|
216
|
+
"discountType": "PERCENTAGE",
|
|
217
|
+
"percentage": 10
|
|
218
|
+
},
|
|
219
|
+
"scope": {
|
|
220
|
+
"id": "product-uuid-1",
|
|
221
|
+
"type": "SPECIFIC_PRODUCTS"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"discount": {
|
|
226
|
+
"discountType": "PERCENTAGE",
|
|
227
|
+
"percentage": 10
|
|
228
|
+
},
|
|
229
|
+
"scope": {
|
|
230
|
+
"id": "product-uuid-2",
|
|
231
|
+
"type": "SPECIFIC_PRODUCTS"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"discount": {
|
|
236
|
+
"discountType": "PERCENTAGE",
|
|
237
|
+
"percentage": 10
|
|
238
|
+
},
|
|
239
|
+
"scope": {
|
|
240
|
+
"id": "product-uuid-3",
|
|
241
|
+
"type": "SPECIFIC_PRODUCTS"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"conditions": {
|
|
246
|
+
"itemQuantityRange": {
|
|
247
|
+
"from": 3
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Save the returned `id` and `revision` for later management.
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Step 9: Verify the rule is active
|
|
259
|
+
|
|
260
|
+
1. Query discount rules to confirm the new rule exists and is `active: true`
|
|
261
|
+
2. Verify the minItemQuantity condition is correctly set
|
|
262
|
+
3. Report to the merchant:
|
|
263
|
+
> "Bundle discount is live: {discount}% off when buying {minItemQuantity}+ items from {scope description}. This encourages customers to explore more products and increases items per order."
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Branching logic
|
|
268
|
+
|
|
269
|
+
| Merchant intent | Scope | minItemQuantity | Discount |
|
|
270
|
+
|---|---|---|---|
|
|
271
|
+
| "Encourage people to buy more" | Determined by analytics | 2-3 | Margin-tiered |
|
|
272
|
+
| "Bundle accessories together" | COLLECTION with category GUID | 2 | Margin-tiered |
|
|
273
|
+
| "Buy 3 get 20% off these products" (explicit) | SPECIFIC_PRODUCTS with product GUIDs | 3 (user override) | 20% (user override) |
|
|
274
|
+
| "Multi-buy deal on everything" | CATALOG (site-wide) | 2 | Margin-tiered |
|
|
275
|
+
| "Promote these 4 items as a set" | SPECIFIC_PRODUCTS (max 5) | 2-4 | Margin-tiered |
|
|
276
|
+
|
|
277
|
+
## Error Handling
|
|
278
|
+
|
|
279
|
+
| Error | Cause | Fix |
|
|
280
|
+
|---|---|---|
|
|
281
|
+
| `DISCOUNT_RULE_NOT_FOUND` | Rule ID doesn't exist | Re-query discount rules for current IDs |
|
|
282
|
+
| `REVISION_MISMATCH` | Revision doesn't match | Re-fetch rule for latest revision, then retry |
|
|
283
|
+
| Too few products in category | Category has only 1 product — bundling not viable | Switch to SITE scope or suggest a different category |
|
|
284
|
+
| Margin data unavailable | No profit margin data in catalog | Default to 10% discount |
|
|
285
|
+
| Category GUID not found | Category name doesn't match any collection | Re-query categories or fall back to SITE scope |
|
|
286
|
+
| Max items exceeded | More than 5 productIds specified | Reduce to top 5 by ordersCount or switch to CATEGORY scope |
|
|
287
|
+
|
|
288
|
+
## References
|
|
289
|
+
|
|
290
|
+
- [Discount Rules API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/introduction)
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Flow: Fix Coverage Gaps"
|
|
3
|
+
description: Detects active delivery regions with zero shipping options and creates standard shipping for them. Cross-references delivery profiles with shipping options to find regions where customers cannot complete checkout.
|
|
4
|
+
layer: flow
|
|
5
|
+
references:
|
|
6
|
+
- name: "Guardrail: Shipping Health"
|
|
7
|
+
path: ecommerce/guardrail-shipping-health.md
|
|
8
|
+
load: true
|
|
9
|
+
- name: "Setup: Shipping Regions"
|
|
10
|
+
path: ecommerce/setup-shipping-regions.md
|
|
11
|
+
load: true
|
|
12
|
+
---
|
|
13
|
+
# Flow: Fix Shipping Coverage Gaps
|
|
14
|
+
|
|
15
|
+
> **Before executing this skill**, read these referenced skills with `ReadFullDocsArticle`:
|
|
16
|
+
> - [Guardrail: Shipping Health](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/guardrail-shipping-health)
|
|
17
|
+
> - [Setup: Shipping Regions](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/setup-shipping-regions)
|
|
18
|
+
|
|
19
|
+
Detects delivery regions where customers cannot see any shipping options at checkout and creates standard shipping to fill the gaps. A coverage gap is a HIGH priority blocking issue -- customers in affected destinations literally cannot complete a purchase.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- Wix Stores (or another eCommerce business solution) installed on the site
|
|
24
|
+
- Site metrics available for AOV-based rate calculation (effective_aov)
|
|
25
|
+
- Delivery profiles configured with at least one region
|
|
26
|
+
|
|
27
|
+
## Required APIs
|
|
28
|
+
|
|
29
|
+
- [Query Delivery Profiles](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/query-delivery-profiles)
|
|
30
|
+
- [Query Shipping Options](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/shipping-options/query-shipping-options)
|
|
31
|
+
- [Create Shipping Option](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/shipping-options/create-shipping-option)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 1: Query all delivery profiles
|
|
36
|
+
|
|
37
|
+
Retrieve all delivery profiles to build a complete map of regions and their carriers.
|
|
38
|
+
|
|
39
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/delivery-profiles/query`
|
|
40
|
+
|
|
41
|
+
**Request**:
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"query": {
|
|
45
|
+
"cursorPaging": {
|
|
46
|
+
"limit": 100
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Response**:
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"deliveryProfiles": [
|
|
56
|
+
{
|
|
57
|
+
"id": "6a9b2f9b-533a-4d0d-ac8d-64ec3f32fcbd",
|
|
58
|
+
"name": "General profile",
|
|
59
|
+
"default": true,
|
|
60
|
+
"deliveryRegions": [
|
|
61
|
+
{
|
|
62
|
+
"id": "42b0ed3b-fc54-4ac0-89cf-5d2d17ec441c",
|
|
63
|
+
"name": "Domestic",
|
|
64
|
+
"active": true,
|
|
65
|
+
"deliveryCarriers": [
|
|
66
|
+
{
|
|
67
|
+
"appId": "45c44b27-ca7b-4891-8c0d-1747d588b835",
|
|
68
|
+
"additionalCharges": []
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"destinations": [
|
|
72
|
+
{
|
|
73
|
+
"countryCode": "GB",
|
|
74
|
+
"subdivisions": []
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "a1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
80
|
+
"name": "International",
|
|
81
|
+
"active": true,
|
|
82
|
+
"deliveryCarriers": [
|
|
83
|
+
{
|
|
84
|
+
"appId": "45c44b27-ca7b-4891-8c0d-1747d588b835",
|
|
85
|
+
"additionalCharges": []
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"destinations": []
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"revision": "43",
|
|
92
|
+
"createdDate": "2025-10-26T11:05:10.774Z",
|
|
93
|
+
"updatedDate": "2026-04-14T14:43:25.397Z"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"pagingMetadata": {
|
|
97
|
+
"count": 1,
|
|
98
|
+
"cursors": {},
|
|
99
|
+
"hasNext": false
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Save every region `id`, `name`, `active` status, and carrier `appId` values.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Step 2: Query all shipping options
|
|
109
|
+
|
|
110
|
+
Retrieve all shipping options to determine which regions already have coverage.
|
|
111
|
+
|
|
112
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/shipping-options/query`
|
|
113
|
+
|
|
114
|
+
**Request**:
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"query": {
|
|
118
|
+
"cursorPaging": {
|
|
119
|
+
"limit": 100
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Response**:
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"shippingOptions": [
|
|
129
|
+
{
|
|
130
|
+
"id": "c0e5be8f-5266-4720-a732-5f571e4750db",
|
|
131
|
+
"revision": "1",
|
|
132
|
+
"createdDate": "2026-04-14T14:43:24.804Z",
|
|
133
|
+
"updatedDate": "2026-04-14T14:43:24.804Z",
|
|
134
|
+
"deliveryRegionId": "42b0ed3b-fc54-4ac0-89cf-5d2d17ec441c",
|
|
135
|
+
"deliveryRegionIds": [],
|
|
136
|
+
"title": "Standard Shipping",
|
|
137
|
+
"estimatedDeliveryTime": "5-7 business days",
|
|
138
|
+
"rates": [
|
|
139
|
+
{
|
|
140
|
+
"amount": "15.00",
|
|
141
|
+
"conditions": [],
|
|
142
|
+
"multiplyByQuantity": false
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"pagingMetadata": {
|
|
148
|
+
"count": 1,
|
|
149
|
+
"cursors": {},
|
|
150
|
+
"hasNext": false
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Build a map of `deliveryRegionId` to the count of shipping options linked to it.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Step 3: Cross-reference regions and options to find gaps
|
|
160
|
+
|
|
161
|
+
For each `deliveryRegion` across all profiles, apply these checks in order:
|
|
162
|
+
|
|
163
|
+
### 3a: Skip externally managed regions
|
|
164
|
+
|
|
165
|
+
If ALL carriers in the region have an external appId (e.g., Shippo `appId: "2b1943e2-3fc2-47bc-be56-3d402e5966d7"`), skip the region entirely. External carriers manage their own rates.
|
|
166
|
+
|
|
167
|
+
### 3b: Skip inactive regions
|
|
168
|
+
|
|
169
|
+
If `active=false`, skip. Inactive regions are not shown at checkout regardless of shipping options.
|
|
170
|
+
|
|
171
|
+
### 3c: Count linked shipping options
|
|
172
|
+
|
|
173
|
+
Count how many shipping options have this region's `id` in their `deliveryRegionId` field. If the count is **zero**, this is a **coverage gap**.
|
|
174
|
+
|
|
175
|
+
**Severity**: HIGH -- blocking. Customers shipping to this region's destinations cannot see any shipping options and cannot complete checkout.
|
|
176
|
+
|
|
177
|
+
### 3d: Check for options linked only to inactive regions
|
|
178
|
+
|
|
179
|
+
For each shipping option, check if ALL of its linked regions have `active=false`. If so, the option exists but is invisible at checkout. This is a configuration issue worth flagging.
|
|
180
|
+
|
|
181
|
+
### 3e: Check for orphaned options
|
|
182
|
+
|
|
183
|
+
For each shipping option, verify that its `deliveryRegionId` actually exists in one of the delivery profiles. If the region no longer exists, the option is orphaned -- it exists in the system but is never shown to customers.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Step 4: Create shipping options for each gap
|
|
188
|
+
|
|
189
|
+
For each region identified as having zero coverage, create a standard shipping option and a free shipping tier.
|
|
190
|
+
|
|
191
|
+
### 4a: Calculate rates
|
|
192
|
+
|
|
193
|
+
- **Standard rate**: 5-10% of `effective_aov` (e.g., if effective_aov is $60, rate is $3.00-$6.00)
|
|
194
|
+
- **Free shipping threshold**: `effective_aov x 1.2` (e.g., if effective_aov is $60, threshold is $72)
|
|
195
|
+
- **Always set `estimatedDeliveryTime`** -- never leave it empty. Use "5-7 business days" for domestic, "7-14 business days" for international.
|
|
196
|
+
|
|
197
|
+
### 4b: Create standard shipping option
|
|
198
|
+
|
|
199
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/shipping-options`
|
|
200
|
+
|
|
201
|
+
**Request**:
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"shippingOption": {
|
|
205
|
+
"title": "Standard Shipping",
|
|
206
|
+
"estimatedDeliveryTime": "5-7 business days",
|
|
207
|
+
"deliveryRegionId": "a1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
208
|
+
"rates": [
|
|
209
|
+
{
|
|
210
|
+
"amount": "4.99",
|
|
211
|
+
"multiplyByQuantity": false,
|
|
212
|
+
"conditions": []
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Response**:
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"shippingOption": {
|
|
223
|
+
"id": "b2c3d4e5-f6a7-8901-cdef-234567890abc",
|
|
224
|
+
"revision": "1",
|
|
225
|
+
"createdDate": "2026-04-15T13:14:01.214Z",
|
|
226
|
+
"updatedDate": "2026-04-15T13:14:01.214Z",
|
|
227
|
+
"deliveryRegionId": "a1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
228
|
+
"deliveryRegionIds": [],
|
|
229
|
+
"title": "Standard Shipping",
|
|
230
|
+
"estimatedDeliveryTime": "5-7 business days",
|
|
231
|
+
"rates": [
|
|
232
|
+
{
|
|
233
|
+
"amount": "4.99",
|
|
234
|
+
"conditions": [],
|
|
235
|
+
"multiplyByQuantity": false
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### 4c: Create free shipping option with threshold
|
|
243
|
+
|
|
244
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/shipping-options`
|
|
245
|
+
|
|
246
|
+
**Request**:
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"shippingOption": {
|
|
250
|
+
"title": "Free Shipping",
|
|
251
|
+
"estimatedDeliveryTime": "5-7 business days",
|
|
252
|
+
"deliveryRegionId": "a1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
253
|
+
"rates": [
|
|
254
|
+
{
|
|
255
|
+
"amount": "0",
|
|
256
|
+
"multiplyByQuantity": false,
|
|
257
|
+
"conditions": [
|
|
258
|
+
{
|
|
259
|
+
"type": "BY_TOTAL_PRICE",
|
|
260
|
+
"operator": "GTE",
|
|
261
|
+
"value": "72"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Step 5: Verify the fix
|
|
273
|
+
|
|
274
|
+
After creating options for all gaps, re-query shipping options to confirm:
|
|
275
|
+
|
|
276
|
+
1. New options appear in the list with correct titles and rates
|
|
277
|
+
2. Each new option is linked to the correct `deliveryRegionId`
|
|
278
|
+
3. The `estimatedDeliveryTime` is populated (not empty)
|
|
279
|
+
4. No regions remain uncovered
|
|
280
|
+
|
|
281
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/shipping-options/query`
|
|
282
|
+
|
|
283
|
+
Use the same request from Step 2 and verify the count now covers all active, non-external regions.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Error Handling
|
|
288
|
+
|
|
289
|
+
| Error | Cause | Fix |
|
|
290
|
+
|---|---|---|
|
|
291
|
+
| `deliveryRegionId is not a valid GUID` | Used `deliveryRegionIds` (plural) instead of `deliveryRegionId` (singular) in create request | Use the singular `deliveryRegionId` field |
|
|
292
|
+
| `SHIPPING_OPTION_NOT_FOUND` | The shipping option ID doesn't exist | Re-query shipping options to get current IDs |
|
|
293
|
+
| `REVISION_MISMATCH` | The `revision` doesn't match the current version | Re-fetch the option to get the latest revision, then retry |
|
|
294
|
+
| Region appears covered but customers still can't check out | Region has `active=false` | Check region active status in the delivery profile; activate the region if intended |
|
|
295
|
+
| Option exists but not visible at checkout | Option linked to an inactive or deleted region | Verify region exists and `active=true` in the delivery profile |
|
|
296
|
+
|
|
297
|
+
## References
|
|
298
|
+
|
|
299
|
+
- [Delivery Profiles API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/introduction)
|
|
300
|
+
- [Shipping Options API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/shipping-options/introduction)
|