@wix/agent-skills 1.30.0 → 1.31.1

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 (51) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +7 -8
  3. package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
  4. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +11 -50
  5. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +14 -10
  6. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +5 -8
  7. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +5 -4
  8. package/skills/wix-headless-kit/SKILL.md +20 -12
  9. package/skills/wix-headless-kit/guides/api-run.md +178 -0
  10. package/skills/wix-headless-kit/guides/existing-site.md +3 -2
  11. package/skills/wix-headless-kit/guides/reference-mode.md +9 -1
  12. package/skills/wix-headless-kit/install/AGENTS.md +7 -5
  13. package/skills/wix-headless-kit/install/attach.mjs +3 -3
  14. package/skills/wix-headless-kit/install/context.mjs +13 -3
  15. package/skills/wix-headless-kit/install/deploy.mjs +3 -3
  16. package/skills/wix-headless-kit/install/pins.json +1 -1
  17. package/skills/wix-headless-kit/install/setup.mjs +2 -2
  18. package/skills/wix-headless-kit/install/templates.mjs +2 -1
  19. package/skills/wix-headless-templates/blog/seed/SEED.md +1 -1
  20. package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +2 -2
  21. package/skills/wix-headless-templates/bookings/seed/SEED.md +1 -1
  22. package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +2 -1
  23. package/skills/wix-headless-templates/donations/seed/SEED.md +1 -1
  24. package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +3 -2
  25. package/skills/wix-headless-templates/events/seed/SEED.md +1 -1
  26. package/skills/wix-headless-templates/events/seed/seed-events.mjs +3 -2
  27. package/skills/wix-headless-templates/portfolio/seed/SEED.md +4 -2
  28. package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +6 -6
  29. package/skills/wix-headless-templates/rentals/seed/SEED.md +1 -1
  30. package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +2 -1
  31. package/skills/wix-headless-templates/restaurants/seed/SEED.md +1 -1
  32. package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +4 -3
  33. package/skills/wix-headless-templates/shared/seed/images.mjs +63 -7
  34. package/skills/wix-headless-templates/storefront/seed/SEED.md +17 -5
  35. package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +49 -16
  36. package/skills/wix-manage/SKILL.md +25 -15
  37. package/skills/wix-manage/references/automations/activation-status.md +52 -0
  38. package/skills/wix-manage/references/automations/api-catalog.md +81 -0
  39. package/skills/wix-manage/references/automations/build-and-manage-automations.md +34 -0
  40. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +277 -363
  41. package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +3 -1
  42. package/skills/wix-manage/references/sites/send-feedback-to-wix.md +92 -0
  43. package/skills/wix-manage/references/sites/upload-static-site.md +258 -279
  44. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +7 -1
  45. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +7 -1
  46. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +7 -1
  47. package/skills/wix-headless-kit/guides/no-machine.md +0 -115
  48. package/skills/wix-manage/references/bookings/create-appointment-service.md +0 -243
  49. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +0 -31
  50. package/skills/wix-manage/references/bookings/create-class-service.md +0 -222
  51. package/skills/wix-manage/references/bookings/create-course-service.md +0 -251
@@ -112,7 +112,13 @@ fails. You can finish without waiting for those images or replacing their placeh
112
112
 
113
113
  **Never paste a Wix dashboard link or path.**
114
114
 
115
- **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders and inventory?", prefer_dashboard=true)`. Use its handoff guidance, note that the seeded catalog is mock data they can edit, replace or delete, and state any requested workflows that remain unfinished and what is needed to complete them.
115
+ **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders, inventory and payments?", prefer_dashboard=true)`. Use its handoff guidance, note that the seeded catalog is mock data they can edit, replace or delete, and state any requested workflows that remain unfinished and what is needed to complete them.
116
+
117
+ **A payment ask is a store ask.** The store carries its own checkout, in every region, so
118
+ nothing separate connects payments and no payment provider is installed alongside it — send
119
+ the user to the same dashboard page the handoff call names. A note that Base44 Payments /
120
+ Wix Payments is unavailable in their region is about a provider installed into the app, and
121
+ says nothing about their store's checkout.
116
122
 
117
123
  ## Additional Wix functionality
118
124
 
@@ -106,7 +106,13 @@ fails. You can finish without waiting for those images or replacing their placeh
106
106
 
107
107
  **Never paste a Wix dashboard link or path.**
108
108
 
109
- **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders and inventory?", prefer_dashboard=true)`. Use its handoff guidance, note that the seeded catalog is mock data they can edit, replace or delete, and state any requested workflows that remain unfinished and what is needed to complete them.
109
+ **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders, inventory and payments?", prefer_dashboard=true)`. Use its handoff guidance, note that the seeded catalog is mock data they can edit, replace or delete, and state any requested workflows that remain unfinished and what is needed to complete them.
110
+
111
+ **A payment ask is a store ask.** The store carries its own checkout, in every region, so
112
+ nothing separate connects payments and no payment provider is installed alongside it — send
113
+ the user to the same dashboard page the handoff call names. A note that Base44 Payments /
114
+ Wix Payments is unavailable in their region is about a provider installed into the app, and
115
+ says nothing about their store's checkout.
110
116
 
111
117
  ## Additional Wix functionality
112
118
 
@@ -72,7 +72,13 @@ fails. You can finish without waiting for those images or replacing their placeh
72
72
 
73
73
  **Never paste a Wix dashboard link or path.**
74
74
 
75
- **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders and inventory?", prefer_dashboard=true)`. Use its handoff guidance, state any requested workflows that remain unfinished and what is needed to complete them.
75
+ **Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders, inventory and payments?", prefer_dashboard=true)`. Use its handoff guidance, state any requested workflows that remain unfinished and what is needed to complete them.
76
+
77
+ **A payment ask is a store ask.** The store carries its own checkout, in every region, so
78
+ nothing separate connects payments and no payment provider is installed alongside it — send
79
+ the user to the same dashboard page the handoff call names. A note that Base44 Payments /
80
+ Wix Payments is unavailable in their region is about a provider installed into the app, and
81
+ says nothing about their store's checkout.
76
82
 
77
83
  ## Additional Wix functionality
78
84
 
@@ -1,115 +0,0 @@
1
- # No machine: the kit's run through the Wix APIs
2
-
3
- Read when you cannot run the commands this skill is built on: no shell, no file system, no Node, a
4
- sandbox that blocks the install, the CLI or the login, or a host that only talks to Wix through
5
- the Wix MCP. Nothing in this guide installs, downloads or runs anything. It walks the run of
6
- SKILL.md step by step and names, for each, the Wix API call the CLI or the script performs, and
7
- the file beside this skill that carries the contract.
8
-
9
- ## Where these skills are
10
-
11
- This skill is one of a set, and the guide reads from three of them:
12
-
13
- - `<SKILL_ROOT>` — this skill, `wix-headless-kit`: the run, its guides, the Verticals table.
14
- - `<TEMPLATES>` — `wix-headless-templates`: the shipped, verified code per Wix Business Solution,
15
- one folder each, with its `INSTRUCTIONS.md` (the contracts), `seed/` (the seed script and
16
- `SEED.md`) and `rest/` (the data layer over plain `fetch`). Installed beside this skill, or
17
- fetched to `<SKILL_ROOT>/templates/`.
18
- - `<MANAGE>` — `wix-manage`: REST recipes to configure and manage a site's business solutions, one
19
- recipe per operation with the exact endpoint and payload; its `SKILL.md` is the index.
20
- - `<DOCS>` — `wix-docs`: how to look up the Wix API and SDK documentation and confirm a method's
21
- exact shape before writing a call.
22
-
23
- They install together and sit beside each other. When you are reading this skill online rather
24
- than from an install, the others are published alongside it, by those names, and each skill's
25
- manifest lists its files. Read each file in full: a fetch tool that summarizes drops the exact
26
- calls and shapes; a tool that returns the file's text, or one that runs code and can fetch a URL,
27
- does not.
28
-
29
- Two things such a run does not produce, and never claims: a frontend built from the shipped `app/`
30
- code (that needs a build), and a release of one. Everything else the kit does to a site, it does
31
- through calls you can make.
32
-
33
- ## 0. Identity
34
-
35
- Every call below runs as the site owner, with whatever identity your host gives you: the Wix
36
- MCP's `ExecuteWixAPI` carries the user's login; an API key from the user's account goes in the
37
- `Authorization` header of any call, as `<MANAGE>/SKILL.md` describes; a site token from the Wix CLI
38
- works the same way when the user runs the CLI for you. The site's OAuth app (`client_id`) mints
39
- visitor tokens only, which cover what a visitor may see and nothing here.
40
-
41
- ## 1. The brief → the solutions
42
-
43
- Unchanged from SKILL.md step 2 and its Verticals table: the brief names the business, the table
44
- names the solutions it needs. Read each solution's `<TEMPLATES>/<solution>/INSTRUCTIONS.md` for
45
- what it covers and `<TEMPLATES>/<solution>/seed/SEED.md` for what a seeded site holds.
46
-
47
- ## 2. The site
48
-
49
- The CLI's `npm create @wix/new` is one call: `POST /headless-business-setup/v1/headless-business/provision`,
50
- with `origin: agent-<your-id>`, a name, and the solutions to install as `seedOptions`. The recipe
51
- is `<MANAGE>/references/sites/create-headless-site.md`; it returns the `metaSiteId` and the
52
- site's OAuth client `appId`. Do not create a site any other way: a project from Create Project or
53
- a template is neither headless nor publishable, and a later run with a machine cannot attach to it.
54
-
55
- A site that already exists (the brief names it) is read first, never seeded unasked: SKILL.md
56
- step 2 and `<SKILL_ROOT>/guides/existing-site.md` apply as written.
57
-
58
- ## 3. The apps
59
-
60
- A solution the provision call did not install, or a capability's app (Members Area, Forms,
61
- Restaurants, Donations, FAQ), goes on with the Apps Installer:
62
- `<MANAGE>/references/app-installation/install-wix-apps.md`. The app ids are in each
63
- `seed-<solution>.mjs`, which installs them before seeding.
64
-
65
- ## 4. The seed
66
-
67
- `seed-<solution>.mjs` is a sequence of REST calls, and `SEED.md` is its contract: the plan shape
68
- (what to create, how many, which images), the order the entities need, and the traps the script
69
- encodes (a Bookings service needs a category to be visible and takes resource ids, not staff ids;
70
- a Forms field is registered by its `validation` block; a product's choice photos are linked after
71
- the gallery holds them). Read `SEED.md`, read the script for any call `SEED.md` only names, and make the same
72
- calls through `<MANAGE>`'s recipe for each (services, products, posts, events, collections). Keep
73
- the script's rules: create, never delete, and report what the site already held. Image prompts
74
- need the Media Manager; without it, products and services stay text-only, say so.
75
-
76
- ## 5. The frontend
77
-
78
- The shipped `app/` code cannot be built here, and the Astro pages cannot be released. A page can
79
- still be shipped: one self-contained `index.html` that loads the Wix SDK from a package CDN and
80
- talks to the site as a visitor, dropped onto the site from step 2 through
81
- `<MANAGE>/references/sites/upload-static-site.md`. The kit's own frontend for this site is a run
82
- with a machine, which attaches to this site (`guides/existing-site.md`) rather than making a new one.
83
-
84
- **The page.** One file, a few hundred lines, written in full before the first drop: the drop takes
85
- the complete file set in one call, and a response has a hard size limit, so there is no second
86
- pass. The SDK comes from a pinned package URL, `https://esm.sh/@wix/sdk@<version>` and the
87
- solution's package (`@wix/bookings`, `@wix/stores`, `@wix/blog`, …); the client is
88
- `createClient({ modules: { … }, auth: OAuthStrategy({ clientId }) })` with the `appId` the provision
89
- call returned, and the SDK mints and refreshes the visitor token itself. Markup, a render function
90
- per state, the event handlers: that is what you write. Keep what the page shows to what the site
91
- holds; nothing invented, as in SKILL.md step 4.
92
-
93
- **The calls.** Take every SDK call's shape from the kit's own transport for the solution,
94
- `<TEMPLATES>/<solution>/app/wix/<solution>/*.ts` (`services.ts`, `booking.ts`, `catalog.ts`, …,
95
- with `<TEMPLATES>/shared/app/wix/sdk.ts` for the client wiring): those files call the same SDK
96
- modules the page imports, and they are verified. Copy the form of the call, not the file. The
97
- cores beside them (`*-core.ts`) hold the rules the page needs and nothing else does: which fields
98
- to read, how a price or a duration is formatted, which slot is bookable, how an id is read.
99
-
100
- **A call those files don't cover** is confirmed before it is written, the way `<DOCS>` describes:
101
- the method's SDK page, and when the page and the package disagree, the package's own type
102
- declarations (the `@wix/auto_sdk_<solution>_<module>` package the solution package depends on,
103
- its `index.d.ts`) are the truth. Two shapes that recur, as examples of what the types settle and
104
- the kit's files already encode: SDK query methods return a query builder finished with `.find()`;
105
- and an entity's id arrives as `_id` on some objects and `id` on others (the kit reads both,
106
- `rawId`). Dates travel as local
107
- wall-clock strings in the business time zone. A page cannot be run here, so a wrong shape fails
108
- silently in the browser; the file beside the skill is the check that is available.
109
-
110
- ## 6. Closing
111
-
112
- As in SKILL.md step 5, minus the live URL when nothing was released: what exists on the site, by
113
- name; the dashboard link `https://manage.wix.com/dashboard/<metaSiteId>` and each solution's own
114
- pages from its INSTRUCTIONS.md table; what is placeholder; payments, when the site takes money;
115
- and what this run could not do, with the site id, so a run with a machine continues here.
@@ -1,243 +0,0 @@
1
- ---
2
- name: "Create Appointment Service"
3
- description: "Create an appointment booking service — e.g. 'set up consultations', 'create a 1-on-1 session', 'add a personal training appointment', 'create a meeting service for $25'. Handles staff assignment (required), session duration, pricing, and 1-on-1 capacity defaults via bulkCreateServices API."
4
- ---
5
-
6
- # Create Appointment Service from Prompt
7
-
8
- ## When to Use
9
-
10
- - User wants to create an appointment-based service: "set up consultations", "create a 1-on-1 session", "add a personal training appointment", "create a meeting service"
11
- - The service type is APPOINTMENT — customer picks an available time slot during staff working hours
12
- - For general service creation where the type is ambiguous, see [Create Booking Service from Prompt](./create-booking-service-from-prompt.md)
13
-
14
- ## Prerequisites
15
-
16
- - For full API field definitions, validation rules, and troubleshooting, see [Create and Update Booking Services](./create-and-update-booking-services.md)
17
-
18
- ---
19
-
20
- ## Step 1: Gather Business Context
21
-
22
- Run these queries to collect site data for informed defaults.
23
-
24
- ### 1a. Query Staff Members (CRITICAL for Appointments)
25
-
26
- ```bash
27
- curl -X POST 'https://www.wixapis.com/bookings/v1/staff-members/query' \
28
- -H 'Authorization: <AUTH>' \
29
- -H 'Content-Type: application/json' \
30
- -d '{
31
- "query": {},
32
- "fields": ["RESOURCE_DETAILS"]
33
- }'
34
- ```
35
-
36
- Save each staff member's `resourceId` (not `id`). Note which one has `default: true`.
37
-
38
- **APPOINTMENT services REQUIRE at least one staff member.** If no staff members exist, create one first using [Bookings Staff Setup](./bookings-staff-setup.md).
39
-
40
- ### 1b. Query Service Categories
41
-
42
- ```bash
43
- curl -X POST 'https://www.wixapis.com/bookings/v2/categories/query' \
44
- -H 'Authorization: <AUTH>' \
45
- -H 'Content-Type: application/json' \
46
- -d '{ "query": {} }'
47
- ```
48
-
49
- ### 1c. Query Existing Services (Duplicate Check)
50
-
51
- ```bash
52
- curl -X POST 'https://www.wixapis.com/bookings/v2/services/query' \
53
- -H 'Authorization: <AUTH>' \
54
- -H 'Content-Type: application/json' \
55
- -d '{ "query": { "paging": { "limit": 100 } } }'
56
- ```
57
-
58
- Warn the user if a service with a similar name already exists.
59
-
60
- ---
61
-
62
- ## Step 2: Apply Appointment Defaults
63
-
64
- For any fields the user did not explicitly specify:
65
-
66
- | Field | Default | Notes |
67
- |---|---|---|
68
- | Duration | 60 minutes | Set via `schedule.availabilityConstraints.sessionDurations` |
69
- | Capacity | 1 | Appointments are typically 1-on-1 |
70
- | Staff | Auto-assign | Use `default: true` staff, or first available |
71
- | Online booking | Enabled | `onlineBooking.enabled: true` |
72
-
73
- ### Pricing (if not specified)
74
-
75
- - If user specifies a price → `rateType: "FIXED"`
76
- - If user says "free" → `rateType: "NO_FEE"`, `options.inPerson: true`, `options.online: false`
77
- - If no price mentioned → infer from context (consultations ~$50-100, sessions ~$30-60) or default to free
78
-
79
- ### Staff Assignment
80
-
81
- - **1 staff member** → auto-assign using their `resourceId`
82
- - **Multiple staff members** → use the one with `default: true`, or the first one
83
- - **No staff members** → create one first using [Bookings Staff Setup](./bookings-staff-setup.md), then proceed
84
-
85
- ### Category
86
-
87
- - If categories exist → assign the most relevant one
88
- - If no categories exist → create a "General" category:
89
- ```bash
90
- curl -X POST 'https://www.wixapis.com/bookings/v2/categories' \
91
- -H 'Authorization: <AUTH>' \
92
- -H 'Content-Type: application/json' \
93
- -d '{ "category": { "name": "General" } }'
94
- ```
95
-
96
- ### Service Name & Description
97
-
98
- - Use the user's wording for the service name
99
- - Generate a brief, professional description (1-2 sentences)
100
-
101
- ---
102
-
103
- ## Step 3: Create the Appointment Service
104
-
105
- **Paid appointment:**
106
-
107
- ```bash
108
- curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
109
- -H 'Authorization: <AUTH>' \
110
- -H 'Content-Type: application/json' \
111
- -d '{
112
- "returnEntity": true,
113
- "services": [{
114
- "name": "<SERVICE_NAME>",
115
- "description": "<GENERATED_DESCRIPTION>",
116
- "type": "APPOINTMENT",
117
-
118
- "onlineBooking": { "enabled": true },
119
- "staffMemberIds": ["<RESOURCE_ID>"],
120
- "schedule": {
121
- "availabilityConstraints": {
122
- "sessionDurations": [<DURATION_MINUTES>]
123
- }
124
- },
125
- "payment": {
126
- "rateType": "FIXED",
127
- "options": { "online": true, "inPerson": false },
128
- "fixed": {
129
- "price": { "value": "<PRICE>" }
130
- }
131
- },
132
- "category": {
133
- "id": "<CATEGORY_ID>"
134
- }
135
- }]
136
- }'
137
- ```
138
-
139
- **Free appointment:**
140
-
141
- ```bash
142
- curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
143
- -H 'Authorization: <AUTH>' \
144
- -H 'Content-Type: application/json' \
145
- -d '{
146
- "returnEntity": true,
147
- "services": [{
148
- "name": "<SERVICE_NAME>",
149
- "description": "<GENERATED_DESCRIPTION>",
150
- "type": "APPOINTMENT",
151
-
152
- "onlineBooking": { "enabled": true },
153
- "staffMemberIds": ["<RESOURCE_ID>"],
154
- "schedule": {
155
- "availabilityConstraints": {
156
- "sessionDurations": [<DURATION_MINUTES>]
157
- }
158
- },
159
- "payment": {
160
- "rateType": "NO_FEE",
161
- "options": { "online": false, "inPerson": true }
162
- },
163
- "category": {
164
- "id": "<CATEGORY_ID>"
165
- }
166
- }]
167
- }'
168
- ```
169
-
170
- ### APPOINTMENT-Specific Reminders
171
-
172
- - `staffMemberIds` is **required** — uses `resourceId` values, not staff member `id`
173
- - `schedule.availabilityConstraints.sessionDurations` sets the appointment length
174
- - Availability is based on the assigned staff member's working hours schedule
175
-
176
- Save the `serviceId` from the response: `results[0].item.id` (the created service is directly under `item` — there is no `item.service`). This requires `returnEntity: true` on the request; without it the response carries only `results[0].itemMetadata.id`.
177
-
178
- ---
179
-
180
- ## Step 4: Summary Message
181
-
182
- Provide a summary including:
183
-
184
- 1. **What was created** — service name, price, duration, assigned staff member
185
- 2. **Assumptions made** — list defaults used (e.g., "I set the duration to 60 minutes since you didn't specify")
186
- 3. **Next steps** — "Click Save to finalize, then set up your availability"
187
- 4. **Offer to adjust** — "Want me to change the price, duration, or staff assignment?"
188
-
189
- **Example:**
190
-
191
- > I created **"Strategy Consultation"**:
192
- >
193
- > - **Type**: Appointment (1-on-1)
194
- > - **Price**: $75 per session
195
- > - **Duration**: 60 minutes
196
- > - **Staff**: Assigned to Sarah Johnson
197
- > - **Category**: Consulting
198
- >
199
- > I assumed a 60-minute duration since you didn't specify. You can review and adjust the details in the service form.
200
-
201
- ---
202
-
203
- ## Error Handling
204
-
205
- | Error | Cause | Action |
206
- |---|---|---|
207
- | 400 "staffMemberIds required" | No staff assigned | Query staff; if none exist, create one via [Bookings Staff Setup](./bookings-staff-setup.md) |
208
- | 400 "INVALID_PAYMENT_OPTIONS" | Payment misconfigured | Free: `inPerson: true`, `online: false`. Paid: price > 0 |
209
- | 403 | Permission denied | Inform user they lack permission |
210
-
211
- ---
212
-
213
- ## Payment Validation Quick Reference
214
-
215
- | rateType | `options.online` | `options.inPerson` | Valid? |
216
- |----------|------------------|-------------------|--------|
217
- | FIXED | true | false | ✓ |
218
- | FIXED | false | true | ✓ |
219
- | FIXED | true | true | ✓ |
220
- | NO_FEE | false | true | ✓ |
221
- | NO_FEE | true | false | ✗ |
222
- | Any | false | false | ✗ |
223
-
224
- ---
225
-
226
- ## What This Skill Does NOT Cover
227
-
228
- - **Schedule/availability setup** — staff working hours need separate configuration. See [Bookings Staff Setup](./bookings-staff-setup.md)
229
- - **Pricing plans** — memberships and session packs are separate. See [Create and Update Pricing Plans](../pricing-plans/create-and-update-pricing-plans.md)
230
- - **Service images** — requires Media Manager API (see [create-and-update-booking-services.md](./create-and-update-booking-services.md))
231
-
232
- ---
233
-
234
- ## API Documentation Reference
235
-
236
- - [Bulk Create Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services)
237
- - [Query Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services)
238
- - [Query Categories](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/query-categories)
239
- - [Create Category](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/create-category)
240
- - [Query Staff Members](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/query-staff-members)
241
- - [Create Staff Member](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/create-staff-member)
242
- - [About Service Types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types)
243
- - [About Service Payments](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments)
@@ -1,31 +0,0 @@
1
- ---
2
- name: "Create Booking Service from Prompt"
3
- description: "Create a booking service from a user prompt — e.g. 'create a yoga class for $50', 'set up consultations for $75', 'add a personal training appointment', 'create a 6-week photography workshop', 'create a hidden free test course with 8 online sessions'. Determines the service type (APPOINTMENT, CLASS, or COURSE) and delegates to the type-specific recipe. For COURSE services with session dates/counts, follow the course recipe's separate Calendar bulkCreateEvents step; Services V2 alone does not create bookable course sessions."
4
- ---
5
-
6
- # Create Booking Service from Natural Language Prompt
7
-
8
- ## When to Use
9
-
10
- - User describes a service they want to create using natural language (e.g., "create a yoga class for $50", "set up consultation sessions", "add a personal training appointment", "create a hidden free test course with 8 online sessions")
11
- - The intent is autonomous creation — fill in reasonable defaults rather than asking the user for every field
12
-
13
- ## Step 1: Determine Service Type
14
-
15
- | User mentions | Type | Recipe |
16
- |---|---|---|
17
- | consultation, appointment, meeting, 1-on-1, one-on-one, session | `APPOINTMENT` | [Create Appointment Service](./create-appointment-service.md) |
18
- | class, yoga, pilates, group session, group workout, bootcamp class | `CLASS` | [Create Class Service](./create-class-service.md) |
19
- | workshop, program, course, training program, multi-session, fixed series, 8 sessions | `COURSE` | [Create Course Service](./create-course-service.md) |
20
- | (unclear or unspecified) | `APPOINTMENT` | [Create Appointment Service](./create-appointment-service.md) |
21
-
22
- ## Step 2: Follow the Type-Specific Recipe
23
-
24
- Once the service type is determined, follow the corresponding recipe linked above. Each recipe covers:
25
-
26
- 1. Gathering business context (staff where required, categories, duplicate check)
27
- 2. Applying type-specific defaults (pricing, capacity, duration, staff assignment)
28
- 3. Creating the service via `bulkCreateServices`
29
- 4. For COURSE services with session dates/counts, creating separate Calendar events via `bulkCreateEvents` on the returned `service.schedule.id`
30
- 5. Navigating to the service form for user review
31
- 6. Providing a summary of what was created and assumptions made
@@ -1,222 +0,0 @@
1
- ---
2
- name: "Create Class Service"
3
- description: "Create a class booking service — e.g. 'create a yoga class for $50', 'set up a pilates class', 'add a group fitness session', 'create a weekly meditation class'. Handles group capacity, recurring session defaults, and pricing via bulkCreateServices API. Staff assignment is not used for classes."
4
- ---
5
-
6
- # Create Class Service from Prompt
7
-
8
- ## When to Use
9
-
10
- - User wants to create a group class: "create a yoga class", "set up a pilates class", "add a group fitness session", "create a weekly meditation class"
11
- - The service type is CLASS — a single event or recurring series that multiple customers can book
12
- - Customers can sign up for one, several, or all sessions in a class series
13
- - For general service creation where the type is ambiguous, see [Create Booking Service from Prompt](./create-booking-service-from-prompt.md)
14
-
15
- ## Prerequisites
16
-
17
- - For full API field definitions, validation rules, and troubleshooting, see [Create and Update Booking Services](./create-and-update-booking-services.md)
18
-
19
- ---
20
-
21
- ## Step 1: Gather Business Context
22
-
23
- Run these queries to collect site data for informed defaults.
24
-
25
- ### 1a. Query Service Categories
26
-
27
- ```bash
28
- curl -X POST 'https://www.wixapis.com/bookings/v2/categories/query' \
29
- -H 'Authorization: <AUTH>' \
30
- -H 'Content-Type: application/json' \
31
- -d '{ "query": {} }'
32
- ```
33
-
34
- ### 1b. Query Existing Services (Duplicate Check)
35
-
36
- ```bash
37
- curl -X POST 'https://www.wixapis.com/bookings/v2/services/query' \
38
- -H 'Authorization: <AUTH>' \
39
- -H 'Content-Type: application/json' \
40
- -d '{ "query": { "paging": { "limit": 100 } } }'
41
- ```
42
-
43
- Warn the user if a service with a similar name already exists.
44
-
45
- > **Note:** Staff queries are optional for CLASS services since `staffMemberIds` is ignored by the API. However, querying staff can still be useful for context (e.g., mentioning instructors in the description).
46
-
47
- ---
48
-
49
- ## Step 2: Apply Class Defaults
50
-
51
- For any fields the user did not explicitly specify:
52
-
53
- | Field | Default | Notes |
54
- |---|---|---|
55
- | Capacity | 10 | `defaultCapacity` — required for CLASS |
56
- | Online booking | Enabled | `onlineBooking.enabled: true` |
57
-
58
- ### Pricing (if not specified)
59
-
60
- - If user specifies a price → `rateType: "FIXED"` (per session)
61
- - If user says "free" → `rateType: "NO_FEE"`, `options.inPerson: true`, `options.online: false`
62
- - If no price mentioned → infer from context (yoga/fitness classes ~$15-30, art/music ~$20-40) or default to free
63
-
64
- ### Capacity (if not specified)
65
-
66
- - Default: 10 participants
67
- - If user mentions capacity (e.g., "small group of 6", "up to 20") → use their number
68
- - Typical ranges: small group 4-8, standard 10-20, large 20-50
69
-
70
- ### Category
71
-
72
- - If categories exist → assign the most relevant one (e.g., "Fitness", "Wellness")
73
- - If no categories exist → create one:
74
- ```bash
75
- curl -X POST 'https://www.wixapis.com/bookings/v2/categories' \
76
- -H 'Authorization: <AUTH>' \
77
- -H 'Content-Type: application/json' \
78
- -d '{ "category": { "name": "General" } }'
79
- ```
80
-
81
- ### Service Name & Description
82
-
83
- - Use the user's wording for the service name
84
- - Generate a brief, professional description (1-2 sentences) mentioning it's a group class
85
-
86
- ---
87
-
88
- ## Step 3: Create the Class Service
89
-
90
- **CRITICAL: CLASS services do NOT use `staffMemberIds` or `sessionDurations`.** These fields are ignored. Use `defaultCapacity` instead.
91
-
92
- **Paid class:**
93
-
94
- ```bash
95
- curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
96
- -H 'Authorization: <AUTH>' \
97
- -H 'Content-Type: application/json' \
98
- -d '{
99
- "returnEntity": true,
100
- "services": [{
101
- "name": "<SERVICE_NAME>",
102
- "description": "<GENERATED_DESCRIPTION>",
103
- "type": "CLASS",
104
-
105
- "onlineBooking": { "enabled": true },
106
- "defaultCapacity": <CAPACITY>,
107
- "payment": {
108
- "rateType": "FIXED",
109
- "options": { "online": true, "inPerson": false },
110
- "fixed": {
111
- "price": { "value": "<PRICE>" }
112
- }
113
- },
114
- "category": {
115
- "id": "<CATEGORY_ID>"
116
- }
117
- }]
118
- }'
119
- ```
120
-
121
- **Free class:**
122
-
123
- ```bash
124
- curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
125
- -H 'Authorization: <AUTH>' \
126
- -H 'Content-Type: application/json' \
127
- -d '{
128
- "returnEntity": true,
129
- "services": [{
130
- "name": "<SERVICE_NAME>",
131
- "description": "<GENERATED_DESCRIPTION>",
132
- "type": "CLASS",
133
-
134
- "onlineBooking": { "enabled": true },
135
- "defaultCapacity": <CAPACITY>,
136
- "payment": {
137
- "rateType": "NO_FEE",
138
- "options": { "online": false, "inPerson": true }
139
- },
140
- "category": {
141
- "id": "<CATEGORY_ID>"
142
- }
143
- }]
144
- }'
145
- ```
146
-
147
- ### CLASS-Specific Reminders
148
-
149
- - Do **NOT** include `staffMemberIds` — it is ignored for CLASS services
150
- - Do **NOT** include `schedule.availabilityConstraints.sessionDurations` — not used for CLASS
151
- - `defaultCapacity` is **required** — sets max participants per session
152
- - After creation, class sessions must be scheduled separately via `bulkCreateEvents` using the returned `service.schedule.id` (see [Create and Update Booking Services](./create-and-update-booking-services.md))
153
-
154
- **Response:** Save the service ID from `results[0].item.id` and the schedule ID for `bulkCreateEvents` from `results[0].item.schedule.id` (the created service is directly under `item`). This requires `returnEntity: true` on the request — without it the response carries only `results[0].itemMetadata.id`, which has no `schedule.id`.
155
-
156
- ---
157
-
158
- ## Step 4: Summary Message
159
-
160
- Provide a summary including:
161
-
162
- 1. **What was created** — service name, price per session, capacity
163
- 2. **Assumptions made** — list defaults used (e.g., "I set the capacity to 10 participants since you didn't specify")
164
- 3. **Schedule note** — remind the user that class sessions still need to be scheduled
165
- 4. **Next steps** — "Click Save to finalize, then set up the class schedule"
166
- 5. **Offer to adjust** — "Want me to change the price, capacity, or description?"
167
-
168
- **Example:**
169
-
170
- > I created **"Vinyasa Yoga Class"**:
171
- >
172
- > - **Type**: Class (group session)
173
- > - **Price**: $25 per session
174
- > - **Capacity**: 10 participants
175
- > - **Category**: Fitness
176
- >
177
- > I assumed a capacity of 10 since you didn't specify. You can review and adjust the details in the service form.
178
- >
179
- > **Next step:** You'll need to set up the class schedule (days and times) in the service form.
180
-
181
- ---
182
-
183
- ## Error Handling
184
-
185
- | Error | Cause | Action |
186
- |---|---|---|
187
- | 400 "INVALID_PAYMENT_OPTIONS" | Payment misconfigured | Free: `inPerson: true`, `online: false`. Paid: price > 0 |
188
- | 403 | Permission denied | Inform user they lack permission |
189
-
190
- ---
191
-
192
- ## Payment Validation Quick Reference
193
-
194
- | rateType | `options.online` | `options.inPerson` | Valid? |
195
- |----------|------------------|-------------------|--------|
196
- | FIXED | true | false | ✓ |
197
- | FIXED | false | true | ✓ |
198
- | FIXED | true | true | ✓ |
199
- | NO_FEE | false | true | ✓ |
200
- | NO_FEE | true | false | ✗ |
201
- | Any | false | false | ✗ |
202
-
203
- ---
204
-
205
- ## What This Skill Does NOT Cover
206
-
207
- - **Class schedule setup** — recurring events (days/times) must be configured separately via Calendar Events API. See [Create and Update Booking Services](./create-and-update-booking-services.md) Step 3.
208
- - **Pricing plans** — memberships and class packs are separate. See [Create and Update Pricing Plans](../pricing-plans/create-and-update-pricing-plans.md)
209
- - **Instructor assignment** — `staffMemberIds` is ignored for CLASS. Staff association is managed through calendar events.
210
- - **Service images** — requires Media Manager API (see [create-and-update-booking-services.md](./create-and-update-booking-services.md))
211
-
212
- ---
213
-
214
- ## API Documentation Reference
215
-
216
- - [Bulk Create Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services)
217
- - [Query Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services)
218
- - [Query Categories](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/query-categories)
219
- - [Create Category](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/create-category)
220
- - [Bulk Create Events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/bulk-create-event)
221
- - [About Service Types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types)
222
- - [About Service Payments](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments)