@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.
Files changed (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/package.json +29 -0
  4. package/skills/wix-app/SKILL.md +344 -0
  5. package/skills/wix-app/references/APP_IDENTIFIERS.md +35 -0
  6. package/skills/wix-app/references/APP_MARKET_REVIEW.md +311 -0
  7. package/skills/wix-app/references/APP_VALIDATION.md +171 -0
  8. package/skills/wix-app/references/BACKEND_API.md +233 -0
  9. package/skills/wix-app/references/BACKEND_EVENT.md +116 -0
  10. package/skills/wix-app/references/CODE_QUALITY.md +33 -0
  11. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +587 -0
  12. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +157 -0
  13. package/skills/wix-app/references/DASHBOARD_MODAL.md +283 -0
  14. package/skills/wix-app/references/DASHBOARD_PAGE.md +403 -0
  15. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +205 -0
  16. package/skills/wix-app/references/DATA_COLLECTION.md +451 -0
  17. package/skills/wix-app/references/DOCUMENTATION.md +42 -0
  18. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +65 -0
  19. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +468 -0
  20. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +96 -0
  21. package/skills/wix-app/references/SERVICE_PLUGIN.md +235 -0
  22. package/skills/wix-app/references/SITE_PLUGIN.md +436 -0
  23. package/skills/wix-app/references/STORES_VERSIONING.md +334 -0
  24. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +84 -0
  25. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +345 -0
  26. package/skills/wix-app/references/dashboard-menu-plugin/blog-slots.md +71 -0
  27. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +58 -0
  28. package/skills/wix-app/references/dashboard-menu-plugin/crm-slots.md +8 -0
  29. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +17 -0
  30. package/skills/wix-app/references/dashboard-menu-plugin/events-slots.md +29 -0
  31. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +27 -0
  32. package/skills/wix-app/references/dashboard-menu-plugin/stores-slots.md +35 -0
  33. package/skills/wix-app/references/dashboard-page/API_SPEC.md +138 -0
  34. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +573 -0
  35. package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +269 -0
  36. package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +164 -0
  37. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +294 -0
  38. package/skills/wix-app/references/data-collection/WIX_DATA.md +270 -0
  39. package/skills/wix-app/references/data-collection/extension-template.ts +107 -0
  40. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +138 -0
  41. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +454 -0
  42. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +165 -0
  43. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +576 -0
  44. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +170 -0
  45. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +6 -0
  46. package/skills/wix-app/references/editor-react-component/PARTS.md +25 -0
  47. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +203 -0
  48. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +167 -0
  49. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +137 -0
  50. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +112 -0
  51. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +118 -0
  52. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +87 -0
  53. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +86 -0
  54. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +135 -0
  55. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +79 -0
  56. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +68 -0
  57. package/skills/wix-app/references/site-plugin/EXAMPLES.md +311 -0
  58. package/skills/wix-app/references/site-plugin/SLOTS.md +263 -0
  59. package/skills/wix-design-system/SKILL.md +129 -0
  60. package/skills/wix-design-system/references/file-structure.md +56 -0
  61. package/skills/wix-design-system/scripts/wds.cjs +531 -0
  62. package/skills/wix-headless/SKILL.md +418 -0
  63. package/skills/wix-headless/references/DISCOVERY.md +332 -0
  64. package/skills/wix-headless/references/ORCHESTRATION.md +269 -0
  65. package/skills/wix-headless/references/SETUP.md +154 -0
  66. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +152 -0
  67. package/skills/wix-headless/references/blog/BLOG_PAGES.md +299 -0
  68. package/skills/wix-headless/references/blog/BLOG_SETUP.md +218 -0
  69. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +32 -0
  70. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +373 -0
  71. package/skills/wix-headless/references/cms/FAQ_KNOWLEDGE_BASE.md +229 -0
  72. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +40 -0
  73. package/skills/wix-headless/references/cms/PORTFOLIO.md +454 -0
  74. package/skills/wix-headless/references/cms/RESOURCE_LIBRARY.md +356 -0
  75. package/skills/wix-headless/references/cms/TEAM_DIRECTORY.md +299 -0
  76. package/skills/wix-headless/references/commands/install-app.md +42 -0
  77. package/skills/wix-headless/references/commands/known-apps.json +5 -0
  78. package/skills/wix-headless/references/commands/mcp-bootstrap.md +28 -0
  79. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +828 -0
  80. package/skills/wix-headless/references/ecom/CART_PAGES.md +120 -0
  81. package/skills/wix-headless/references/ecom/CART_WIRING.md +103 -0
  82. package/skills/wix-headless/references/ecom/COMPONENTS_CSS.md +132 -0
  83. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +59 -0
  84. package/skills/wix-headless/references/forms/CONTACT_FORM.md +477 -0
  85. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +43 -0
  86. package/skills/wix-headless/references/gift-cards/COMPONENTS.md +119 -0
  87. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +51 -0
  88. package/skills/wix-headless/references/gift-cards/PAGES.md +129 -0
  89. package/skills/wix-headless/references/images/INSTRUCTIONS.md +359 -0
  90. package/skills/wix-headless/references/shared/BUILD_NOISE.md +8 -0
  91. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +185 -0
  92. package/skills/wix-headless/references/shared/IMPLEMENTER.md +155 -0
  93. package/skills/wix-headless/references/shared/MCP_PREFIX.md +105 -0
  94. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +97 -0
  95. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +423 -0
  96. package/skills/wix-headless/references/shared/STYLING.md +117 -0
  97. package/skills/wix-headless/references/stores/BACK_IN_STOCK.md +178 -0
  98. package/skills/wix-headless/references/stores/CATEGORY_PAGES.md +86 -0
  99. package/skills/wix-headless/references/stores/COMPONENTS_CSS.md +129 -0
  100. package/skills/wix-headless/references/stores/HOME_AND_NAV.md +227 -0
  101. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +96 -0
  102. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +249 -0
  103. package/skills/wix-headless/references/stores/PRODUCT_PAGES.md +213 -0
  104. package/skills/wix-headless/references/stores/SHARED_WIRING.md +164 -0
  105. package/skills/wix-headless/references/verticals/_schema.json +160 -0
  106. package/skills/wix-headless/references/verticals/_schema.md +185 -0
  107. package/skills/wix-headless/references/verticals/blog.md +125 -0
  108. package/skills/wix-headless/references/verticals/cms.md +121 -0
  109. package/skills/wix-headless/references/verticals/ecom.md +96 -0
  110. package/skills/wix-headless/references/verticals/forms.md +106 -0
  111. package/skills/wix-headless/references/verticals/gift-cards.md +121 -0
  112. package/skills/wix-headless/references/verticals/stores.md +167 -0
  113. package/skills/wix-headless/scripts/check-manifest.mjs +198 -0
  114. package/skills/wix-headless/scripts/copy-utility-templates.mjs +153 -0
  115. package/skills/wix-headless/scripts/emit-design-tokens.mjs +77 -0
  116. package/skills/wix-headless/scripts/finalize-run-json.mjs +141 -0
  117. package/skills/wix-headless/scripts/init-site-json.mjs +63 -0
  118. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +124 -0
  119. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +190 -0
  120. package/skills/wix-headless/scripts/preview.sh +45 -0
  121. package/skills/wix-headless/scripts/release.sh +73 -0
  122. package/skills/wix-headless/scripts/scaffold.sh +53 -0
  123. package/skills/wix-headless/scripts/seed-utilities.sh +55 -0
  124. package/skills/wix-headless/shared-utilities/analytics.ts +40 -0
  125. package/skills/wix-headless/shared-utilities/ricos.ts +179 -0
  126. package/skills/wix-headless/shared-utilities/wix-image.ts +72 -0
  127. package/skills/wix-headless/templates/ecom/CartBadge.tsx +84 -0
  128. package/skills/wix-headless/templates/ecom/CartView.tsx +543 -0
  129. package/skills/wix-headless/templates/ecom/cart.astro +13 -0
  130. package/skills/wix-headless/templates/ecom/components-ecom.css +215 -0
  131. package/skills/wix-headless/templates/ecom/discounts.ts +71 -0
  132. package/skills/wix-headless/templates/ecom/thank-you.astro +24 -0
  133. package/skills/wix-headless/templates/gift-cards/GiftCardPurchase.tsx +172 -0
  134. package/skills/wix-headless/templates/gift-cards/_home-teaser-snippet.astro +42 -0
  135. package/skills/wix-headless/templates/gift-cards/_nav-snippet.astro +11 -0
  136. package/skills/wix-headless/templates/gift-cards/components-gift-cards.css +219 -0
  137. package/skills/wix-headless/templates/gift-cards/gift-cards.astro +51 -0
  138. package/skills/wix-headless/templates/gift-cards/gift-cards.ts +75 -0
  139. package/skills/wix-headless/templates/stores/AddToCartButton.tsx +77 -0
  140. package/skills/wix-headless/templates/stores/BackInStockForm.tsx +176 -0
  141. package/skills/wix-headless/templates/stores/CategoryRail.astro +69 -0
  142. package/skills/wix-headless/templates/stores/ProductCard.astro +79 -0
  143. package/skills/wix-headless/templates/stores/ProductPurchase.tsx +397 -0
  144. package/skills/wix-headless/templates/stores/SeoTags.astro +21 -0
  145. package/skills/wix-headless/templates/stores/back-in-stock.ts +67 -0
  146. package/skills/wix-headless/templates/stores/categories.ts +155 -0
  147. package/skills/wix-headless/templates/stores/category/[slug].astro +130 -0
  148. package/skills/wix-headless/templates/stores/components-stores.css +295 -0
  149. package/skills/wix-headless/templates/stores/products/[slug].astro +128 -0
  150. package/skills/wix-headless/templates/stores/products/index.astro +101 -0
  151. package/skills/wix-manage/SKILL.md +280 -0
  152. package/skills/wix-manage/references/app-installation/install-wix-apps.md +155 -0
  153. package/skills/wix-manage/references/app-installation/list-installed-apps.md +124 -0
  154. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +226 -0
  155. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +95 -0
  156. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +416 -0
  157. package/skills/wix-manage/references/bookings/bookings-staff-setup.md +255 -0
  158. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +462 -0
  159. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +278 -0
  160. package/skills/wix-manage/references/bookings/external-calendar-integration.md +258 -0
  161. package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +231 -0
  162. package/skills/wix-manage/references/calendar/configure-default-business-hours.md +226 -0
  163. package/skills/wix-manage/references/cms/cms-data-items-crud.md +422 -0
  164. package/skills/wix-manage/references/cms/cms-data-operations-extended.md +263 -0
  165. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +136 -0
  166. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +160 -0
  167. package/skills/wix-manage/references/cms/cms-schema-management.md +143 -0
  168. package/skills/wix-manage/references/contacts/bulk-delete-contacts.md +73 -0
  169. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +67 -0
  170. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +434 -0
  171. package/skills/wix-manage/references/ecommerce/api-recommendation-tracking.md +420 -0
  172. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +267 -0
  173. package/skills/wix-manage/references/ecommerce/flow-bundle-and-save.md +290 -0
  174. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +300 -0
  175. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +364 -0
  176. package/skills/wix-manage/references/ecommerce/flow-seasonal-promotion.md +315 -0
  177. package/skills/wix-manage/references/ecommerce/flow-stock-mover.md +308 -0
  178. package/skills/wix-manage/references/ecommerce/flow-upsell-boost.md +271 -0
  179. package/skills/wix-manage/references/ecommerce/goal-clear-inventory.md +118 -0
  180. package/skills/wix-manage/references/ecommerce/goal-drive-cross-sells.md +122 -0
  181. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +132 -0
  182. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +148 -0
  183. package/skills/wix-manage/references/ecommerce/goal-seasonal-revenue.md +146 -0
  184. package/skills/wix-manage/references/ecommerce/guardrail-discount-conflicts.md +118 -0
  185. package/skills/wix-manage/references/ecommerce/guardrail-margin-protection.md +88 -0
  186. package/skills/wix-manage/references/ecommerce/guardrail-rate-pricing-sanity.md +108 -0
  187. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +124 -0
  188. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +299 -0
  189. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +582 -0
  190. package/skills/wix-manage/references/ecommerce/setup-coupons.md +338 -0
  191. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +444 -0
  192. package/skills/wix-manage/references/ecommerce/setup-shipping-rates.md +86 -0
  193. package/skills/wix-manage/references/ecommerce/setup-shipping-regions.md +56 -0
  194. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +209 -0
  195. package/skills/wix-manage/references/ecommerce/skill-graph.md +139 -0
  196. package/skills/wix-manage/references/ecommerce/troubleshoot-checkout-delivery-dropoff.md +124 -0
  197. package/skills/wix-manage/references/ecommerce/troubleshoot-discount-not-applying.md +95 -0
  198. package/skills/wix-manage/references/events/list-events.md +203 -0
  199. package/skills/wix-manage/references/forms/create-form.md +260 -0
  200. package/skills/wix-manage/references/get-paid/create-payment-links.md +212 -0
  201. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +57 -0
  202. package/skills/wix-manage/references/get-paid/payment-links-for-bookings.md +101 -0
  203. package/skills/wix-manage/references/media/upload-media-to-wix.md +216 -0
  204. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +77 -0
  205. package/skills/wix-manage/references/pricing-plans/pricing-plans-bookings-integration.md +166 -0
  206. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +336 -0
  207. package/skills/wix-manage/references/rich-content/ricos-converter-service.md +295 -0
  208. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +59 -0
  209. package/skills/wix-manage/references/sites/create-site-from-template.md +183 -0
  210. package/skills/wix-manage/references/sites/query-sites.md +125 -0
  211. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +57 -0
  212. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1041 -0
  213. package/skills/wix-manage/references/stores/create-product-catalog-v1.md +125 -0
  214. package/skills/wix-manage/references/stores/create-product-from-image.md +824 -0
  215. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +566 -0
  216. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +194 -0
  217. package/skills/wix-manage/references/stores/query-products-catalog-v1.md +80 -0
  218. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +99 -0
  219. package/skills/wix-manage/references/stores/update-product-pre-order.md +213 -0
  220. package/skills/wix-manage/references/stores/update-product-with-options.md +318 -0
@@ -0,0 +1,128 @@
1
+ ---
2
+ // SSR only — productsV3 SDK needs request-context auth (tenant resolution,
3
+ // site headers). `export const prerender = true` / `getStaticPaths()` builds
4
+ // at compile time with no request, and `.queryProducts().limit()` short-
5
+ // circuits to "is not a function". Keep this page server-rendered; do NOT
6
+ // add prerender=true or getStaticPaths.
7
+ import Layout from "../../layouts/Layout.astro";
8
+ import ProductPurchase from "../../components/ProductPurchase.tsx";
9
+ import SeoTags from "../../components/SeoTags.astro";
10
+ import { productsV3, inventoryItemsV3 } from "@wix/stores";
11
+ import { resolveWixImageUrl } from "../../utils/wix-image";
12
+ import { getBackInStockEnabled } from "../../utils/back-in-stock";
13
+
14
+ // Tell Wix platform this route is the Stores "product" sub-page.
15
+ // Drives sitemap, dashboard SEO editor, deep links.
16
+ export const wixMetadata = {
17
+ appDefId: "1380b703-ce81-ff05-f115-39571d94dfcd",
18
+ pageIdentifier: "wix.stores.sub_pages.product",
19
+ identifiers: {
20
+ slug: "STORES.PRODUCT.SLUG",
21
+ },
22
+ };
23
+
24
+ const { slug } = Astro.params;
25
+
26
+ // Wrap the SSR await; a throw here aborts the response stream.
27
+ let product: any = null;
28
+ try {
29
+ const result = await productsV3.getProductBySlug(slug!, {
30
+ fields: ["CURRENCY", "PLAIN_DESCRIPTION"],
31
+ });
32
+ product = result.product;
33
+ } catch (err) {
34
+ console.error("[product-detail] getProductBySlug failed:", err);
35
+ }
36
+
37
+ if (!product) return Astro.redirect("/404");
38
+
39
+ // Live per-variant stock from inventoryItemsV3 — the authoritative source of
40
+ // truth for OOS gating. productsV3's variantsInfo[].inventoryStatus.inStock is
41
+ // a stale cached flag that does NOT reflect real-time stock changes; don't
42
+ // trust it for the add-to-cart gate. See SHARED_WIRING.md § "Variant OOS gate".
43
+ interface VariantStock { quantity: number; trackQuantity: boolean; preorderEnabled: boolean }
44
+ const inventoryByVariant: Record<string, VariantStock> = {};
45
+ try {
46
+ const inv: any = await inventoryItemsV3.queryInventoryItems({
47
+ filter: { productId: product._id },
48
+ });
49
+ for (const item of (inv?.items ?? inv?.inventoryItems ?? []) as any[]) {
50
+ if (!item.variantId) continue;
51
+ inventoryByVariant[item.variantId] = {
52
+ quantity: Number(item.quantity ?? 0),
53
+ trackQuantity: item.trackQuantity === true,
54
+ preorderEnabled: item.preorderInfo?.enabled === true,
55
+ };
56
+ }
57
+ } catch (err) {
58
+ console.error("[product-detail] inventory query failed:", err);
59
+ }
60
+
61
+ const imageUrl = resolveWixImageUrl(product.media?.main?.image, 800, 1066);
62
+ const price = product.actualPriceRange?.minValue?.formattedAmount;
63
+ const priceAmount = Number(product.actualPriceRange?.minValue?.amount ?? 0);
64
+ const currency = product.actualPriceRange?.minValue?.currency;
65
+ const description = product.plainDescription?.replace(/<[^>]*>/g, "").trim();
66
+
67
+ // SSR probe — true only if the dashboard's "Start Collecting Requests" toggle
68
+ // is on for Wix Stores. Returns false on any error so the OOS subscribe form
69
+ // silently hides if the probe / auth fails. See references/BACK_IN_STOCK.md.
70
+ const backInStockEnabled = await getBackInStockEnabled();
71
+
72
+ // Merchant-edited SEO from dashboard (product settings → SEO).
73
+ // product.seoData.tags returned by default — no fields flag needed.
74
+ const seoTags = product.seoData?.tags ?? [];
75
+ const hasSeoTags = seoTags.some((t: any) => !t.disabled);
76
+
77
+ const viewContentPayload = {
78
+ id: product._id,
79
+ name: product.name,
80
+ price: priceAmount,
81
+ currency,
82
+ origin: "Product Page",
83
+ };
84
+ ---
85
+
86
+ <Layout
87
+ title={product.name ?? "Product"}
88
+ description={description?.slice(0, 160)}
89
+ hasSeoTags={hasSeoTags}
90
+ >
91
+ {hasSeoTags && <SeoTags slot="head" tags={seoTags} />}
92
+ <main class="py-3xl">
93
+ <div class="max-w-wide mx-auto px-xl">
94
+ <a href="/products" class="text-mute text-sm tracking-wide uppercase">&larr; Back to products</a>
95
+ <div class="grid grid-cols-1 md:grid-cols-[7fr_5fr] gap-2xl md:gap-4xl mt-xl items-start">
96
+ <div class="aspect-[4/5] bg-cream rounded-sm overflow-hidden">
97
+ {imageUrl && <img src={imageUrl} alt={product.name ?? "Product"} class="w-full h-full object-cover" />}
98
+ </div>
99
+ <div class="flex flex-col gap-lg md:sticky md:top-2xl">
100
+ <h1 class="font-display text-4xl leading-tight">{product.name}</h1>
101
+ {price && <p class="text-xl text-ink-soft">{price}</p>}
102
+ {description && <p class="text-ink-soft leading-relaxed">{description}</p>}
103
+ <ProductPurchase
104
+ client:load
105
+ product={product}
106
+ inventoryByVariant={inventoryByVariant}
107
+ backInStockEnabled={backInStockEnabled}
108
+ priceAmount={priceAmount}
109
+ />
110
+ </div>
111
+ </div>
112
+ </div>
113
+ </main>
114
+ </Layout>
115
+
116
+ <script
117
+ type="application/json"
118
+ id="analytics-view-content"
119
+ is:inline
120
+ set:html={JSON.stringify(viewContentPayload)}
121
+ />
122
+ <script>
123
+ import { trackEvent } from "../../utils/analytics";
124
+ const el = document.getElementById("analytics-view-content");
125
+ if (el?.textContent) {
126
+ trackEvent("ViewContent", JSON.parse(el.textContent));
127
+ }
128
+ </script>
@@ -0,0 +1,101 @@
1
+ ---
2
+ import Layout from "../../layouts/Layout.astro";
3
+ import ProductCard from "../../components/ProductCard.astro";
4
+ import CategoryRail from "../../components/CategoryRail.astro";
5
+ import { productsV3 } from "@wix/stores";
6
+ import { listStoreCategories } from "../../utils/categories";
7
+
8
+ const PAGE_SIZE = 24;
9
+ const cursor = Astro.url.searchParams.get("cursor") ?? undefined;
10
+
11
+ let productList: any[] = [];
12
+ let nextCursor: string | null = null;
13
+ let prevCursor: string | null = null;
14
+ try {
15
+ let builder = productsV3
16
+ .queryProducts({ fields: ["CURRENCY"] })
17
+ .limit(PAGE_SIZE);
18
+ if (cursor) builder = builder.skipTo(cursor);
19
+ const result = await builder.find();
20
+ productList = result.items ?? [];
21
+ nextCursor = result.cursors?.next ?? null;
22
+ prevCursor = result.cursors?.prev ?? null;
23
+ } catch (err) {
24
+ console.error("[products] listing query failed:", err);
25
+ }
26
+
27
+ // Drop the Wix Gift Card app's auto-mirror products. When the app is enabled,
28
+ // it provisions 5 DIGITAL Stores products (one per denomination) tagged with
29
+ // the "Gift Card" ribbon. Buying them yields a dud line item that does not
30
+ // trigger gift-card issuance — the customer-facing surface for gift cards
31
+ // is /gift-cards (gift-cards pack), not /products.
32
+ productList = productList.filter((p) => p.ribbon?.name !== "Gift Card");
33
+
34
+ const allCategories = await listStoreCategories();
35
+
36
+ // Payload for the client-side AddProductImpression event.
37
+ const impressionContents = productList.map((p, index) => ({
38
+ id: p._id,
39
+ name: p.name,
40
+ price: Number(p.actualPriceRange?.minValue?.amount ?? 0),
41
+ currency: p.actualPriceRange?.minValue?.currency ?? undefined,
42
+ position: index + 1,
43
+ }));
44
+
45
+ function pageHref(c: string | null): string | null {
46
+ if (!c) return null;
47
+ const params = new URLSearchParams();
48
+ params.set("cursor", c);
49
+ return `/products?${params.toString()}`;
50
+ }
51
+ ---
52
+
53
+ <Layout title="Products">
54
+ <section class="page-header">
55
+ <div class="container-page">
56
+ <h1 class="page-header-title">Our Products</h1>
57
+ </div>
58
+ </section>
59
+
60
+ <CategoryRail
61
+ categories={allCategories}
62
+ activeSlug={null}
63
+ prevHref={pageHref(prevCursor)}
64
+ nextHref={pageHref(nextCursor)}
65
+ />
66
+
67
+ <section class="section-pad">
68
+ <div class="container-page">
69
+ {productList.length === 0 ? (
70
+ <p class="products-empty">
71
+ No products yet &mdash; please check back shortly.
72
+ </p>
73
+ ) : (
74
+ <div class="product-grid">
75
+ {productList.map((product, idx) => (
76
+ <ProductCard product={product} index={idx} />
77
+ ))}
78
+ </div>
79
+ )}
80
+ </div>
81
+ </section>
82
+ </Layout>
83
+
84
+ <script
85
+ type="application/json"
86
+ id="analytics-impressions"
87
+ is:inline
88
+ set:html={JSON.stringify(impressionContents)}
89
+ />
90
+ <script>
91
+ import { trackEvent } from "../../utils/analytics";
92
+ function fireImpressions() {
93
+ const el = document.getElementById("analytics-impressions");
94
+ if (!el?.textContent) return;
95
+ trackEvent("AddProductImpression", {
96
+ contents: JSON.parse(el.textContent),
97
+ origin: "Product Listing",
98
+ });
99
+ }
100
+ document.addEventListener("astro:page-load", fireImpressions);
101
+ </script>
@@ -0,0 +1,280 @@
1
+ ---
2
+ name: wix-manage
3
+ description: "Wix business solution management recipes — REST API operations for configuring and managing Wix business solutions. Routes to: stores, bookings, get-paid, CMS, contacts, events, forms, media, app-installation, pricing-plans, restaurants, rich-content, sites, blog, calendar, domains, site-properties, ecommerce."
4
+ compatibility: Requires Wix REST API access (API key or OAuth).
5
+ ---
6
+
7
+ # Management Recipes Index
8
+
9
+ ## What Are Management Recipes?
10
+
11
+ **Management recipes are for REST API operations** that configure, set up, and manage Wix business entities on your site. These recipes use REST API calls and are designed for:
12
+
13
+ - **Site setup and configuration** — Initial setup of stores, bookings, payments, and other business apps
14
+ - **Entity management** — Creating, updating, and deleting products, services, staff members, pricing plans
15
+ - **Administrative operations** — Bulk updates, contact labeling, data migrations
16
+ - **Backend integrations** — Server-to-server automations, webhooks, data synchronization
17
+
18
+ These recipes do NOT cover frontend development or SDK usage for displaying data to users.
19
+
20
+ ---
21
+
22
+ ## App Installation
23
+
24
+ ### [Install Wix Apps](references/app-installation/install-wix-apps.md)
25
+ **Technical:** Installs Wix apps on a site using Apps Installer API. Covers enabling Velo (Wix Code), app installation, and common app definition IDs.
26
+
27
+ ### [List Installed Apps](references/app-installation/list-installed-apps.md)
28
+ **Technical:** Lists all apps installed on a site using Apps Installer API. Useful for verifying app installations before making API calls and diagnosing authorization errors.
29
+
30
+ ---
31
+
32
+ ## Blog
33
+
34
+ ### [How to Create Blog Posts](references/blog/how-to-create-blog-posts.md)
35
+ **Technical:** Creates and publishes blog posts using Blog Posts API. Covers Ricos rich content format, image upload via Media Manager, category/tag assignment, and bulk post creation.
36
+
37
+ ---
38
+
39
+ ## Bookings
40
+
41
+ ### [Booking Service Policy Setup](references/bookings/booking-service-policy-setup.md)
42
+ **Technical:** Sets up booking policies, cancellation rules, and waitlist configuration using the Services API policy fields. Covers bookingPolicy, cancellationPolicy, and waitlist settings.
43
+
44
+ ### [Booking System Integration Gaps](references/bookings/booking-system-integration-gaps.md)
45
+ **Technical:** Documents undocumented API patterns for booking payments. Covers Bookings→Ecommerce integration, booking ID transformation to catalog items, and async payment confirmation flows.
46
+
47
+ ### [Bookings Staff Setup](references/bookings/bookings-staff-setup.md)
48
+ **Technical:** Creates staff members and configures custom working hours using Staff API + Calendar Events API. Critical two-step process: create staff → assign schedule → create working hours events.
49
+
50
+ ### [Create and Update Booking Services](references/bookings/create-and-update-booking-services.md)
51
+ **Technical:** Full CRUD operations for Wix Bookings services using Services API. Covers service types (APPOINTMENT, CLASS, COURSE), pricing configuration, location setup, and schedule management.
52
+
53
+ ### [End-to-End Booking Flow](references/bookings/end-to-end-booking-flow.md)
54
+ **Technical:** Complete booking flow from service discovery to payment. Query services, check availability with Time Slots V2, create bookings, and process payment via eCommerce checkout.
55
+
56
+ ### [External Calendar Integration](references/bookings/external-calendar-integration.md)
57
+ **Technical:** OAuth-based integration with Google Calendar, Microsoft Outlook, and Apple Calendar. Covers authentication flows, sync configuration, and bidirectional event management.
58
+
59
+ ### [Multi-Resource Service Creation](references/bookings/multi-resource-service-creation.md)
60
+ **Technical:** Creates resource types and individual resources using Resources API. Enables services that require multiple resources (rooms + equipment + staff) with automatic allocation.
61
+
62
+ ---
63
+
64
+ ## Calendar
65
+
66
+ ### [Configure Default Business Hours](references/calendar/configure-default-business-hours.md)
67
+ **Technical:** Uses Calendar Events API to create WORKING_HOURS events on the business schedule. Covers the critical distinction between Calendar Events API (correct) vs Site Properties API (incorrect) for setting base availability.
68
+
69
+ ---
70
+
71
+ ## CMS
72
+
73
+ ### [CMS Data Items CRUD](references/cms/cms-data-items-crud.md)
74
+ **Technical:** Add, query, update, and delete items in CMS collections. Use this to insert content, bulk insert/update/patch/delete items, query with filters, and manage collection data. Key endpoints: /wix-data/v2/items, /wix-data/v2/bulk/items/*.
75
+
76
+ ### [CMS Data Operations Extended](references/cms/cms-data-operations-extended.md)
77
+ **Technical:** Additional CMS data operations including count, upsert (bulk save), and update by filter patterns.
78
+
79
+ ### [CMS eCommerce Catalog Integration](references/cms/cms-ecommerce-catalog-integration.md)
80
+ **Technical:** The recommended way to sell existing CMS collection items (tickets, bookings, memberships) through Wix checkout. Add the CATALOG plugin to convert any CMS collection into purchasable products with cart and payment integration.
81
+
82
+ ### [CMS References & Relationships](references/cms/cms-references-and-relationships.md)
83
+ **Technical:** Add, replace, or remove items from MULTI_REFERENCE fields. Use insert-references, replace-references, remove-references endpoints. Required for managing multi-reference relationships - these CANNOT be set via regular insert/update/patch operations. Also covers single references and querying with expanded references.
84
+
85
+ ### [CMS Schema Management](references/cms/cms-schema-management.md)
86
+ **Technical:** Create and modify CMS collection structures. Covers listing collections, creating collections with fields, adding/removing fields, and updating collection settings.
87
+
88
+ ---
89
+
90
+ ## Contacts
91
+
92
+ ### [Bulk Delete Contacts](references/contacts/bulk-delete-contacts.md)
93
+ **Technical:** Deletes multiple contacts using filter-based bulk delete. Covers safe deletion patterns, GDPR compliance, soft delete alternatives, and batch processing strategies.
94
+
95
+ ### [Bulk Label and Unlabel Contacts](references/contacts/bulk-label-and-unlabel-contacts.md)
96
+ **Technical:** Adds/removes labels from multiple contacts using Contacts API bulk operations. Covers label creation, contact filtering, batch processing, and rate limit handling.
97
+
98
+ ---
99
+
100
+ ## Domains
101
+
102
+ ### [Domain Search and Purchase](references/domains/domain-search-and-purchase.md)
103
+ **Technical:** Search for available domains, get domain suggestions, and generate purchase links using Domain Search V2 API. Covers availability checks, TLD filtering, and connecting domains to Wix sites.
104
+
105
+ ---
106
+
107
+ ## eCommerce
108
+
109
+ **Routing — pick the right entry point:**
110
+ - **Any sales/business improvement request** (boost sales, promotions, help my business, holiday deals, improve revenue, discounts, shipping, coupons, clearance) → use [Recommend: eCommerce Strategy](references/ecommerce/recommend-ecommerce-strategy.md). This is the **default entry point** — it analyzes ALL domains (discounts, shipping, future: gift cards, taxes) and generates cross-domain recommendations. Do NOT ask clarifying questions.
111
+ - **Apply previously generated shipping recommendations** → use [Recipe: Apply Shipping Recommendations](references/ecommerce/recipe-apply-shipping-recommendations.md)
112
+ - **Store pickup configuration** → use [Setup Store Pickup Location](references/ecommerce/setup-store-pickup-location.md)
113
+ - **Discount not working at checkout** → use [Troubleshoot: Discount Not Applying](references/ecommerce/troubleshoot-discount-not-applying.md)
114
+ - **Checkout delivery step drop-off** → use [Troubleshoot: Checkout Delivery Drop-off](references/ecommerce/troubleshoot-checkout-delivery-dropoff.md)
115
+
116
+ ### [Recommend: eCommerce Strategy](references/ecommerce/recommend-ecommerce-strategy.md)
117
+ **THE entry point for all eCommerce recommendation requests.** Unified skill that analyzes site data across ALL domains (discounts + shipping), generates up to 5 cross-domain recommendations, and persists them to the tracking database. Covers discount strategies (seasonal, upsell, stock mover, bundling) AND shipping optimization (coverage gaps, free shipping, rate strategy, carrier backup). Use this for ANY business improvement request.
118
+
119
+ ### [Recipe: Apply Shipping Recommendations](references/ecommerce/recipe-apply-shipping-recommendations.md)
120
+ **Technical:** Applies AI-generated shipping recommendations. Creates or updates shipping options based on recommendation data.
121
+
122
+ ### [Setup Store Pickup Location](references/ecommerce/setup-store-pickup-location.md)
123
+ **Technical:** Configures in-store pickup at checkout using Delivery Profiles API.
124
+
125
+ ### [Troubleshoot: Discount Not Applying](references/ecommerce/troubleshoot-discount-not-applying.md)
126
+ **Technical:** Diagnostic tree for inactive discounts — checks active status, time window, scope targeting, revision mismatch, app installation.
127
+
128
+ ### [Troubleshoot: Checkout Delivery Drop-off](references/ecommerce/troubleshoot-checkout-delivery-dropoff.md)
129
+ **Technical:** Diagnostic tree for delivery step conversion below 65% benchmark.
130
+
131
+ <details>
132
+ <summary>Internal skills (loaded automatically by the entry points above — do NOT use directly)</summary>
133
+
134
+ #### Goals
135
+ - [Goal: Increase AOV](references/ecommerce/goal-increase-aov.md) — UPSELL_BOOST
136
+ - [Goal: Clear Inventory](references/ecommerce/goal-clear-inventory.md) — STOCK_MOVER
137
+ - [Goal: Seasonal Revenue](references/ecommerce/goal-seasonal-revenue.md) — SEASONAL
138
+ - [Goal: Drive Cross-Sells](references/ecommerce/goal-drive-cross-sells.md) — BUNDLE_AND_SAVE
139
+ - [Goal: Reduce Cart Abandonment](references/ecommerce/goal-reduce-cart-abandonment.md) — Shipping
140
+
141
+ #### Flows
142
+ - [Flow: Upsell Boost](references/ecommerce/flow-upsell-boost.md)
143
+ - [Flow: Bundle and Save](references/ecommerce/flow-bundle-and-save.md)
144
+ - [Flow: Stock Mover](references/ecommerce/flow-stock-mover.md)
145
+ - [Flow: Seasonal Promotion](references/ecommerce/flow-seasonal-promotion.md)
146
+ - [Flow: Fix Coverage Gaps](references/ecommerce/flow-fix-coverage-gaps.md)
147
+ - [Flow: Add Free Shipping](references/ecommerce/flow-add-free-shipping.md)
148
+ - [Flow: Optimize Shipping Rates](references/ecommerce/flow-optimize-shipping-rates.md)
149
+
150
+ #### Guardrails
151
+ - [Guardrail: Discount Conflicts](references/ecommerce/guardrail-discount-conflicts.md)
152
+ - [Guardrail: Margin Protection](references/ecommerce/guardrail-margin-protection.md)
153
+ - [Guardrail: Shipping Health](references/ecommerce/guardrail-shipping-health.md)
154
+ - [Guardrail: Rate Pricing Sanity](references/ecommerce/guardrail-rate-pricing-sanity.md)
155
+
156
+ #### Config & API References
157
+ - [API: Recommendation Tracking](references/ecommerce/api-recommendation-tracking.md)
158
+ - [Setup: Discount Rules](references/ecommerce/setup-discount-rules.md)
159
+ - [Setup: Coupons](references/ecommerce/setup-coupons.md)
160
+ - [Setup: Shipping Regions](references/ecommerce/setup-shipping-regions.md)
161
+ - [Setup: Shipping Rates](references/ecommerce/setup-shipping-rates.md)
162
+
163
+ #### Tracking
164
+ - Tracking is built into [Recommend: eCommerce Strategy](references/ecommerce/recommend-ecommerce-strategy.md) (Steps 2 + 8) — no separate skill needed
165
+ - [API: Recommendation Tracking](references/ecommerce/api-recommendation-tracking.md) — CRUD API reference for the tracking service
166
+
167
+ #### Reference
168
+ - [Skill Graph](references/ecommerce/skill-graph.md)
169
+
170
+ </details>
171
+
172
+ ---
173
+
174
+ ## Events
175
+
176
+ ### [List Events](references/events/list-events.md)
177
+ **Technical:** Queries events from Wix Events using Events API. Covers field sets (DETAILS, URLS, REGISTRATION), filtering by status/date, and pagination.
178
+
179
+ ---
180
+
181
+ ## Forms
182
+
183
+ ### [Create Form](references/forms/create-form.md)
184
+ **Technical:** Creates a form with fields (name, email, etc.) using the Form Schemas API. Covers field configuration, layout, and post-submission triggers.
185
+
186
+ ---
187
+
188
+ ## Get Paid
189
+
190
+ ### [Create Payment Links](references/get-paid/create-payment-links.md)
191
+ **Technical:** Creates payment links for collecting payments without a checkout flow. Covers store products (catalog items), custom line items, variants, due dates, and sending links via email.
192
+
193
+ ### [How to Setup Wix Payments](references/get-paid/how-to-setup-wix-payments.md)
194
+ **Technical:** Configures Wix Payments as the payment provider. Covers eligibility checking, business verification, bank account setup, and payment method configuration (cards, PayPal, Apple Pay).
195
+
196
+ ### [Payment Links for Bookings](references/get-paid/payment-links-for-bookings.md)
197
+ **Technical:** Creates payment links for unpaid bookings using Payment Links API. Links booking IDs to payment requests with proper redirect handling.
198
+
199
+ ---
200
+
201
+ ## Media
202
+
203
+ ### [Upload Media to Wix](references/media/upload-media-to-wix.md)
204
+ **Technical:** Uploads images and files to the Wix Media Manager using the Import File API. Covers importing from external URLs, checking file status, and using the returned wixstatic.com URL in other APIs.
205
+
206
+ ---
207
+
208
+ ## Pricing Plans
209
+
210
+ ### [Create and Update Pricing Plans](references/pricing-plans/create-and-update-pricing-plans.md)
211
+ **Technical:** Creates subscription and one-time payment plans using Plans API. Covers pricing models (recurring, one-time, free), trial periods, perks configuration, and plan visibility.
212
+
213
+ ### [Pricing Plans Bookings Integration](references/pricing-plans/pricing-plans-bookings-integration.md)
214
+ **Technical:** Links Pricing Plans to Bookings services using the Benefit Programs API. Enables package deals and memberships that grant booking access.
215
+
216
+ ---
217
+
218
+ ## Restaurants
219
+
220
+ ### [Wix Restaurants Setup](references/restaurants/wix-restaurants-setup.md)
221
+ **Technical:** Configures restaurant menus, sections, and items using Menus API. Covers menu structure (Menu → Section → Item), modifiers, pricing, availability schedules, and ordering settings.
222
+
223
+ ---
224
+
225
+ ## Rich Content
226
+
227
+ ### [Ricos Converter Service](references/rich-content/ricos-converter-service.md)
228
+ **Technical:** Validates and converts content between Ricos documents and HTML/Markdown/plain text using the Ricos Documents API. Covers plugin configuration, format conversion in both directions, and document validation.
229
+
230
+ ---
231
+
232
+ ## Site Properties
233
+
234
+ ### [Change Payment Currency](references/site-properties/change-payment-currency-site-properties.md)
235
+ **Technical:** Updates the site-level payment currency (store billing currency) using Site Properties API, including the required request body shape and field mask.
236
+
237
+ ---
238
+
239
+ ## Sites
240
+
241
+ ### [Create Site from Template](references/sites/create-site-from-template.md)
242
+ **Technical:** Creates new Wix sites from templates using account-level APIs. Covers template search, site creation, headless site setup, OAuth app creation, and publishing.
243
+
244
+ ### [Query Sites](references/sites/query-sites.md)
245
+ **Technical:** Lists and queries all sites associated with a Wix account using Sites API. Covers pagination with cursor-based navigation.
246
+
247
+ ---
248
+
249
+ ## Stores
250
+
251
+ ### [Add Store Pages to Site](references/stores/add-store-pages-to-site.md)
252
+ **Technical:** Adds missing checkout and cart pages to a site when Stores app is installed. Used when store pages are missing after migration or setup issues.
253
+
254
+ ### [Bulk Create Products with Options](references/stores/bulk-create-products-with-options.md)
255
+ **Technical:** Uses bulk products endpoint to create multiple products with inventory in a single request. Handles variant generation from options, media format requirements, and error handling for partial failures.
256
+
257
+ ### [Create Product from Image](references/stores/create-product-from-image.md)
258
+ **Technical:** **MANDATORY entry point** for any "create product from image" or "create product from photo" request. STEP 1 auto-detects the site's catalog version (V1/V3) via the provision endpoint, then runs the matching flow inline — V3 supports up to 3 images, info sections, SEO, options/variants, and atomic creation; V1 supports a single image, simple product, and a separate media-attach call. Combines Media Upload + LLM analysis + Product Creation + (V1 only) Add Product Media in one self-contained recipe.
259
+
260
+
261
+ ### [Create Product (Catalog V1)](references/stores/create-product-catalog-v1.md)
262
+ **Technical:** Create products using the Catalog V1 Products API. Use this recipe when the site's catalog version is CATALOG_V1. Covers simple product creation, product with options, and key V1 request structure differences from V3.
263
+
264
+ ### [Create Product with Options (Catalog V3)](references/stores/create-product-with-options-catalog-v3.md)
265
+ **Technical:** Single product creation with options using Catalog V3 Products API. Covers option types (TEXT_CHOICES, SWATCH_CHOICES), choice configuration, and automatic variant generation.
266
+
267
+ ### [Find Products (Query and Search, Catalog V3)](references/stores/find-products-query-and-search-catalog-v3.md)
268
+ **Technical:** Find, search, query, and list products from a Wix Store using Catalog V3 Search Products and Query Products endpoints. Explains when to use each endpoint, correct fields enum values, filtering, sorting, and paging.
269
+
270
+ ### [Query Products (Catalog V1)](references/stores/query-products-catalog-v1.md)
271
+ **Technical:** Query and list products from a Wix Store using the Catalog V1 Query Products endpoint. Use this recipe when the site's catalog version is CATALOG_V1. Covers basic queries, filtering, sorting, and paging.
272
+
273
+ ### [Setup Online Store (Catalog V3)](references/stores/setup-online-store-catalog-v3.md)
274
+ **Technical:** Initializes a Stores catalog with Catalog V3 Products API, bulk products endpoint, and Categories API. Covers product creation, option configuration, variant management, and category assignment.
275
+
276
+ ### [Update Product Pre-Order](references/stores/update-product-pre-order.md)
277
+ **Technical:** Manages pre-order settings for product variants using V3 Inventory API. Covers enabling/disabling pre-orders, setting messages, configuring limits, and handling trackQuantity requirements.
278
+
279
+ ### [Update Product with Options](references/stores/update-product-with-options.md)
280
+ **Technical:** Modifies existing products and variants using Catalog V3 Products API. Covers adding/removing option choices, variant-specific pricing, and revision-based updates to prevent conflicts.
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: "Install Wix Apps"
3
+ description: Installs Wix apps on a site using Apps Installer API. Covers enabling Velo (Wix Code), app installation, and common app definition IDs.
4
+ ---
5
+ # Install Wix Apps on a Site
6
+
7
+ This recipe guides you through installing Wix apps on a site using the Apps Installer REST API, including enabling Velo (Wix Code) when needed.
8
+
9
+ ## Prerequisites
10
+
11
+ - Site ID where apps will be installed
12
+ - Knowledge of which app to install (see [Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix))
13
+
14
+ ## Required APIs
15
+
16
+ - **Apps Installer API**: [REST](https://dev.wix.com/docs/api-reference/business-management/app-installation/app-installation/install-app)
17
+
18
+ ---
19
+ ## Step 0: Find the App ID (skip if you already have it)
20
+
21
+ If you already know the `appDefId` (e.g. from the table of Wix-built apps below), skip to Step 1.
22
+
23
+ For any third-party app, or any app you only know by name, resolve the ID first using the Search Market Listings API.
24
+
25
+ **Endpoint**: `POST https://www.wixapis.com/devcenter/app-market-listing/v1/market-listings/search`
26
+
27
+ **Request**:
28
+ ```bash
29
+ curl -X POST \
30
+ 'https://www.wixapis.com/devcenter/app-market-listing/v1/market-listings/search' \
31
+ -H 'Authorization: <AUTH>' \
32
+ -H 'Content-Type: application/json' \
33
+ -d '{ "searchTerm": "Usercentrics" }'
34
+ ```
35
+
36
+ **Response** (truncated):
37
+ ```json
38
+ {
39
+ "marketListings": [
40
+ {
41
+ "appId": "b8cfbda5-91e8-45ad-8c8d-4d4700534ab5",
42
+ "basicInfo": { "name": "Usercentrics for Wix", ... }
43
+ }
44
+ ]
45
+ }
46
+ ```
47
+
48
+ Use the returned `appId` as the `appDefId` in Step 2.
49
+
50
+ ### IMPORTANT NOTES
51
+ - The `appDefId` field in the install request and the `appId` field returned here are the same value
52
+ - If multiple results come back, match on `basicInfo.name` to confirm you have the right app before installing
53
+ - Only listings with `status: "PUBLISHED"` can be installed
54
+ ## Step 1: Enable Velo (Wix Code) if Needed
55
+
56
+ If you receive the error `WDE0110: Wix Code not enabled`, you must first enable Velo on the site.
57
+
58
+ **Endpoint**: `POST https://www.wixapis.com/mcp-serverless/v1/velo/provision`
59
+
60
+ **Request**:
61
+ ```bash
62
+ curl -X POST \
63
+ 'https://www.wixapis.com/mcp-serverless/v1/velo/provision/' \
64
+ -H 'Authorization: <AUTH>' \
65
+ -H 'Content-Type: application/json' \
66
+ -d '{}'
67
+ ```
68
+
69
+ **Response**: Empty body on success.
70
+
71
+ ### IMPORTANT NOTES:
72
+ - Only call this endpoint if you receive the `WDE0110` error
73
+ - This is a one-time operation per site
74
+
75
+ ---
76
+
77
+ ## Step 2: Install the Wix App
78
+
79
+ Use the Apps Installer API to install any Wix app on a site.
80
+
81
+ **Endpoint**: `POST https://www.wixapis.com/apps-installer-service/v1/app-instance/install`
82
+
83
+ **Request Body**:
84
+ ```json
85
+ {
86
+ "tenant": {
87
+ "tenantType": "SITE",
88
+ "id": "<SITE_ID>"
89
+ },
90
+ "appInstance": {
91
+ "appDefId": "<APP_DEF_ID>"
92
+ }
93
+ }
94
+ ```
95
+
96
+ **Request**:
97
+ ```bash
98
+ curl -X POST \
99
+ 'https://www.wixapis.com/apps-installer-service/v1/app-instance/install' \
100
+ -H 'Authorization: <AUTH>' \
101
+ -H 'Content-Type: application/json' \
102
+ -d '{
103
+ "tenant": {
104
+ "tenantType": "SITE",
105
+ "id": "<SITE_ID>"
106
+ },
107
+ "appInstance": {
108
+ "appDefId": "<APP_DEF_ID>"
109
+ }
110
+ }'
111
+ ```
112
+
113
+ ### Common App Definition IDs
114
+
115
+ Before installing, refer to the [Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix) documentation to find the correct `appDefId` for the app you want to install.
116
+
117
+ Some common apps:
118
+ | App | appDefId |
119
+ |-----|----------|
120
+ | Wix Stores | `215238eb-22a5-4c36-9e7b-e7c08025e04e` |
121
+ | Wix Bookings | `13d21c63-b5ec-5912-8397-c3a5ddb27a97` |
122
+ | Wix Blog | `14bcded7-0066-7c35-14d7-466cb3f09103` |
123
+ | Wix Events | `140603ad-af8d-84a5-2c80-a0f60cb47351` |
124
+ | Wix Pricing Plans | `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3` |
125
+
126
+ ### IMPORTANT NOTES:
127
+ - NEVER guess the `appDefId`. For Wix-built apps, use the table above. For any other app, resolve the ID using Step 0 (Search Market Listings).
128
+ - The `tenantType` MUST be `SITE`
129
+ - The `id` in tenant is the site's metaSiteId
130
+
131
+ ---
132
+
133
+ ## Error Handling
134
+
135
+ ### App Not Installed Error
136
+ If you receive an error indicating a required app is not installed, use this recipe to install it before proceeding.
137
+
138
+ ### WDE0110: Wix Code not enabled
139
+ Call the Velo provision endpoint (Step 1) first, then retry the original operation.
140
+
141
+ ---
142
+
143
+ ## Next Steps
144
+
145
+ After installing an app:
146
+ - Configure the app's settings using its specific APIs
147
+ - Set up any required app-specific data (products for Stores, services for Bookings, etc.)
148
+
149
+ ---
150
+
151
+ ## Common Pitfalls
152
+
153
+ - **"I don't have the appDefId"** → Run Step 0. The table in Step 2 only covers Wix-built apps; the App Market has thousands of others.
154
+ - **Don't try to scrape the App Market website to find IDs** — pages are client-rendered and the appId is not in the HTML. Use Search Market Listings instead.
155
+ - **Don't try `InstallAppFromShareUrl` as a workaround for unknown IDs** — `shareUrlId` is an internal identifier you generally don't have either.