@wix/agent-skills 1.15.0 → 1.15.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/README.md +8 -0
- package/package.json +1 -1
- package/skills/wix-app/references/DATA_COLLECTION.md +5 -3
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -0
- package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +151 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +6 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +3 -1
- package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
- package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
- package/skills/wix-app/references/stores/INVENTORY.md +37 -0
- package/skills/wix-app/references/stores/QUERY.md +87 -0
- package/skills/wix-app/references/stores/WRITE.md +55 -0
- package/skills/wix-headless/SKILL.md +6 -1
- package/skills/wix-headless/entry/bootstrap.mjs +2 -2
- package/skills/wix-headless/entry/skill.md +0 -2
- package/skills/wix-headless/references/CAPABILITIES.md +6 -4
- package/skills/wix-headless/references/DISCOVERY.md +1 -1
- package/skills/wix-headless/references/FEEDBACK.md +16 -5
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
- package/skills/wix-headless/references/SEED.md +3 -1
- package/skills/wix-headless/references/SETUP.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +42 -2
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +21 -5
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
- package/skills/wix-headless/references/managed/CONNECT.md +1 -1
- package/skills/wix-headless/references/managed/CREATE.md +1 -1
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +22 -0
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
- package/skills/wix-manage/SKILL.md +8 -5
- package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
- package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +76 -42
- package/skills/wix-manage/references/cms/cms-schema-management.md +6 -0
- package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +225 -144
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
- package/skills/wix-manage/references/sites/site-import.md +270 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
- package/skills/wix-vibe-headless/SKILL.md +6 -0
- package/skills/wix-vibe-headless/platforms/README.md +22 -0
- package/skills/wix-vibe-headless/platforms/base44.md +142 -0
- package/skills/wix-vibe-headless/platforms/generic.md +87 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +5 -1
- package/skills/wix-vibe-headless/references/bookings/wix-bookings-services.js +3 -1
- package/skills/wix-vibe-headless/references/events/wix-events-browse.js +2 -1
- package/skills/wix-vibe-headless/references/portfolio/wix-portfolio.js +84 -55
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +11 -2
- package/skills/wix-vibe-headless/references/storefront/wix-store-catalog.js +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Create Course Service"
|
|
3
|
-
description: "Create a course booking service — e.g. 'create a 6-week photography workshop', 'set up a training program', 'add a bootcamp course for $300', 'create a
|
|
3
|
+
description: "Create a course booking service — e.g. 'create a 6-week photography workshop', 'set up a training program', 'add a bootcamp course for $300', 'create a hidden free test course with 8 sessions'. Handles group capacity, full-course pricing, bulkCreateServices, and separate course session events via bulkCreateEvents. Staff assignment is not used for courses."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create Course Service from Prompt
|
|
@@ -8,6 +8,7 @@ description: "Create a course booking service — e.g. 'create a 6-week photogra
|
|
|
8
8
|
## When to Use
|
|
9
9
|
|
|
10
10
|
- User wants to create a multi-session course: "create a training program", "set up a 6-week workshop", "add a bootcamp course", "create a teacher training course"
|
|
11
|
+
- User wants a free or hidden test COURSE with specific session dates/counts, such as "create a hidden free test course with 8 online sessions"
|
|
11
12
|
- The service type is COURSE — a fixed series with pre-defined start and end dates
|
|
12
13
|
- Customers must book the entire course (all sessions), unlike CLASS where they can pick individual sessions
|
|
13
14
|
- For general service creation where the type is ambiguous, see [Create Booking Service from Prompt](./create-booking-service-from-prompt.md)
|
|
@@ -91,6 +92,8 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/categories' \
|
|
|
91
92
|
|
|
92
93
|
**CRITICAL: COURSE services do NOT use `staffMemberIds` or `sessionDurations`.** These fields are ignored. Use `defaultCapacity` instead.
|
|
93
94
|
|
|
95
|
+
Do not put session dates under `course.sessions`, `CourseSession`, or any similar nested field in the Services V2 create/update payload. Services V2 creates the course service and returns a `service.schedule.id`; it does not create bookable course sessions from nested `course` data. A course with no Calendar events can be created successfully but appear as ended or unavailable on the service page.
|
|
96
|
+
|
|
94
97
|
**Paid course:**
|
|
95
98
|
|
|
96
99
|
```bash
|
|
@@ -148,23 +151,44 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
148
151
|
|
|
149
152
|
- Do **NOT** include `staffMemberIds` — it is ignored for COURSE services
|
|
150
153
|
- Do **NOT** include `schedule.availabilityConstraints.sessionDurations` — not used for COURSE
|
|
154
|
+
- Do **NOT** include `course.sessions` or inferred `CourseSession` objects in the service payload — accepted or ignored nested course data does not make sessions bookable
|
|
151
155
|
- `defaultCapacity` is **required** — sets max participants for the entire course
|
|
152
156
|
- Customers must book the **entire course** (all sessions), not individual sessions
|
|
153
157
|
- After creation, course 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))
|
|
158
|
+
- If the user asked you to create the course and gave the session count/times, the job is not complete after `bulkCreateServices`; continue by creating the Calendar events, then verify the service has future events before telling the user it is ready
|
|
154
159
|
|
|
155
160
|
Save the `serviceId` from the response: `results[0].item.service.id`
|
|
161
|
+
Save the `service.schedule.id` from the response for the follow-up `bulkCreateEvents` request.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Step 4: Create Course Session Events
|
|
166
|
+
|
|
167
|
+
If the user specified session dates, times, or a session count, create the course events immediately after the service exists:
|
|
168
|
+
|
|
169
|
+
1. Read `results[0].item.schedule.id` from the service create response.
|
|
170
|
+
2. Query or create the resource/staff member that should appear on the course events and use its `resourceId`.
|
|
171
|
+
3. Call `bulkCreateEvents` (`POST https://www.wixapis.com/calendar/v3/bulk/events/create`) with one event per course session.
|
|
172
|
+
4. For each event, set:
|
|
173
|
+
- `event.scheduleId` to the course service's `service.schedule.id`
|
|
174
|
+
- `event.type` to `COURSE`
|
|
175
|
+
- `event.resources` to at least one resource object using a valid `resourceId`
|
|
176
|
+
- start/end fields for the session time
|
|
177
|
+
5. Query the service/calendar events afterward to confirm future events exist before saying the course is bookable.
|
|
178
|
+
|
|
179
|
+
If the session details are missing, create only the service and clearly tell the user that the course still needs session events before it can be booked.
|
|
156
180
|
|
|
157
181
|
---
|
|
158
182
|
|
|
159
|
-
## Step
|
|
183
|
+
## Step 5: Summary Message
|
|
160
184
|
|
|
161
185
|
Provide a summary including:
|
|
162
186
|
|
|
163
187
|
1. **What was created** — service name, total course price, capacity
|
|
164
188
|
2. **Assumptions made** — list defaults used (e.g., "I set the capacity to 10 participants since you didn't specify")
|
|
165
189
|
3. **Pricing clarification** — note that the price is for the entire course, not per session
|
|
166
|
-
4. **Schedule
|
|
167
|
-
5. **Next steps** —
|
|
190
|
+
4. **Schedule status** — say whether course session events were created and verified; do not say the course is bookable if only the service exists
|
|
191
|
+
5. **Next steps** — if events were not created, tell the user to provide session dates/times or set up the course schedule
|
|
168
192
|
6. **Offer to adjust** — "Want me to change the price, capacity, or description?"
|
|
169
193
|
|
|
170
194
|
**Example:**
|
|
@@ -178,7 +202,7 @@ Provide a summary including:
|
|
|
178
202
|
>
|
|
179
203
|
> I assumed a capacity of 10 since you didn't specify. The price of $300 covers the entire course — customers pay once for all sessions. You can review and adjust the details in the service form.
|
|
180
204
|
>
|
|
181
|
-
> **Next step:** You'll need to set up the course schedule (specific session dates and times)
|
|
205
|
+
> **Next step:** You'll need to set up the course schedule (specific session dates and times) before customers can book it.
|
|
182
206
|
|
|
183
207
|
---
|
|
184
208
|
|
|
@@ -187,6 +211,7 @@ Provide a summary including:
|
|
|
187
211
|
| Error | Cause | Action |
|
|
188
212
|
|---|---|---|
|
|
189
213
|
| 400 "INVALID_PAYMENT_OPTIONS" | Payment misconfigured | Free: `inPerson: true`, `online: false`. Paid: price > 0 |
|
|
214
|
+
| Course page says "Ended", "Beendet", or "This service is not available" after service creation | Service exists but no future course events were created on `service.schedule.id` | Create course events via Calendar Events `bulkCreateEvents`, then verify future events exist |
|
|
190
215
|
| 403 | Permission denied | Inform user they lack permission |
|
|
191
216
|
|
|
192
217
|
---
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: "
|
|
3
|
-
description: "
|
|
2
|
+
name: "Check Bookings Availability (and Diagnose Issues)"
|
|
3
|
+
description: "Answers whether an appointment-based Wix Bookings service currently has bookable availability — the primary question — and diagnoses the cause only when there's no availability or the owner asks why. To diagnose, first rules out service-level blockers the availability endpoint can't see (service hidden, online booking off), then runs DiagnoseAvailability for ordered, machine-readable staff/setup reasons, with a manual fallback for booking-policy and capacity causes. Use when someone asks whether a service has availability, or why a service shows no times / customers can't book it."
|
|
4
4
|
---
|
|
5
|
-
#
|
|
5
|
+
# Check Bookings Availability (and Diagnose Issues)
|
|
6
|
+
|
|
7
|
+
This recipe answers two related questions, in order of how often they're asked:
|
|
8
|
+
|
|
9
|
+
1. **"Does this service have availability right now?"** — the default. Give a short, plain status answer.
|
|
10
|
+
2. **"Why is there no availability / why can't customers book?"** — diagnose the cause. Only do this when there's **no bookable availability**, or the owner **explicitly asks** why / how to fix it.
|
|
11
|
+
|
|
12
|
+
Don't diagnose by default. If the owner just wants to know the status and the service is bookable, answer that and stop.
|
|
6
13
|
|
|
7
14
|
> ## ⚠️ Output rule (read first)
|
|
8
|
-
> You are talking to a **site owner**, not a developer. Use everything below —
|
|
15
|
+
> You are talking to a **site owner**, not a developer. Use everything below — endpoints, JSON, reason codes, `suggestedAction` values, field names — **only to do the work.** Your **reply must be plain language**.
|
|
9
16
|
>
|
|
10
|
-
> **
|
|
17
|
+
> **Keep it short and only say what's relevant:**
|
|
18
|
+
> - When the service **is** bookable, confirm it in a sentence. **Don't recite everything that happens to be fine** — the owner didn't ask for an audit. ❌ "It's visible on your site (not hidden). Online booking is ON. It has 1 staff member assigned and 1 location." ✅ "Yes — **[service]** has open times customers can book."
|
|
19
|
+
> - When you diagnose, surface **only the blocking cause and its fix** — not a checklist of everything that passed.
|
|
20
|
+
>
|
|
21
|
+
> **Never put any of these in your reply:** endpoint paths or curl, JSON, reason-code names (e.g. `RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION`), `suggestedAction` enums, or field names. Translate them. See [Presenting to the user](#presenting-to-the-user).
|
|
11
22
|
>
|
|
12
23
|
> ✅ "Your staff don't have working hours at the location this service is offered at, so there's nothing to book. Want me to add hours there?"
|
|
13
24
|
> ❌ "`DiagnoseAvailability` returned `RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION` / `CHECK_WORK_LOCATIONS`."
|
|
14
25
|
|
|
15
26
|
## When to use
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Diagnosis runs in order — **cheapest, most common blockers first:**
|
|
20
|
-
|
|
21
|
-
0. **Rule out service-level blockers.** Before touching availability, confirm the service is actually **visible** and **open to online booking**. A service that's hidden from the site, or has online booking turned off, can't be booked no matter how much staff availability exists — and `DiagnoseAvailability` does **not** check either. This is the single most common reason a customer "can't book" a service. See [Step 0](#step-0--rule-out-service-level-blockers-visibility--online-booking).
|
|
22
|
-
1. **Call `DiagnoseAvailability`.** It returns ordered, machine-readable reason codes — each with a suggested owner action — for staff/resource setup and configuration problems. Fix what it reports and re-check.
|
|
23
|
-
2. **Fall back to `ListAvailabilityTimeSlots`** only when the endpoint is inconclusive. The endpoint detects setup/configuration problems; it does **not** evaluate booking policy or remaining capacity, so those are checked here.
|
|
24
|
-
|
|
25
|
-
> ### ⚠️ Don't skip Step 0
|
|
26
|
-
> If the owner's complaint is "customers can't book / can't see this service" (as opposed to "the calendar is empty"), **Step 0 is very likely the answer.** Jumping straight to `DiagnoseAvailability` / `ListAvailabilityTimeSlots` on a hidden service will surface a real-but-irrelevant availability or policy detail (e.g. "too late to book") and give the owner the **wrong** diagnosis. Always confirm visibility and online booking first.
|
|
28
|
+
- Owner asks whether an **appointment-based** service has availability / bookable times → [Step 1](#step-1--report-the-current-availability-status).
|
|
29
|
+
- Owner reports the service has **no bookable times**, or that **customers can't book (or can't even find) it** → Step 1 will come back empty, so go on to diagnose ([Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking) onward). For "can't book / can't find," start diagnosis at Step 2 even if Step 1 returned slots — a hidden service still lists slots (see the note in Step 1).
|
|
27
30
|
|
|
28
31
|
> **Scope:** appointment-based services.
|
|
29
32
|
|
|
@@ -37,13 +40,37 @@ Diagnosis runs in order — **cheapest, most common blockers first:**
|
|
|
37
40
|
|
|
38
41
|
- Typically the `serviceId` (optionally with a staff member's `resourceId` to scope to one provider). A `resourceId` on its own is also supported for the staff editor, where no service is in context — see [Which inputs to pass](#which-inputs-to-pass-prefer-a-service).
|
|
39
42
|
|
|
40
|
-
- **Authorization:** the caller needs the `bookings:availability:v2:time_slot:diagnose_availability` permission. A plain site/owner token can come back **403 (empty body)** if that permission isn't granted
|
|
43
|
+
- **Authorization (diagnosis only):** to call `DiagnoseAvailability` the caller needs the `bookings:availability:v2:time_slot:diagnose_availability` permission. A plain site/owner token can come back **403 (empty body)** if that permission isn't granted — that's an auth problem, not "no cause found." Ensure the calling context carries the permission before treating a 403 as inconclusive.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 1 — Report the current availability status
|
|
48
|
+
|
|
49
|
+
This is the default answer. Find out whether customers can actually book the service right now, then say so plainly.
|
|
50
|
+
|
|
51
|
+
- **Endpoint:** `ListAvailabilityTimeSlots` — the same slots a customer sees. See [End-to-End Booking Flow](end-to-end-booking-flow.md) for the request shape. Query the service over a sensible upcoming window (e.g. the next few weeks) in the site's time zone.
|
|
52
|
+
|
|
53
|
+
Interpret the result:
|
|
54
|
+
|
|
55
|
+
| What comes back | Availability status | What to do |
|
|
56
|
+
|-----------------|---------------------|------------|
|
|
57
|
+
| One or more **bookable** slots | **Bookable.** | Tell the owner in a sentence and stop — no diagnosis needed unless they ask why/how to change something. |
|
|
58
|
+
| Slots exist but **none are bookable** (`nonBookableReasons` / `bookingPolicyViolations` set) | **Not bookable — policy/capacity.** | This is the cause. Surface it directly ([policy/capacity causes](#booking-policy--capacity-slots-exist-but-arent-bookable)). No need to run `DiagnoseAvailability`. |
|
|
59
|
+
| **No slots at all** | **No availability.** | Diagnose: go to [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking). |
|
|
60
|
+
|
|
61
|
+
> **The hidden-service trap.** A service that's **hidden** from the site, or has **online booking turned off**, can still list slots here — so bookable slots do **not** prove customers can book it. When the complaint is "customers can't book / can't find this service" (as opposed to "the calendar is empty"), **run [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking) before trusting the slot count** — it's the single most common cause and neither `ListAvailabilityTimeSlots` nor `DiagnoseAvailability` detects it.
|
|
62
|
+
|
|
63
|
+
If **no slots come back at all**, also sanity-check the inputs before concluding "no availability": the queried window isn't entirely in the past, and any `locations` filter is actually offered by the service.
|
|
41
64
|
|
|
42
65
|
---
|
|
43
66
|
|
|
44
|
-
##
|
|
67
|
+
## Diagnosis
|
|
68
|
+
|
|
69
|
+
Do the following **only** when Step 1 found no availability, or the owner asks why there are no times / how to fix it / why customers can't book. Run the checks in order — cheapest, most common blockers first.
|
|
70
|
+
|
|
71
|
+
## Step 2 — Rule out service-level blockers (visibility & online booking)
|
|
45
72
|
|
|
46
|
-
Two service settings block booking **entirely**, regardless of staff availability, and are invisible to `DiagnoseAvailability
|
|
73
|
+
Two service settings block booking **entirely**, regardless of staff availability, and are invisible to `DiagnoseAvailability`. Check them **first** with a single read of the service.
|
|
47
74
|
|
|
48
75
|
- **Endpoint:** `GET https://www.wixapis.com/_api/bookings/v2/services/{serviceId}`
|
|
49
76
|
|
|
@@ -54,20 +81,20 @@ Inspect two fields on the returned `service`:
|
|
|
54
81
|
| `hidden` | `true` | The service is **hidden from the site and app**. Customers can't see or book it. In the dashboard this is the **"Visible on your site and app"** toggle turned **off**. |
|
|
55
82
|
| `onlineBooking.enabled` | `false` | **Online booking is turned off** for this service. It may be visible, but customers can't book it online (staff can still book it manually). |
|
|
56
83
|
|
|
57
|
-
- If **`hidden: true`** → that's the cause. Stop here
|
|
84
|
+
- If **`hidden: true`** → that's the cause. Stop here. Fix: make the service visible (offer to flip the toggle for them).
|
|
58
85
|
- If **`onlineBooking.enabled: false`** → that's the cause (for "can't book online"). Fix: turn online booking on.
|
|
59
|
-
- If both are fine (`hidden: false`, `onlineBooking.enabled: true`) → proceed to Step
|
|
86
|
+
- If both are fine (`hidden: false`, `onlineBooking.enabled: true`) → proceed to Step 3. **Don't announce that they're fine** — just move on.
|
|
60
87
|
|
|
61
|
-
> **Why this comes first:** a hidden service can still have staff, working hours, and internally-generated time slots — so
|
|
88
|
+
> **Why this comes first:** a hidden service can still have staff, working hours, and internally-generated time slots — so `ListAvailabilityTimeSlots` and `DiagnoseAvailability` will happily report on those slots (including policy details like "too late to book"). None of that is the real reason the customer can't book. Confirming visibility first prevents a confidently-wrong answer.
|
|
62
89
|
|
|
63
90
|
---
|
|
64
91
|
|
|
65
|
-
## Step
|
|
92
|
+
## Step 3 — Run the diagnosis
|
|
66
93
|
|
|
67
94
|
`DiagnoseAvailability` is a read-only custom action that explains **why availability is empty** rather than returning slots.
|
|
68
95
|
|
|
69
96
|
- **Endpoint:** `POST https://www.wixapis.com/_api/service-availability/v2/time-slots/diagnose`
|
|
70
|
-
- **Maturity:** ALPHA, behind the `diagnoseAvailabilityEndpoint` feature toggle (deployed and available in production). If it returns **no reasons** for a service you'd expect to be broken, treat the result as inconclusive and go to Step
|
|
97
|
+
- **Maturity:** ALPHA, behind the `diagnoseAvailabilityEndpoint` feature toggle (deployed and available in production). If it returns **no reasons** for a service you'd expect to be broken, treat the result as inconclusive and go to [Step 4](#step-4--fallback-when-the-endpoint-is-inconclusive).
|
|
71
98
|
- **`hasAvailability`** is set `true` only on the **service paths**, when the availability-window check confirms real availability — and for `serviceId`-only, only when the service needs a single staff resource type. It is **never** asserted `true` for `serviceId`+`resourceId` (one resource can't confirm the whole service) or for resource-only. So `hasAvailability: false` with an empty `reasons` array means **inconclusive** ("no blocking cause found"), not necessarily "no availability."
|
|
72
99
|
|
|
73
100
|
### Which inputs to pass (prefer a service)
|
|
@@ -134,11 +161,11 @@ curl -X POST 'https://www.wixapis.com/_api/service-availability/v2/time-slots/di
|
|
|
134
161
|
|
|
135
162
|
- `reasons` are ordered **most-specific first**. Fix the first, then re-run.
|
|
136
163
|
- `resolvedContext` echoes the inputs actually used (resolved locations, duration, buffer, window, time zone) — use it to confirm you diagnosed what you meant to.
|
|
137
|
-
- Empty `reasons` ⇒ **inconclusive** → go to **Step
|
|
164
|
+
- Empty `reasons` ⇒ **inconclusive** → go to **Step 4**.
|
|
138
165
|
|
|
139
166
|
### Reason codes → owner fix (agent-internal — never shown to the user)
|
|
140
167
|
|
|
141
|
-
> This table is for **your** interpretation only. Map the returned code to the plain-language cause and fix, then write the reply in everyday words — the code names and `suggestedAction` values must not appear in your response. See [Presenting the
|
|
168
|
+
> This table is for **your** interpretation only. Map the returned code to the plain-language cause and fix, then write the reply in everyday words — the code names and `suggestedAction` values must not appear in your response. See [Presenting to the user](#presenting-to-the-user).
|
|
142
169
|
|
|
143
170
|
| `code` | `suggestedAction` | Meaning & fix |
|
|
144
171
|
|--------|-------------------|---------------|
|
|
@@ -176,10 +203,11 @@ curl -X POST 'https://www.wixapis.com/_api/service-availability/v2/time-slots/di
|
|
|
176
203
|
|
|
177
204
|
---
|
|
178
205
|
|
|
179
|
-
## Step
|
|
206
|
+
## Step 4 — Fallback when the endpoint is inconclusive
|
|
180
207
|
|
|
181
|
-
Empty `reasons` + still no bookable slots usually means the cause is one
|
|
208
|
+
Empty `reasons` + still no bookable slots usually means the cause is one `DiagnoseAvailability` **doesn't evaluate**: booking policy or remaining capacity. You may already have this from the `ListAvailabilityTimeSlots` call in Step 1 — if not, call it again for the same service and window and inspect the returned slots.
|
|
182
209
|
|
|
210
|
+
<a id="booking-policy--capacity-slots-exist-but-arent-bookable"></a>
|
|
183
211
|
- **`nonBookableReasons`** — `noRemainingCapacity`, `violatesBookingPolicy`, `reservedForWaitingList`, `eventCancelled`.
|
|
184
212
|
- **`bookingPolicyViolations`** — `tooEarlyToBook`, `tooLateToBook`, `bookOnlineDisabled`.
|
|
185
213
|
|
|
@@ -189,20 +217,23 @@ See [End-to-End Booking Flow](end-to-end-booking-flow.md) for the `ListAvailabil
|
|
|
189
217
|
|
|
190
218
|
---
|
|
191
219
|
|
|
192
|
-
## Presenting
|
|
220
|
+
## Presenting to the user
|
|
193
221
|
|
|
194
|
-
|
|
222
|
+
Whether you're reporting status or a cause, reply in plain, friendly language and keep it short.
|
|
195
223
|
|
|
196
|
-
- **
|
|
197
|
-
- **
|
|
224
|
+
- **Answer the actual question.** If they asked "is it available," the reply is a status line — not a diagnosis. Only explain causes when there's no availability or they asked why.
|
|
225
|
+
- **Only say what's relevant.** When the service is bookable, confirm it in a sentence; **don't list every setting that's fine** ("visible, online booking on, 1 staff, 1 location" — the owner didn't ask). When diagnosing, give **only the blocking cause and its fix**, not a rundown of everything that passed.
|
|
226
|
+
- **Don't expose internals** — no reason codes, `suggestedAction` enums, raw JSON, endpoint names, or field paths.
|
|
227
|
+
- **Lead with the point in plain English**, then the concrete next step. One or two short sentences is usually enough.
|
|
198
228
|
- **Use the owner's own terms** — "your service", "your staff", "the dates you're looking at", real location names from `resolvedLocations`.
|
|
199
229
|
- **Offer to help with the fix** rather than only stating it.
|
|
200
|
-
- If
|
|
230
|
+
- If diagnosis is **inconclusive** (empty `reasons`), say only that you **couldn't find a blocking problem**, and describe what you'll check next (policy/capacity, or re-run against a service for a resource-only check). **Do not state or imply that anything is set up correctly** — an empty `reasons` array means "no blocker detected," *not* "working hours / locations / setup are present." On the resource-only path never say the staff "have working hours set"; the check doesn't verify that.
|
|
201
231
|
|
|
202
|
-
**Plain-language phrasing per
|
|
232
|
+
**Plain-language phrasing per outcome:**
|
|
203
233
|
|
|
204
|
-
|
|
|
205
|
-
|
|
234
|
+
| Outcome | Say something like |
|
|
235
|
+
|---------|--------------------|
|
|
236
|
+
| Service **is** bookable (status) | "Yes — **[service]** has open times customers can book (the next one is [day/time])." |
|
|
206
237
|
| Service is hidden from the site (`hidden: true`) | "This service is currently hidden from your site and app, so customers can't see or book it. Want me to make it visible?" |
|
|
207
238
|
| Online booking turned off (`onlineBooking.enabled: false`) | "Online booking is turned off for this service, so customers can't book it themselves online (you can still book it for them manually). Want me to turn online booking on?" |
|
|
208
239
|
| No staff/resources on the service | "This service doesn't have any staff assigned yet, so there's nothing to book. Want me to help you add someone?" |
|
|
@@ -214,7 +245,7 @@ The diagnosis is part of a conversation with a site owner. Reply in plain, frien
|
|
|
214
245
|
| Within hours but blocked/busy (deep) | "Your staff are scheduled to work then, but that time is already taken up — by existing bookings or events on their calendar. Freeing some of it up will open slots." |
|
|
215
246
|
| Service too long / buffer too large | "The service is longer than any open gap in your staff's schedule (the duration plus buffer doesn't fit). Shortening it a bit, or widening working hours, would open up slots." |
|
|
216
247
|
| Requested location not offered | "This service isn't offered at the location you picked. Want me to add that location to the service, or check a different one?" |
|
|
217
|
-
| Slots exist but aren't bookable
|
|
248
|
+
| Slots exist but aren't bookable | "There are times available, but customers can't book them right now — [e.g. they're fully booked / it's too early or late to book per your policy]. Here's how to adjust that." |
|
|
218
249
|
|
|
219
250
|
**Example conversational reply** (for a location-mismatch result):
|
|
220
251
|
|
|
@@ -230,8 +261,9 @@ Popular reasons a service shows no availability, and where each surfaces:
|
|
|
230
261
|
|
|
231
262
|
| Situation | Where it surfaces | Fix |
|
|
232
263
|
|-----------|-------------------|-----|
|
|
233
|
-
| Service
|
|
234
|
-
|
|
|
264
|
+
| Service **is** bookable | Step 1 — `ListAvailabilityTimeSlots` returns bookable slots | Nothing — report the status. |
|
|
265
|
+
| Service hidden from the site/app | Step 2 — `service.hidden: true` | Make the service visible ("Visible on your site and app" toggle). |
|
|
266
|
+
| Online booking turned off | Step 2 — `service.onlineBooking.enabled: false` | Turn online booking on for the service. |
|
|
235
267
|
| No staff/resources on the service | `NO_ASSIGNED_STAFF_OR_RESOURCES` | Assign staff/resources. |
|
|
236
268
|
| Provider isn't on the service | `RESOURCE_NOT_ASSIGNED_TO_SERVICE` | Assign the provider. |
|
|
237
269
|
| Provider has no working hours | `RESOURCE_HAS_NO_WORKING_HOURS` | Configure working hours. |
|
|
@@ -241,18 +273,20 @@ Popular reasons a service shows no availability, and where each surfaces:
|
|
|
241
273
|
| No windows — within hours but blocked/busy (deep) | `RESOURCE_BLOCKED` (`deep: true`) | Free up blocked time / check the external calendar. |
|
|
242
274
|
| Service too long / buffer too large for the windows | `DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS`, `BUFFER_TIME_ELIMINATES_WINDOWS` | Shorten duration/buffer or lengthen hours. |
|
|
243
275
|
| Requested location not offered | `REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE` | Fix the location filter or the service's locations. |
|
|
244
|
-
| Slots exist but aren't bookable (fully booked, too early/late, online booking off) | Step
|
|
276
|
+
| Slots exist but aren't bookable (fully booked, too early/late, online booking off) | Step 1 / Step 4 — `ListAvailabilityTimeSlots` `nonBookableReasons` / `bookingPolicyViolations` | Adjust capacity or booking policy. |
|
|
245
277
|
|
|
246
278
|
---
|
|
247
279
|
|
|
248
280
|
## Gotchas
|
|
249
281
|
|
|
250
|
-
- **
|
|
282
|
+
- **Don't diagnose when you weren't asked to.** The default question is "does this have availability" — answer the status and stop. Only dig into causes when there's no availability or the owner asks why / how to fix.
|
|
283
|
+
- **Keep the reply to what's relevant.** When a service is bookable, don't recite every setting that's fine; when diagnosing, give only the blocking cause, not a pass/fail checklist.
|
|
284
|
+
- **A hidden service is the classic wrong-diagnosis trap.** `hidden: true` (or `onlineBooking.enabled: false`) blocks booking entirely, but a hidden service can still list slots — so `ListAvailabilityTimeSlots` and `DiagnoseAvailability` will report on those slots and their policy details (e.g. "too late to book"), none of which is the real reason. When the complaint is "customers can't book / can't see this service," **run Step 2 first.**
|
|
251
285
|
- **`hasAvailability: false` + empty `reasons` ≠ a confirmed problem.** It means "no blocking cause detected." Always confirm with `ListAvailabilityTimeSlots`.
|
|
252
|
-
-
|
|
286
|
+
- **`DiagnoseAvailability` is ALPHA and feature-toggled.** If it returns nothing for an obviously broken service, the `diagnoseAvailabilityEndpoint` toggle may be off — fall back to Step 4.
|
|
253
287
|
- **A 403 is an auth problem, not a diagnosis.** The action needs the `bookings:availability:v2:time_slot:diagnose_availability` permission; a caller without it gets a 403 with an empty body. Don't read that as "no cause found" — confirm the caller has the permission (see [Prerequisites](#prerequisites)).
|
|
254
288
|
- **`deep: true` needs a `serviceId`** (resource-only + `deep` → `MISSING_ARGUMENTS`) and only refines a "no windows" result — it does nothing when windows already exist.
|
|
255
|
-
-
|
|
289
|
+
- **`DiagnoseAvailability` ignores booking policy and capacity** — those come from `ListAvailabilityTimeSlots` (Step 1 / Step 4).
|
|
256
290
|
- **Resource-only diagnosis is lighter.** Passing `resourceId` without `serviceId` catches missing/empty working hours but skips the window, location, and deep checks, so it can return "inconclusive" for service-dependent problems. Valid when there's no service context (e.g. the staff editor); otherwise pair the resource with a service.
|
|
257
291
|
- **Appointment-based services only.**
|
|
258
292
|
|
|
@@ -140,6 +140,12 @@ curl -X GET \
|
|
|
140
140
|
| `SITE_MEMBER_AUTHOR` | Members who created the item |
|
|
141
141
|
| `ADMIN` | Site admins only |
|
|
142
142
|
|
|
143
|
+
## Error Handling
|
|
144
|
+
|
|
145
|
+
| Error | Cause | Solution |
|
|
146
|
+
|-------|-------|----------|
|
|
147
|
+
| `WDE0110` | Wix CMS (Wix Data) app is not installed on the site | Install it: `POST https://www.wixapis.com/apps-installer-service/v1/app-instance/install` with body `{"tenant":{"tenantType":"SITE","id":"<SITE_ID>"},"appInstance":{"appDefId":"e593b0bd-b783-45b8-97c2-873d42aacaf4"}}`, then retry. See the [Install Wix Apps recipe](../app-installation/install-wix-apps.md). |
|
|
148
|
+
|
|
143
149
|
## Related Documentation
|
|
144
150
|
|
|
145
151
|
- [Data Collections API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
|
|
@@ -10,12 +10,19 @@ This recipe covers the setup flow needed before creating payment links or collec
|
|
|
10
10
|
|
|
11
11
|
Before connecting Wix Payments, collect and confirm:
|
|
12
12
|
|
|
13
|
-
1. Terms acceptance: https://
|
|
13
|
+
1. Terms acceptance: https://support.wix.com/en/article/wix-payments-terms-of-service
|
|
14
14
|
2. First name
|
|
15
15
|
3. Last name
|
|
16
16
|
4. Product/service description (minimum meaningful business description)
|
|
17
|
+
5. The site's country — if not already known, get it from `properties.locale.country` via `GET https://www.wixapis.com/site-properties/v4/properties`
|
|
17
18
|
|
|
18
|
-
## Step 2:
|
|
19
|
+
## Step 2: Check country support
|
|
20
|
+
|
|
21
|
+
Wix Payments self-serve connect is currently supported for these countries: `US, CA, GB, ES, AT, BE, FI, DE, IT, NL, PT, CH, LT`.
|
|
22
|
+
|
|
23
|
+
If the site's country is not on this list, stop here — do not call connect. Tell the user self-serve connect isn't available yet for their country, and point them to the dashboard instead (Settings → Accept Payments).
|
|
24
|
+
|
|
25
|
+
## Step 3: Connect Wix Payments account
|
|
19
26
|
|
|
20
27
|
Call:
|
|
21
28
|
|
|
@@ -27,12 +34,13 @@ Call:
|
|
|
27
34
|
"firstName": "<USER_FIRST_NAME>",
|
|
28
35
|
"lastName": "<USER_LAST_NAME>",
|
|
29
36
|
"tosAccepted": true,
|
|
30
|
-
"productDescription": "<PRODUCT_DESCRIPTION>"
|
|
37
|
+
"productDescription": "<PRODUCT_DESCRIPTION>",
|
|
38
|
+
"country": "<COUNTRY_CODE verified in Step 2>"
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
```
|
|
34
42
|
|
|
35
|
-
## Step
|
|
43
|
+
## Step 4: Handle common setup blockers
|
|
36
44
|
|
|
37
45
|
### Location-related failure
|
|
38
46
|
|
|
@@ -43,15 +51,30 @@ If setup fails due to location details, update the business location and retry:
|
|
|
43
51
|
|
|
44
52
|
### Already connected
|
|
45
53
|
|
|
46
|
-
If the
|
|
54
|
+
If the account is already connected, the API returns `HTTP 500` with a body like:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"message": "payments already connected",
|
|
59
|
+
"details": { "applicationError": { "code": "INTERNAL_ERROR" } }
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Match on the `message` text, not on the `code` alone — `INTERNAL_ERROR` is a generic code reused for unrelated failures too. On this match, skip reconnect and continue with onboarding checks.
|
|
47
64
|
|
|
48
|
-
|
|
65
|
+
### Unsupported country
|
|
66
|
+
|
|
67
|
+
If `account.country` isn't one of the countries listed in Step 2, expect an `INVALID_ARGUMENT`-style `HTTP 400` error. Step 2's own check should make hitting this rare — don't retry the call with a different country value; tell the user the same thing Step 2 would have.
|
|
68
|
+
|
|
69
|
+
## Step 5: Complete dashboard onboarding
|
|
49
70
|
|
|
50
71
|
Connecting the account is not always the final step. To receive payments, the site owner may still need to complete Wix Payments onboarding in the site dashboard.
|
|
51
72
|
|
|
73
|
+
Connecting Wix Payments and being able to accept real checkout payments are two separate gates: the site may also need a premium eCommerce plan (Settings → Plans). Mention this even after a successful connect.
|
|
74
|
+
|
|
52
75
|
## Important Notes
|
|
53
76
|
|
|
54
77
|
1. Never invent or assume user identity/business details.
|
|
55
|
-
2. Always obtain explicit user consent before calling connect.
|
|
78
|
+
2. Always obtain explicit user consent before calling connect — this creates a real Wix Payments account and records a legally-binding Terms of Service acceptance under the name provided.
|
|
56
79
|
3. Use the exact accepted values provided by the user.
|
|
57
80
|
4. Verify readiness by testing a real payment flow (for example, create payment link) after setup.
|