@wix/agent-skills 1.31.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.
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +7 -8
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +11 -50
- package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +14 -10
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +5 -8
- package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +5 -4
- package/skills/wix-headless-kit/SKILL.md +15 -7
- package/skills/wix-headless-kit/guides/api-run.md +81 -26
- package/skills/wix-headless-kit/guides/existing-site.md +3 -2
- package/skills/wix-headless-kit/guides/reference-mode.md +9 -1
- package/skills/wix-headless-kit/install/AGENTS.md +7 -5
- package/skills/wix-headless-kit/install/attach.mjs +3 -3
- package/skills/wix-headless-kit/install/context.mjs +13 -3
- package/skills/wix-headless-kit/install/deploy.mjs +3 -3
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-headless-kit/install/setup.mjs +2 -2
- package/skills/wix-headless-kit/install/templates.mjs +2 -1
- package/skills/wix-headless-templates/blog/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +2 -2
- package/skills/wix-headless-templates/bookings/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +2 -1
- package/skills/wix-headless-templates/donations/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +3 -2
- package/skills/wix-headless-templates/events/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +3 -2
- package/skills/wix-headless-templates/portfolio/seed/SEED.md +4 -2
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +6 -6
- package/skills/wix-headless-templates/rentals/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +2 -1
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +4 -3
- package/skills/wix-headless-templates/shared/seed/images.mjs +41 -5
- package/skills/wix-headless-templates/storefront/seed/SEED.md +17 -5
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +21 -14
- package/skills/wix-manage/SKILL.md +25 -15
- package/skills/wix-manage/references/automations/activation-status.md +52 -0
- package/skills/wix-manage/references/automations/api-catalog.md +81 -0
- package/skills/wix-manage/references/automations/build-and-manage-automations.md +34 -0
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +277 -363
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +3 -1
- package/skills/wix-manage/references/sites/send-feedback-to-wix.md +92 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +258 -279
- package/skills/wix-manage/references/bookings/create-appointment-service.md +0 -243
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +0 -31
- package/skills/wix-manage/references/bookings/create-class-service.md +0 -222
- package/skills/wix-manage/references/bookings/create-course-service.md +0 -251
|
@@ -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)
|