All skills
wix avatar

/wix-vibe-headless

@1563591 official
by Wix.comwix/skills33 stars
33

Client-only, dependency-free REST scaffolds for connecting an already-built front end (a vibe-coded app, an HTML/JSX/Vite project, a design-tool export) to a live Wix site over the site's public WIX_CLIENT_ID — the browser talks to Wix directly, no SDK, no backend, no build step. One skill covering every Wix business solution: Stores/eCommerce storefront (products, cart, checkout), Bookings (services, slots, appointments), Blog (posts, categories, tags), Events & Tickets (browse, RSVP, ticketing), Portfolio (collections, projects, galleries), Restaurants (menu, online ordering, reservations), Forms (any visitor-fillable form — contact/enquiry, signup, waitlist, application, survey, quote request; schema-driven render + submit), CMS / Wix Data (list, detail, filter, CRUD), Pricing Plans (memberships, subscriptions, checkout), and Members (custom login — email+password, Google/Facebook, and custom SSO — plus account areas and member-gated content). Each vertical ships a copy-as-is REST layer plus wiring instructions. Read-only over the owner's content — never provisions, never mocks data. Triggers: connect my Wix store/shop, build a storefront over Wix, add a cart and checkout, connect Wix Bookings, take appointments/reservations, show my Wix blog, list my Wix events, sell tickets, take RSVPs, build a portfolio from Wix Portfolio, show my restaurant menu / order online / book a table, display my Wix CMS collection, wire a contact form to Wix, add a contact/enquiry form, build a signup or application form, take survey responses, sell membership/subscription plans, add member login / sign up, let members log in with Google or Facebook, custom login page, account / profile page, gate content behind login, sign in with SSO/Okta, 'here is my WIX_CLIENT_ID', connect this app to my Wix site over REST. Use this for CLIENT-ONLY REST integration over an existing site; use `wix-headless` instead for SDK + Wix CLI builds, hosting, and one-prompt new-site creation.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-vibe-headless

This session only. Nothing lands on disk.

referencespricing-plansseedSEED.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Pricing Plans — seeding

Seed Wix Pricing Plans (Plans V3) by calling seed-pricing-plans.cjs — don't hand-write the REST calls. It's a build-time module (run via exec_tool, not shipped in the app) that abstracts every Pricing Plans + Benefit Programs seed operation. require it and call the functions with plain data.

NOT yet live-verified — transcribed from setup-pricing-plans.md.

// build-time exec_tool
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.cjs"));
const ctx = { token: accessToken, siteId: WIX_METASITE_ID };

// setupPricingPlans installs the Wix Pricing Plans app first (idempotent) — base44 sites may not have it.

// DEFAULT: one call. Creates the plan(s), keeps their ids in memory, and (per plan) wires bookings
// coverage when provided — createPlans then attachBookingsCoverage (2a→2b→2c), in order.
const { plans, coverageAttached, benefitsCreated } = await seed.setupPricingPlans(ctx, {
  plans: [
    { name: "Studio Membership", description: "Unlimited group classes.", price: "20.00",
      type: "recurring", billingCycle: { period: "MONTH", count: 1 },
      perks: ["Unlimited group classes", "10% off workshops"],
      coveredServiceIds: bookingsServiceIds },  // optional — only when this plan covers bookings services
    // …just the plan data. price = decimal STRING; currency is site-derived (don't send it).
    // limited pack instead of unlimited: bookingsCoverage: { serviceIds, creditAmount: 8 }
  ],
});
// A plans-only run (no bookings) just omits coveredServiceIds — STEP 2 is skipped automatically.

Seeding is additive — never delete or overwrite existing content. Don't clean up, don't remove "sample" data, don't reset. Just add.

Escape hatch — individual functions

Reach for the functions below only when the one-call setupPricingPlans doesn't fit (custom coverage, step-by-step control). setupPricingPlans is built from them, in this order:

const plans = await seed.createPlans(ctx, [
  { name: "Studio Membership", price: "20.00", perks: ["Unlimited group classes"],
    coveredServiceIds: bookingsServiceIds },
]);
// STEP 2 — only when bookings is in the run AND the plan covers services (skip otherwise):
await seed.attachBookingsCoverage(ctx, plans[0].id, plans[0].coveredServiceIds);
// limited pack instead of unlimited: attachBookingsCoverage(ctx, id, ids, { creditAmount: 8 })

Functions

fn does
setupPricingPlans(ctx, {plans}) DEFAULT one call: createPlans → per-plan attachBookingsCoverage → {plans,coverageAttached,benefitsCreated}
createPlans(ctx, plans) one create call per plan (V3 has no bulk) → [{id,name,coveredServiceIds}]
attachBookingsCoverage(ctx, planId, serviceIds, {creditAmount?}) STEP 2: 2a→2b→2c in order → {itemSetId,serviceIds}
getProgramDefinition(ctx, planId) 2a: READ the auto-created program definition (retry-once on 404) → programDefinitionId
createPoolDefinition(ctx, programDefinitionId, {creditAmount?}) 2b: one pool + one Bookings benefit → itemSetId
createBenefitItems(ctx, itemSetId, serviceIds) 2c: bulk-create one benefit item per covered service

Plan type: "recurring" (default; billingCycle defaults to {MONTH,1}), "one-time" (bills once then ends; pass billingCycle: null for the unlimited one-time), or "free" (amount forced to "0" + a per-member-lifetime purchase limit). Amounts are decimal strings; perks are display-only bullets; plans default to visibility: "PUBLIC" + buyable: true.

Bookings-first dependency

STEP 2 attaches bookings service ids to a plan through the Benefit Programs API (the coverage is NOT a plan field or a perk). Those ids come from the bookings seed (seeded.bookings.serviceIds[]), so seed bookings before pricing-plans and pass the ids in as coveredServiceIds. A plans-only run (no bookings) stops after createPlans — skip STEP 2 entirely.

Reference

If a call returns a shape you didn't expect, or you need an operation this module doesn't cover, use the documentation skill available in your environment to search + read the live Wix API reference — never guess. The authoritative source recipe is wix-headless/references/inline-recipes/setup-pricing-plans.md.

Read a method's page before writing its call: it carries the exact body shape, the required permission scope, and the response envelope.

Source: SKILL.md on GitHub

1 warning6d3 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill is safe and provides a comprehensive integration framework for Wix Headless services. It uses platform-secured connectors for authentication and includes automated scaffolding utilities to assist with project setup.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: MEDIUM · 1 issue

Signed by skilld at 1563591. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 weeks ago

README badge

README badge for wix/skills/wix-vibe-headless