@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,444 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Setup: Discount Rules"
|
|
3
|
+
description: Configures automatic discount rules using the eCommerce Discount Rules API. Covers percentage and fixed-amount discounts, scope targeting (catalog-wide, specific collections, or individual products), and scheduling active periods.
|
|
4
|
+
layer: config
|
|
5
|
+
---
|
|
6
|
+
# Setup Discount Rules
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
- Wix Stores (or another eCommerce business solution) installed on the site
|
|
11
|
+
- At least one product in the catalog
|
|
12
|
+
|
|
13
|
+
## Required APIs
|
|
14
|
+
|
|
15
|
+
- [Create Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/create-discount-rule)
|
|
16
|
+
- [Get Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/get-discount-rule)
|
|
17
|
+
- [Query Discount Rules](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/query-discount-rules)
|
|
18
|
+
- [Update Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/update-discount-rule)
|
|
19
|
+
- [Delete Discount Rule](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/delete-discount-rule)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 1: Query existing discount rules
|
|
24
|
+
|
|
25
|
+
Before creating new rules, check what already exists to avoid conflicts.
|
|
26
|
+
|
|
27
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/discount-rules/query`
|
|
28
|
+
|
|
29
|
+
**Request**:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"query": {
|
|
33
|
+
"paging": {
|
|
34
|
+
"limit": 100
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Response**:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"discountRules": [
|
|
44
|
+
{
|
|
45
|
+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
46
|
+
"revision": "1",
|
|
47
|
+
"name": "Summer Sale 10%",
|
|
48
|
+
"active": true,
|
|
49
|
+
"activeTimeInfo": {
|
|
50
|
+
"start": "2026-06-01T00:00:00.000Z",
|
|
51
|
+
"end": "2026-08-31T23:59:59.000Z"
|
|
52
|
+
},
|
|
53
|
+
"discounts": [
|
|
54
|
+
{
|
|
55
|
+
"discount": {
|
|
56
|
+
"discountType": "PERCENTAGE",
|
|
57
|
+
"percentage": 10
|
|
58
|
+
},
|
|
59
|
+
"scope": {
|
|
60
|
+
"id": "catalog",
|
|
61
|
+
"type": "CATALOG"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"pagingMetadata": {
|
|
68
|
+
"count": 1,
|
|
69
|
+
"hasNext": false
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Note existing rules and their scopes to avoid stacking conflicts.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Step 2: Create a percentage discount rule
|
|
79
|
+
|
|
80
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v1/discount-rules`
|
|
81
|
+
|
|
82
|
+
**Request** — 20% off all products:
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"discountRule": {
|
|
86
|
+
"name": "Flash Sale 20% Off",
|
|
87
|
+
"active": true,
|
|
88
|
+
"activeTimeInfo": {
|
|
89
|
+
"start": "2026-05-01T00:00:00.000Z",
|
|
90
|
+
"end": "2026-05-03T23:59:59.000Z"
|
|
91
|
+
},
|
|
92
|
+
"discounts": [
|
|
93
|
+
{
|
|
94
|
+
"discount": {
|
|
95
|
+
"discountType": "PERCENTAGE",
|
|
96
|
+
"percentage": 20
|
|
97
|
+
},
|
|
98
|
+
"scope": {
|
|
99
|
+
"id": "catalog",
|
|
100
|
+
"type": "CATALOG"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Response**:
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"discountRule": {
|
|
112
|
+
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
113
|
+
"revision": "1",
|
|
114
|
+
"name": "Flash Sale 20% Off",
|
|
115
|
+
"active": true,
|
|
116
|
+
"activeTimeInfo": {
|
|
117
|
+
"start": "2026-05-01T00:00:00.000Z",
|
|
118
|
+
"end": "2026-05-03T23:59:59.000Z"
|
|
119
|
+
},
|
|
120
|
+
"discounts": [
|
|
121
|
+
{
|
|
122
|
+
"discount": {
|
|
123
|
+
"discountType": "PERCENTAGE",
|
|
124
|
+
"percentage": 20
|
|
125
|
+
},
|
|
126
|
+
"scope": {
|
|
127
|
+
"id": "catalog",
|
|
128
|
+
"type": "CATALOG"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Request** — 15% off a specific collection:
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"discountRule": {
|
|
140
|
+
"name": "Summer Collection Sale",
|
|
141
|
+
"active": true,
|
|
142
|
+
"discounts": [
|
|
143
|
+
{
|
|
144
|
+
"discount": {
|
|
145
|
+
"discountType": "PERCENTAGE",
|
|
146
|
+
"percentage": 15
|
|
147
|
+
},
|
|
148
|
+
"scope": {
|
|
149
|
+
"id": "collection-uuid-here",
|
|
150
|
+
"type": "COLLECTION"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Step 3: Create a fixed-amount discount rule
|
|
161
|
+
|
|
162
|
+
**Request** — $5 off specific products:
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"discountRule": {
|
|
166
|
+
"name": "$5 Off Selected Items",
|
|
167
|
+
"active": true,
|
|
168
|
+
"discounts": [
|
|
169
|
+
{
|
|
170
|
+
"discount": {
|
|
171
|
+
"discountType": "FIXED_AMOUNT",
|
|
172
|
+
"fixedAmount": "5.00"
|
|
173
|
+
},
|
|
174
|
+
"scope": {
|
|
175
|
+
"id": "product-uuid-here",
|
|
176
|
+
"type": "SPECIFIC_PRODUCTS"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Step 4: Update a discount rule
|
|
187
|
+
|
|
188
|
+
**Endpoint**: `PATCH https://www.wixapis.com/ecom/v1/discount-rules/{discountRuleId}`
|
|
189
|
+
|
|
190
|
+
**Request**:
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"discountRule": {
|
|
194
|
+
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
195
|
+
"revision": "1",
|
|
196
|
+
"name": "Extended Flash Sale 25% Off",
|
|
197
|
+
"discounts": [
|
|
198
|
+
{
|
|
199
|
+
"discount": {
|
|
200
|
+
"discountType": "PERCENTAGE",
|
|
201
|
+
"percentage": 25
|
|
202
|
+
},
|
|
203
|
+
"scope": {
|
|
204
|
+
"id": "catalog",
|
|
205
|
+
"type": "CATALOG"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The `revision` field is required and must match the current revision.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Step 5: Deactivate or delete a discount rule
|
|
218
|
+
|
|
219
|
+
To deactivate without deleting:
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"discountRule": {
|
|
223
|
+
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
224
|
+
"revision": "2",
|
|
225
|
+
"active": false
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
To delete permanently:
|
|
231
|
+
|
|
232
|
+
**Endpoint**: `DELETE https://www.wixapis.com/ecom/v1/discount-rules/{discountRuleId}`
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Key field rules
|
|
237
|
+
|
|
238
|
+
| Field | Required | Notes |
|
|
239
|
+
|---|---|---|
|
|
240
|
+
| `name` | Yes | Internal name for the rule |
|
|
241
|
+
| `active` | Yes | Whether the rule is currently applied |
|
|
242
|
+
| `activeTimeInfo.start` | No | ISO 8601 start time. Omit for immediate activation |
|
|
243
|
+
| `activeTimeInfo.end` | No | ISO 8601 end time. Omit for no expiration |
|
|
244
|
+
| `discounts[].discount.discountType` | Yes | `PERCENTAGE` or `FIXED_AMOUNT` |
|
|
245
|
+
| `discounts[].discount.percentage` | If PERCENTAGE | Integer 1-100 |
|
|
246
|
+
| `discounts[].discount.fixedAmount` | If FIXED_AMOUNT | Decimal string (e.g., `"5.00"`) |
|
|
247
|
+
| `discounts[].scope.type` | Yes | `CATALOG`, `COLLECTION`, or `SPECIFIC_PRODUCTS` |
|
|
248
|
+
| `discounts[].scope.id` | Yes | `"catalog"` for CATALOG type, or the collection/product UUID |
|
|
249
|
+
|
|
250
|
+
## Scope types
|
|
251
|
+
|
|
252
|
+
| Scope Type | `scope.id` value | Description |
|
|
253
|
+
|---|---|---|
|
|
254
|
+
| `CATALOG` | `"catalog"` | Applies to all products in the store |
|
|
255
|
+
| `COLLECTION` | Collection UUID | Applies to all products in a specific collection |
|
|
256
|
+
| `SPECIFIC_PRODUCTS` | Product UUID | Applies to a single product (use multiple discount entries for multiple products) |
|
|
257
|
+
|
|
258
|
+
## Recommendation → API Mapping
|
|
259
|
+
|
|
260
|
+
When creating a discount rule from a recommendation output, use this mapping to convert the recommendation's simplified JSON into the actual Discount Rules API payload.
|
|
261
|
+
|
|
262
|
+
### Constants
|
|
263
|
+
|
|
264
|
+
- **Store catalog app ID**: `215238eb-22a5-4c36-9e7b-e7c08025e04e` — used in all scope constructions below.
|
|
265
|
+
- **Initial state**: Recommendations create rules as `active: false` with `status: "PENDING"`. The merchant must approve before the rule goes live.
|
|
266
|
+
|
|
267
|
+
### Scope mapping
|
|
268
|
+
|
|
269
|
+
The recommendation's `scope` field maps to the API's internal scope structure. The scope ID uses a prefix convention:
|
|
270
|
+
|
|
271
|
+
| Recommendation scope | API scope type | Scope ID prefix | How to build |
|
|
272
|
+
|---|---|---|---|
|
|
273
|
+
| `SITE` | `CATALOG_ITEM` | `all_` | Set `catalogItemFilter.catalogAppId` to the store catalog app ID. No item IDs. |
|
|
274
|
+
| `ITEMS` | `CATALOG_ITEM` | `specific_` | Set `catalogItemFilter.catalogAppId` + `catalogItemFilter.catalogItemIds` to the product UUIDs from `productIds`. |
|
|
275
|
+
| `CATEGORY` | `CUSTOM_FILTER` | `collections_` | Set `customFilter.appId` to the store catalog app ID + `customFilter.params.collectionIds` to the category UUIDs from `categoryIds`. |
|
|
276
|
+
|
|
277
|
+
**Example — SITE scope**:
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"scope": {
|
|
281
|
+
"id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
282
|
+
"type": "CATALOG_ITEM",
|
|
283
|
+
"catalogItemFilter": {
|
|
284
|
+
"catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Example — ITEMS scope** (with product IDs):
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"scope": {
|
|
294
|
+
"id": "specific_215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
295
|
+
"type": "CATALOG_ITEM",
|
|
296
|
+
"catalogItemFilter": {
|
|
297
|
+
"catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
298
|
+
"catalogItemIds": ["product-uuid-1", "product-uuid-2"]
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Example — CATEGORY scope** (with collection IDs):
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"scope": {
|
|
308
|
+
"id": "collections_215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
309
|
+
"type": "CUSTOM_FILTER",
|
|
310
|
+
"customFilter": {
|
|
311
|
+
"appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
312
|
+
"params": {
|
|
313
|
+
"collectionIds": ["collection-uuid-1"]
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Discount type mapping
|
|
321
|
+
|
|
322
|
+
| Recommendation `discountType` | API field to set | Value format |
|
|
323
|
+
|---|---|---|
|
|
324
|
+
| `PERCENTAGE` | `discount.percentage` | Integer (e.g., `15`) |
|
|
325
|
+
| `FIXED_AMOUNT` | `discount.fixedAmount` | String (e.g., `"5.00"`) |
|
|
326
|
+
| `FIXED_PRICE` | `discount.fixedPrice` | String (e.g., `"29.99"`) |
|
|
327
|
+
|
|
328
|
+
All discount entries use `targetType: "SPECIFIC_ITEMS"` with the scope wrapped in `specificItemsInfo.scopes[]`.
|
|
329
|
+
|
|
330
|
+
### Trigger mapping (conditions)
|
|
331
|
+
|
|
332
|
+
Triggers determine WHEN the discount activates. They are built from the recommendation's `conditions` fields. **If no conditions exist (both minSubTotal and minItemQuantity are 0), do NOT set a trigger — the discount applies unconditionally.**
|
|
333
|
+
|
|
334
|
+
| Condition | Trigger type | How to build |
|
|
335
|
+
|---|---|---|
|
|
336
|
+
| `minItemQuantity > 0` only | `ITEM_QUANTITY_RANGE` | Set `itemQuantityRange.from` to the value. No upper bound. Include the same scope as the discount target. |
|
|
337
|
+
| `minSubTotal > 0` only | `SUBTOTAL_RANGE` | Set `subtotalRange.from` to the value as a string. No upper bound. Include the same scope. |
|
|
338
|
+
| Both conditions > 0 | `AND` | Combine both triggers in `and.triggers[]` array. |
|
|
339
|
+
| Neither condition | No trigger | Leave trigger field unset entirely. |
|
|
340
|
+
|
|
341
|
+
**Example — minSubTotal trigger** (upsell boost: spend $200+):
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"trigger": {
|
|
345
|
+
"triggerType": "SUBTOTAL_RANGE",
|
|
346
|
+
"subtotalRange": {
|
|
347
|
+
"from": "200",
|
|
348
|
+
"scopes": [
|
|
349
|
+
{
|
|
350
|
+
"id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
351
|
+
"type": "CATALOG_ITEM",
|
|
352
|
+
"catalogItemFilter": {
|
|
353
|
+
"catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Example — minItemQuantity trigger** (bundle: buy 3+):
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"trigger": {
|
|
366
|
+
"triggerType": "ITEM_QUANTITY_RANGE",
|
|
367
|
+
"itemQuantityRange": {
|
|
368
|
+
"from": 3,
|
|
369
|
+
"scopes": [
|
|
370
|
+
{
|
|
371
|
+
"id": "collections_215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
372
|
+
"type": "CUSTOM_FILTER",
|
|
373
|
+
"customFilter": {
|
|
374
|
+
"appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
375
|
+
"params": {
|
|
376
|
+
"collectionIds": ["category-uuid"]
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Example — AND trigger** (both conditions):
|
|
387
|
+
```json
|
|
388
|
+
{
|
|
389
|
+
"trigger": {
|
|
390
|
+
"triggerType": "AND",
|
|
391
|
+
"and": {
|
|
392
|
+
"triggers": [
|
|
393
|
+
{
|
|
394
|
+
"triggerType": "ITEM_QUANTITY_RANGE",
|
|
395
|
+
"itemQuantityRange": { "from": 2, "scopes": [/* same scope */] }
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"triggerType": "SUBTOTAL_RANGE",
|
|
399
|
+
"subtotalRange": { "from": "100", "scopes": [/* same scope */] }
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Date handling
|
|
408
|
+
|
|
409
|
+
| Recommendation field | API mapping |
|
|
410
|
+
|---|---|
|
|
411
|
+
| `startDate` is a date string (e.g., `"2026-06-01"`) | Convert to ISO 8601 timestamp: `activeTimeInfo.start` |
|
|
412
|
+
| `startDate` is empty `""` | Default to current time (now) |
|
|
413
|
+
| `endDate` is a date string | Convert to ISO 8601 timestamp: `activeTimeInfo.end` |
|
|
414
|
+
| `endDate` is empty `""` | Omit `activeTimeInfo.end` — rule has no expiration |
|
|
415
|
+
|
|
416
|
+
### Settings
|
|
417
|
+
|
|
418
|
+
All recommendation-created rules use these fixed settings:
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"settings": {
|
|
422
|
+
"appliesTo": "ALL_ITEMS",
|
|
423
|
+
"indexOptIn": true
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Error Handling
|
|
431
|
+
|
|
432
|
+
| Error | Cause | Fix |
|
|
433
|
+
|---|---|---|
|
|
434
|
+
| `DISCOUNT_RULE_NOT_FOUND` | The discount rule ID doesn't exist | Re-query discount rules to get current IDs |
|
|
435
|
+
| `REVISION_MISMATCH` | The `revision` doesn't match the current version | Re-fetch the rule to get the latest revision, then retry |
|
|
436
|
+
| `INVALID_DISCOUNT_TYPE` | Unsupported discount type | Use `PERCENTAGE` or `FIXED_AMOUNT` |
|
|
437
|
+
| Both `productIds` and `categoryIds` set | Scope mutual exclusivity violation | Use only one: ITEMS with productIds OR CATEGORY with categoryIds |
|
|
438
|
+
| `productIds` empty when scope is ITEMS | Missing required IDs | Query products and provide at least 1 product UUID |
|
|
439
|
+
| `categoryIds` empty when scope is CATEGORY | Missing required IDs | Call getCategoryIds to convert category names to GUIDs |
|
|
440
|
+
|
|
441
|
+
## References
|
|
442
|
+
|
|
443
|
+
- [Discount Rules API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/introduction)
|
|
444
|
+
- [Coupons API](https://dev.wix.com/docs/api-reference/business-solutions/coupons/introduction)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Setup: Shipping Rates"
|
|
3
|
+
description: Configures shipping option rates — rate types (flat, tiered, free), condition types and operators, free shipping threshold calibration, AOV sanity check, per-item penalty avoidance, and tier gap detection.
|
|
4
|
+
layer: config
|
|
5
|
+
---
|
|
6
|
+
# Shipping Rates
|
|
7
|
+
|
|
8
|
+
## AOV Sanity Check
|
|
9
|
+
|
|
10
|
+
**MANDATORY before any threshold calculation that references AOV.** Raw AOV can be misleading due to data issues or bulk purchases.
|
|
11
|
+
|
|
12
|
+
1. Extract `price_p25` and `price_p50` from `catalog_stats` (use the "All Products" category group).
|
|
13
|
+
|
|
14
|
+
2. Evaluate AOV against catalog price distribution:
|
|
15
|
+
|
|
16
|
+
| Condition | Interpretation | Action |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| AOV < price_p25 | Anomalous — likely a data or unit issue | Override: use `price_p50` as base. Note in reasoning. |
|
|
19
|
+
| AOV > price_p90 | Possible bulk/combo orders | Still use AOV but note discrepancy. |
|
|
20
|
+
| price_p25 <= AOV <= price_p90 | Reasonable | Use AOV as-is. |
|
|
21
|
+
|
|
22
|
+
3. Store the result as `effective_aov`. Use `effective_aov` everywhere AOV would be referenced — backup rate calibration, shipping thresholds, free shipping thresholds.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Rate Types
|
|
27
|
+
|
|
28
|
+
Rate types are determined by the conditions array, not by an explicit field.
|
|
29
|
+
|
|
30
|
+
| Rate Type | Configuration |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Flat rate | `conditions[]` empty, just `amount` |
|
|
33
|
+
| Free shipping | `amount = "0"` with optional `BY_TOTAL_PRICE GTE [threshold]` |
|
|
34
|
+
| Weight-based tiers | `BY_TOTAL_WEIGHT` conditions |
|
|
35
|
+
| Price-based tiers | `BY_TOTAL_PRICE` conditions |
|
|
36
|
+
| Quantity-based | `BY_TOTAL_QUANTITY` conditions |
|
|
37
|
+
|
|
38
|
+
## Condition Operators
|
|
39
|
+
|
|
40
|
+
Supported operators: `EQ`, `GT`, `GTE`, `LT`, `LTE`.
|
|
41
|
+
|
|
42
|
+
When multiple conditions appear in the same rate entry, they combine with AND logic.
|
|
43
|
+
|
|
44
|
+
## Free Shipping Threshold Calibration
|
|
45
|
+
|
|
46
|
+
Optimal range: `effective_aov x 1.0` to `effective_aov x 1.5`
|
|
47
|
+
|
|
48
|
+
| Scenario | Impact |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `threshold > AOV x 2` | Too high -- customers rarely qualify |
|
|
51
|
+
| `threshold < AOV x 0.8` | Too low -- potential margin erosion |
|
|
52
|
+
|
|
53
|
+
Enhanced calibration using catalog stats:
|
|
54
|
+
- If `price_p75 > aov x 1.5` then use `price_p50 x 1.5`
|
|
55
|
+
- If `price_p75 < aov` then use `aov x 1.2`
|
|
56
|
+
- Default: `max(aov x 1.2, price_p75)`
|
|
57
|
+
|
|
58
|
+
## Per-Item Penalty Avoidance
|
|
59
|
+
|
|
60
|
+
`multiplyByQuantity = true` charges `amount x cart quantity`. Always flag this configuration and recommend switching to flat rate or tiered pricing instead.
|
|
61
|
+
|
|
62
|
+
## Price-Based Tiers Recommendation
|
|
63
|
+
|
|
64
|
+
Recommend switching from flat to tiered rates when ALL of the following are true:
|
|
65
|
+
- `price_spread_ratio > 10`
|
|
66
|
+
- `price_stddev > price_avg x 0.5`
|
|
67
|
+
- Only flat rates currently exist
|
|
68
|
+
|
|
69
|
+
Recommended tier structure:
|
|
70
|
+
- **Tier 1**: Below p50 -- lower rate
|
|
71
|
+
- **Tier 2**: p50 to p75 -- standard rate
|
|
72
|
+
- **Tier 3**: Above p75 -- higher rate or free
|
|
73
|
+
|
|
74
|
+
## Flat Rate Confirmation
|
|
75
|
+
|
|
76
|
+
When ALL of the following are true, flat rate is optimal and no change is needed:
|
|
77
|
+
- `price_spread_ratio <= 3`
|
|
78
|
+
- `price_stddev < price_avg x 0.3`
|
|
79
|
+
|
|
80
|
+
## Tier Gap Detection
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
## Shipping Cost Sanity Check
|
|
85
|
+
|
|
86
|
+
Any rate `amount > AOV x 0.15` (15% of average order value) should be flagged as a cart abandonment risk.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Setup: Shipping Regions"
|
|
3
|
+
description: Configures delivery profiles and regions — creating profiles, adding regions with destinations, assigning carriers, enabling backup rates, and handling externally managed regions.
|
|
4
|
+
layer: config
|
|
5
|
+
---
|
|
6
|
+
# Shipping Regions
|
|
7
|
+
|
|
8
|
+
## Creating Delivery Profiles
|
|
9
|
+
|
|
10
|
+
- The first profile is auto-created when Stores is installed.
|
|
11
|
+
- Up to **99 profiles** per site.
|
|
12
|
+
|
|
13
|
+
## Adding Regions
|
|
14
|
+
|
|
15
|
+
- Up to **100 regions** per profile.
|
|
16
|
+
- Each region requires: `name`, `destinations` (array of country codes), `active` flag.
|
|
17
|
+
|
|
18
|
+
### Domestic Region
|
|
19
|
+
|
|
20
|
+
Set `countryCode` to match `site_context.country`.
|
|
21
|
+
|
|
22
|
+
### International Region
|
|
23
|
+
|
|
24
|
+
Use multiple country codes, or leave `destinations` empty to represent "Rest of World."
|
|
25
|
+
|
|
26
|
+
## Assigning Carriers
|
|
27
|
+
|
|
28
|
+
- Up to **25 carriers** per region.
|
|
29
|
+
- Use `appId` to identify the carrier.
|
|
30
|
+
|
|
31
|
+
## Enabling Backup Rates
|
|
32
|
+
|
|
33
|
+
CRITICAL -- set `backupRate.active = true` on each carrier. The backup rate amount should be **5-10% of effective AOV**.
|
|
34
|
+
|
|
35
|
+
Without a backup rate, if the carrier service fails the shipping option silently disappears from checkout.
|
|
36
|
+
|
|
37
|
+
## External Carrier Detection
|
|
38
|
+
|
|
39
|
+
- Shippo `appId`: `2b1943e2-3fc2-47bc-be56-3d402e5966d7`
|
|
40
|
+
- If **ALL** carriers in a region are external, skip that region -- it is externally managed.
|
|
41
|
+
- If the region has a mix of external and Wix-native carriers, treat it as hybrid and only configure the Wix-native carriers.
|
|
42
|
+
|
|
43
|
+
## Business Context Filter for International (MANDATORY)
|
|
44
|
+
|
|
45
|
+
Check the site's industry. If it matches any of the following categories, DO NOT recommend international shipping:
|
|
46
|
+
|
|
47
|
+
food, restaurant, grocery, bakery, catering, perishable, fresh, meat, produce, dairy, drink, beverage
|
|
48
|
+
|
|
49
|
+
Perishable goods require cold chain logistics that standard international shipping does not support.
|
|
50
|
+
|
|
51
|
+
## Identifying International Regions
|
|
52
|
+
|
|
53
|
+
A region is considered "international" if any of the following are true:
|
|
54
|
+
- Region name contains "international" or "internacional" (case-insensitive)
|
|
55
|
+
- `destinations[]` is empty (Rest of World)
|
|
56
|
+
- `destinations` include countries OTHER than the site country
|