@wix/agent-skills 1.19.1 → 1.19.2
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/references/EDITOR_REACT_COMPONENT.md +1 -1
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +7 -2
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +46 -22
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +17 -4
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +71 -31
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +3 -4
- package/skills/wix-base44-connector/SKILL.md +46 -24
- package/skills/wix-headless/SKILL.md +1 -0
- package/skills/wix-headless/references/CAPABILITIES.md +7 -2
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -1
- package/skills/wix-headless/references/inline-recipes/experience-store.md +48 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +350 -114
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +1 -1
- package/skills/wix-headless/references/managed/CREATE.md +5 -0
- package/skills/wix-manage/SKILL.md +4 -4
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +4 -1
- package/skills/wix-manage/references/bookings/create-appointment-service.md +3 -1
- package/skills/wix-manage/references/bookings/create-class-service.md +3 -1
- package/skills/wix-manage/references/bookings/create-course-service.md +4 -2
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +68 -3
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-seasonal-promotion.md +1 -1
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +108 -14
- package/skills/wix-manage/references/seo/manage-content-plan.md +1 -1
- package/skills/wix-manage/references/sites/upload-static-site.md +264 -34
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +68 -26
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +32 -14
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +14 -3
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +41 -35
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +77 -30
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +31 -2
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +31 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "How to Code Members (Astro)"
|
|
3
|
-
description: The frontend contract for member sign-up / log-in / log-out and member-gated surfaces on a Wix-managed **Astro** frontend — the built-in `/api/auth/login` + `/api/auth/logout` routes that `@wix/astro` ships, the `returnToUrl` param, gating a page by resolving the member in SSR / a backend route, reading the current member with `@wix/members` `getCurrentMember`, and the two rules that keep this path from breaking: **no `OAuthStrategy`/no client** (that 500s under auto-auth) and **no `auth.elevate`** for a member reading their own data. Specifies the *how* for the Astro axis only — read `how-to-code-members-non-astro.md` for any non-Astro frontend.
|
|
3
|
+
description: "The frontend contract for member sign-up / log-in / log-out and member-gated surfaces on a Wix-managed **Astro** frontend — the built-in `/api/auth/login` + `/api/auth/logout` routes that `@wix/astro` ships, the `returnToUrl` param, gating a page by resolving the member in SSR / a backend route, reading the current member with `@wix/members` `getCurrentMember`, and the two rules that keep this path from breaking: **no `OAuthStrategy`/no client** (that 500s under auto-auth) and **no `auth.elevate`** for a member reading their own data. Specifies the *how* for the Astro axis only — read `how-to-code-members-non-astro.md` for any non-Astro frontend."
|
|
4
4
|
---
|
|
5
5
|
**RECIPE**: How to Code Member Auth on a Wix-managed **Astro** Frontend (built-in `/api/auth/*`, `@wix/members`)
|
|
6
6
|
|
|
@@ -107,6 +107,11 @@ headlines, kickers, subtitles, and CTA labels per **`references/CONTENT.md`**
|
|
|
107
107
|
Either way, `CONTENT.md` §1 (the business's category must read literally above the fold) always holds —
|
|
108
108
|
a page a first-time visitor can't identify isn't done yet, regardless of voice.
|
|
109
109
|
|
|
110
|
+
**If a loaded vertical ships an experience overlay** — `references/inline-recipes/experience-<vertical>.md`
|
|
111
|
+
(today: `experience-store.md`) — read it after `DESIGN.md`/`CONTENT.md`. It carries that vertical's own
|
|
112
|
+
design and copy bar (what its surfaces must show, how to derive the direction from its content); the
|
|
113
|
+
general files stay the floor.
|
|
114
|
+
|
|
110
115
|
Then build the pages the user's intent calls for, **wired to the live backend**, using
|
|
111
116
|
**`references/SDK_HANDOFF.md`** for the per-capability packages, the SDK docs, and the seeded schema to
|
|
112
117
|
bind (collection/form names + field keys; all other content is queried live). Install the SDK packages the loaded verticals need, author the pages/components directly in the
|
|
@@ -107,7 +107,7 @@ Full CRUD operations for Wix Bookings services using Services API. Covers servic
|
|
|
107
107
|
"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."
|
|
108
108
|
|
|
109
109
|
### [End-to-End Booking Flow](references/bookings/end-to-end-booking-flow.md)
|
|
110
|
-
|
|
110
|
+
Books and settles appointments, classes and courses with the site owner's credentials — an operator managing bookings, or server-side code booking as the owner. Covers service discovery, availability with Time Slots V2, creating the booking, and settling it by direct confirmation or eCommerce checkout. A visitor booking for themselves needs a visitor token instead; this recipe links that path.
|
|
111
111
|
|
|
112
112
|
### [External Calendar Integration](references/bookings/external-calendar-integration.md)
|
|
113
113
|
OAuth-based integration with Google Calendar, Microsoft Outlook, and Apple Calendar. Covers authentication flows, sync configuration, and bidirectional event management.
|
|
@@ -289,7 +289,7 @@ Creates payment links for unpaid bookings using Payment Links API. Links booking
|
|
|
289
289
|
**Routing — Google paid-advertising campaigns for a site (Smart & Performance Max).** All flows require a Google Ads account, created once via the setup recipe. Budgets are in micros (1,000,000 = 1 currency unit). REST base: `https://www.wixapis.com/_serverless/pa-google/v1`.
|
|
290
290
|
- **First-time setup / "connect Google Ads" / `ACCOUNT_NOT_FOUND`** → [Install and Create an Account](references/google-ads/install-and-create-account.md) (do this before anything else).
|
|
291
291
|
- **Suggested keywords / geo / budget / ad copy / images** → [Get AI Campaign Suggestions](references/google-ads/get-campaign-suggestions.md).
|
|
292
|
-
- **
|
|
292
|
+
- **Improve an existing campaign / see what to fix next / Campaign Success Guide / mark or reopen a recommendation** → [Manage a Campaign Success Guide](references/google-ads/manage-campaign-success-guide.md).
|
|
293
293
|
- **Create a multi-channel / lead-gen / Shopping campaign** → [Create a Performance Max Campaign](references/google-ads/create-performance-max-campaign.md).
|
|
294
294
|
- **Pause / resume / launch / update budget / delete / history** → [Manage Campaign Lifecycle](references/google-ads/manage-campaign-lifecycle.md).
|
|
295
295
|
- **Performance, conversions, search terms, per-product / per-asset metrics** → [Query Campaign Performance Analytics](references/google-ads/query-campaign-analytics.md).
|
|
@@ -308,7 +308,7 @@ Creates payment links for unpaid bookings using Payment Links API. Links booking
|
|
|
308
308
|
"Manages existing Google Ads campaigns on a Wix site: list/get, launch (first activation) vs resume (reactivate after a pause), pause a running campaign — optionally with a scheduled auto-resume date — update name/budget/targeting, change the daily budget, delete permanently, and read status history / change log. Use when the user wants to 'pause my Google ad', 'resume my campaign', 'stop the campaign', 'change my daily budget', 'rename the campaign', 'delete this campaign', 'list my Google Ads campaigns', or 'why did my campaign status change'. Requires an existing Google Ads account and campaign. REST base https://www.wixapis.com/_serverless/pa-google/v1."
|
|
309
309
|
|
|
310
310
|
### [Manage a Campaign Success Guide](references/google-ads/manage-campaign-success-guide.md)
|
|
311
|
-
"
|
|
311
|
+
"Campaign Success Guide for existing Wix Google Ads Performance Max Leads campaigns. Use after creating a supported campaign, even while it is learning or has no metrics, and whenever users ask how to improve a campaign, what to fix next, to view the guide, or to mark or reopen a recommendation. Covers campaign and site selection; prioritized actionable recommendations; deduplicated, destination-specific Editor and Google Ads navigation; offers to perform supported work after approval; Merchant Center and Business Profile connection follow-ups; and suggestion-status tracking."
|
|
312
312
|
|
|
313
313
|
### [Query Campaign Performance Analytics](references/google-ads/query-campaign-analytics.md)
|
|
314
314
|
"Reads performance analytics for a Google Ads campaign on a Wix site: daily performance metrics (impressions, clicks, CTR, cost, leads, phone calls) with optional previous-period comparison and trends; conversion metrics from Wix Analytics (orders, revenue, leads, CPL, ROAS); the search terms that triggered a campaign's ads; per-product shopping performance for retail campaigns; and per-asset performance (headlines, descriptions, images) for PMAX Leads. Explains when to use campaignResourceName vs the Wix campaignId, the dateRange shape, field enums, sorting, and paging. Use when the user asks 'how is my campaign doing', 'show ad performance', 'what search terms triggered my ads', 'which products/assets perform best', 'campaign ROI/ROAS', or 'conversions from my Google ads'. REST base https://www.wixapis.com/_serverless/pa-google/v1."
|
|
@@ -425,7 +425,7 @@ Drive the Wix Site Import agent to migrate an existing store or site from anothe
|
|
|
425
425
|
"Builds direct links to the account-level sites pages on manage.wix.com — the My Sites list (all sites in the account) and each site's own dashboard. Pairs the site list with the Query Sites read API. Use when the user asks where something is in the Wix dashboard, wants a direct link to a dashboard page, or you need a dashboard URL to include with the result of an API operation."
|
|
426
426
|
|
|
427
427
|
### [Upload a Website or HTML Files](references/sites/upload-static-site.md)
|
|
428
|
-
|
|
428
|
+
Publish a user's ready-made website — an index.html, a static build, or a zip exported from an AI builder or any other tool — as a new live Wix site. Covers both ways to get there — handing the user the Wix Headless drop page, and calling the Wix Headless instant-site REST API yourself when you can reach the files and make outbound HTTPS requests. When you also hold the user's identity, covers putting the published site straight into their Wix account and reading back its final live URL. Use whenever the user wants to upload, publish, deploy, or host their own HTML/CSS/JS as a NEW site, including files generated for them earlier in the conversation, or to update a site already published this way (iterate on the same site instead of creating another). Not for migrating a live store/site from another platform by URL or from CSV exports (use Site Import), not for adding HTML or custom code into an existing Wix site, and not for uploading images or documents to a site's media files.
|
|
429
429
|
|
|
430
430
|
---
|
|
431
431
|
|
|
@@ -201,6 +201,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
201
201
|
-H 'Authorization: <AUTH>' \
|
|
202
202
|
-H 'Content-Type: application/json' \
|
|
203
203
|
-d '{
|
|
204
|
+
"returnEntity": true,
|
|
204
205
|
"services": [{
|
|
205
206
|
"name": "Consultation",
|
|
206
207
|
"type": "APPOINTMENT",
|
|
@@ -234,6 +235,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
234
235
|
-H 'Authorization: <AUTH>' \
|
|
235
236
|
-H 'Content-Type: application/json' \
|
|
236
237
|
-d '{
|
|
238
|
+
"returnEntity": true,
|
|
237
239
|
"services": [{
|
|
238
240
|
"name": "Free Consultation",
|
|
239
241
|
"type": "APPOINTMENT",
|
|
@@ -264,6 +266,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
264
266
|
-H 'Authorization: <AUTH>' \
|
|
265
267
|
-H 'Content-Type: application/json' \
|
|
266
268
|
-d '{
|
|
269
|
+
"returnEntity": true,
|
|
267
270
|
"services": [{
|
|
268
271
|
"name": "Yoga Class",
|
|
269
272
|
"type": "CLASS",
|
|
@@ -283,7 +286,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
283
286
|
}'
|
|
284
287
|
```
|
|
285
288
|
|
|
286
|
-
After creation, use
|
|
289
|
+
After creation, use `results[0].item.schedule.id` from the response to create class events with `bulkCreateEvents` (see Step 3). This requires `returnEntity: true` on the request — without it the response carries only `results[0].itemMetadata.id`, which has no `schedule.id`; and the created service is directly under `item` (there is no `item.service`).
|
|
287
290
|
|
|
288
291
|
**Required Fields:**
|
|
289
292
|
|
|
@@ -109,6 +109,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
109
109
|
-H 'Authorization: <AUTH>' \
|
|
110
110
|
-H 'Content-Type: application/json' \
|
|
111
111
|
-d '{
|
|
112
|
+
"returnEntity": true,
|
|
112
113
|
"services": [{
|
|
113
114
|
"name": "<SERVICE_NAME>",
|
|
114
115
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -142,6 +143,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
142
143
|
-H 'Authorization: <AUTH>' \
|
|
143
144
|
-H 'Content-Type: application/json' \
|
|
144
145
|
-d '{
|
|
146
|
+
"returnEntity": true,
|
|
145
147
|
"services": [{
|
|
146
148
|
"name": "<SERVICE_NAME>",
|
|
147
149
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -171,7 +173,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
171
173
|
- `schedule.availabilityConstraints.sessionDurations` sets the appointment length
|
|
172
174
|
- Availability is based on the assigned staff member's working hours schedule
|
|
173
175
|
|
|
174
|
-
Save the `serviceId` from the response: `results[0].item.service.id
|
|
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`.
|
|
175
177
|
|
|
176
178
|
---
|
|
177
179
|
|
|
@@ -96,6 +96,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
96
96
|
-H 'Authorization: <AUTH>' \
|
|
97
97
|
-H 'Content-Type: application/json' \
|
|
98
98
|
-d '{
|
|
99
|
+
"returnEntity": true,
|
|
99
100
|
"services": [{
|
|
100
101
|
"name": "<SERVICE_NAME>",
|
|
101
102
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -124,6 +125,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
124
125
|
-H 'Authorization: <AUTH>' \
|
|
125
126
|
-H 'Content-Type: application/json' \
|
|
126
127
|
-d '{
|
|
128
|
+
"returnEntity": true,
|
|
127
129
|
"services": [{
|
|
128
130
|
"name": "<SERVICE_NAME>",
|
|
129
131
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -149,7 +151,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
149
151
|
- `defaultCapacity` is **required** — sets max participants per session
|
|
150
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))
|
|
151
153
|
|
|
152
|
-
**Response:** Save the service ID from `results[0].itemMetadata.id`
|
|
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`.
|
|
153
155
|
|
|
154
156
|
---
|
|
155
157
|
|
|
@@ -101,6 +101,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
101
101
|
-H 'Authorization: <AUTH>' \
|
|
102
102
|
-H 'Content-Type: application/json' \
|
|
103
103
|
-d '{
|
|
104
|
+
"returnEntity": true,
|
|
104
105
|
"services": [{
|
|
105
106
|
"name": "<SERVICE_NAME>",
|
|
106
107
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -129,6 +130,7 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
129
130
|
-H 'Authorization: <AUTH>' \
|
|
130
131
|
-H 'Content-Type: application/json' \
|
|
131
132
|
-d '{
|
|
133
|
+
"returnEntity": true,
|
|
132
134
|
"services": [{
|
|
133
135
|
"name": "<SERVICE_NAME>",
|
|
134
136
|
"description": "<GENERATED_DESCRIPTION>",
|
|
@@ -157,8 +159,8 @@ curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/create' \
|
|
|
157
159
|
- 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
160
|
- 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
|
|
159
161
|
|
|
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
|
+
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`.
|
|
163
|
+
Save the `service.schedule.id` from the response (`results[0].item.schedule.id`) for the follow-up `bulkCreateEvents` request.
|
|
162
164
|
|
|
163
165
|
---
|
|
164
166
|
|
|
@@ -1,11 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "End-to-End Booking Flow"
|
|
3
|
-
description:
|
|
3
|
+
description: Books and settles appointments, classes and courses with the site owner's credentials — an operator managing bookings, or server-side code booking as the owner. Covers service discovery, availability with Time Slots V2, creating the booking, and settling it by direct confirmation or eCommerce checkout. A visitor booking for themselves needs a visitor token instead; this recipe links that path.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# End-to-End Booking Flow (REST)
|
|
7
7
|
|
|
8
|
-
Step-by-step flow for
|
|
8
|
+
Step-by-step flow for creating and settling bookings **with the site owner's credentials** —
|
|
9
|
+
see who that covers, and where visitor-facing code goes instead, immediately below.
|
|
10
|
+
|
|
11
|
+
> ## ⚠️ These are owner-side calls, not visitor-facing code
|
|
12
|
+
>
|
|
13
|
+
> Every call below runs with the **site owner's credentials** — an API key or the site's admin
|
|
14
|
+
> token. That covers two situations, and both are this recipe:
|
|
15
|
+
>
|
|
16
|
+
> - an **operator managing bookings**, calling these APIs from a script, a management tool, or a
|
|
17
|
+
> back-office screen
|
|
18
|
+
> - **server-side code in a site or app acting as the owner** — a backend function booking a
|
|
19
|
+
> client in, a scheduled job, a webhook handler
|
|
20
|
+
>
|
|
21
|
+
> Either way the booking belongs to the site, not to the person being booked.
|
|
22
|
+
>
|
|
23
|
+
> **Building a site or app where a visitor books for themselves? These payloads are right, the
|
|
24
|
+
> identity is not.** A visitor's booking and checkout run on an **anonymous visitor token** minted
|
|
25
|
+
> from the site's OAuth app client id. Using the owner's credentials for a visitor's purchase
|
|
26
|
+
> produces a checkout that belongs to the site: no cart persistence, no abandoned-checkout
|
|
27
|
+
> recovery, and no attribution to the customer. Read these first:
|
|
28
|
+
>
|
|
29
|
+
> - [Book an Appointment](https://dev.wix.com/docs/api-reference/business-solutions/bookings/skills/book-an-appointment)
|
|
30
|
+
> — the same flow from the visitor's side: visitor token, slot re-validation, booking form
|
|
31
|
+
> fields, checkout hand-off, and eight pitfalls from real conversations
|
|
32
|
+
> - [Retrieve Tokens](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens)
|
|
33
|
+
> — minting and refreshing the anonymous visitor token
|
|
34
|
+
> - [Allow Redirect URIs and Domains](https://dev.wix.com/docs/go-headless/authentication/setup/allow-redirect-uris-and-domains)
|
|
35
|
+
> — registering your URLs so the visitor returns to your app after the Wix-hosted checkout
|
|
36
|
+
> - [Manage OAuth Apps](../sites/manage-oauth-apps.md) — creating the OAuth app, whose id is the
|
|
37
|
+
> `client_id` the frontend mints visitor tokens from
|
|
38
|
+
> - [Bookings Quick Start](https://dev.wix.com/docs/go-headless/self-managed-headless/tutorials/java-script-sdk-tutorials/bookings-quick-start)
|
|
39
|
+
> — the same flow through the JavaScript SDK on a headless site
|
|
40
|
+
>
|
|
41
|
+
> Mixed apps are normal: the owner's credentials manage the catalog, staff, policies and coupons
|
|
42
|
+
> (the recipes here), while the visitor's own token books and pays.
|
|
43
|
+
|
|
44
|
+
## Contents
|
|
45
|
+
|
|
46
|
+
1. [Query Available Services](#step-1-query-available-services) — `POST /bookings/v2/services/query`.
|
|
47
|
+
The three service types and how each one changes the rest of the flow, plus the four fields to
|
|
48
|
+
carry forward: `id`, `schedule.id`, `type`, `staffMemberIds`.
|
|
49
|
+
2. [Check Availability](#step-2-check-availability) — `POST /_api/service-availability/v2/time-slots`.
|
|
50
|
+
Time Slots V2 replaces the deprecated Availability Calendar. Dates must be full local
|
|
51
|
+
datetimes or the call 400s; `availableResources` stays empty unless you ask for it by resource
|
|
52
|
+
type; the `location.locationType` a slot returns is **not** the value Create Booking accepts.
|
|
53
|
+
Classes come from a different endpoint and carry an `eventId`.
|
|
54
|
+
3. [Create the Booking](#step-3-create-the-booking) — `POST /_api/bookings-service/v2/bookings`.
|
|
55
|
+
One payload shape per service type: appointments need every slot field spelled out, classes
|
|
56
|
+
need only the service and event ids and derive the rest, courses book a whole schedule.
|
|
57
|
+
Participants are `totalParticipants` **or** `participantsChoices`, never both. The booking
|
|
58
|
+
lands as `CREATED` and is not on the calendar until step 4.
|
|
59
|
+
4. [Confirm or Process Payment](#step-4-confirm-or-process-payment) — two branches. Free and
|
|
60
|
+
pay-at-location bookings are confirmed directly with a payment status. Paid bookings go into a
|
|
61
|
+
cart that references the booking id, and whoever is paying is sent to its checkout URL; a
|
|
62
|
+
server-to-server place-order path skips the payment page entirely, which only fits an operator
|
|
63
|
+
or backend job booking someone in.
|
|
64
|
+
5. [Service Type Summary](#service-type-summary) — appointment, class and course side by side:
|
|
65
|
+
which `bookedEntity` each uses, which availability API feeds it, and what makes it different.
|
|
9
66
|
|
|
10
67
|
## Prerequisites
|
|
11
68
|
|
|
@@ -256,7 +313,15 @@ Use the booking ID as `catalogItemId` with the Wix Bookings app ID. Save `cart.i
|
|
|
256
313
|
|
|
257
314
|
Redirect the user to the returned `checkoutUrl`. After payment, the booking is automatically confirmed.
|
|
258
315
|
|
|
259
|
-
|
|
316
|
+
> When the person paying is a visitor, create the cart and this URL **with their visitor token**,
|
|
317
|
+
> not the owner's credentials — see the note at the top. The call succeeds either way, which is
|
|
318
|
+
> what makes it easy to get wrong.
|
|
319
|
+
|
|
320
|
+
**4c. Place Order — no payment page (alternative, server-to-server)**
|
|
321
|
+
|
|
322
|
+
> This one only makes sense on the owner's side: it creates the order outright, with nobody
|
|
323
|
+
> visiting a payment page. Right for an operator or backend job booking someone in; not a way to
|
|
324
|
+
> charge a visitor, who still has to be sent to checkout.
|
|
260
325
|
|
|
261
326
|
First calculate the cart to get a price-verification token:
|
|
262
327
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Flow: Seasonal Promotion"
|
|
3
|
-
description: SEASONAL sub-flow — load [Goal: Seasonal Revenue] FIRST (it owns classification and routing); this is a sub-step, NOT a direct entry from README.
|
|
3
|
+
description: "SEASONAL sub-flow — load [Goal: Seasonal Revenue] FIRST (it owns classification and routing); this is a sub-step, NOT a direct entry from README."
|
|
4
4
|
---
|
|
5
5
|
# Flow: Seasonal Promotion
|
|
6
6
|
|
|
@@ -1,39 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Manage a Campaign Success Guide"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Campaign Success Guide for existing Wix Google Ads Performance Max Leads campaigns. Use after creating a supported campaign, even while it is learning or has no metrics, and whenever users ask how to improve a campaign, what to fix next, to view the guide, or to mark or reopen a recommendation. Covers campaign and site selection; prioritized actionable recommendations; deduplicated, destination-specific Editor and Google Ads navigation; offers to perform supported work after approval; Merchant Center and Business Profile connection follow-ups; and suggestion-status tracking."
|
|
4
4
|
---
|
|
5
5
|
# RECIPE: Manage a Campaign Success Guide
|
|
6
6
|
|
|
7
|
-
A campaign success guide is a prioritized list of improvements for an **existing** Google Ads `PERFORMANCE_MAX_LEADS` campaign. Offer it as a useful next step after [creating a Performance Max campaign](create-performance-max-campaign.md). Once Create Campaign returns the campaign ID, ask whether the user wants to retrieve the guide; call the API only after they approve.
|
|
8
|
-
|
|
9
|
-
Also use this recipe for requests such as "How can I improve my campaign?", "What should I fix next?", "Show my campaign success guide", "I made the call-to-action button clearer as the success guide recommended", "Mark this recommendation complete", or "Reopen that guide item."
|
|
7
|
+
A campaign success guide is a prioritized list of improvements for an **existing** Google Ads `PERFORMANCE_MAX_LEADS` campaign. Offer it as a useful next step after [creating a Performance Max campaign](create-performance-max-campaign.md). Once Create Campaign returns the campaign ID, ask whether the user wants to retrieve the guide; call the API only after they approve. The guide does not use campaign performance metrics. It evaluates landing-page content, campaign configuration, and Wix site connections, so `LEARNING` status and an empty analytics history do not block it.
|
|
10
8
|
|
|
11
9
|
A direct request to improve a campaign, see what to fix next, or show its success guide is itself approval to retrieve the guide once the campaign is identified. Do not ask whether the user wants the guide after they have already made one of those requests. Separate approval is needed only when you proactively offer the guide after campaign creation.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Treat a broad request such as "How can I improve my Google Ads campaign?" as a Campaign Success Guide request for an existing campaign. Route here before offering generic optimization advice, querying analytics, or generating the pre-campaign inputs covered by Get AI Campaign Suggestions. If the conversation does not identify a Wix site or campaign, explain that you will use the guide and ask one focused question that resolves the missing identity; do not probe site-scoped APIs first.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
This differs from [Get AI Campaign Suggestions](get-campaign-suggestions.md), which generates keywords, budgets, locations, copy, images, and other inputs used while **building** a campaign. Do not route pre-campaign keyword, budget, creative, or targeting generation here.
|
|
16
14
|
|
|
17
15
|
## Resolve the campaign
|
|
18
16
|
|
|
19
|
-
The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign."
|
|
17
|
+
The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign." Google Ads calls operate on the current Wix site from the call context; the site is not a request-body field. Use an already-selected site context without asking the user to repeat it. If there is no unambiguous current site, ask which site to use instead of probing several sites. Follow the rest of this resolution flow only when retrieving or updating a guide. If the conversation already contains the guide recommendations and the user only wants them presented, do not block the action plan on campaign identity; resolve only the site context needed for relevant navigation.
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Site listing is for resolving navigation metadata only. Never use account-wide site listing to hunt for a campaign before retrieving or updating a guide. A current-site ID in the available context counts as an unambiguous selected site even when the user's prompt does not repeat its name. If no current-site ID is available, ask which site to use.
|
|
20
|
+
|
|
21
|
+
1. If the campaign UUID is known, use it in the current site context.
|
|
22
|
+
2. Otherwise, list campaigns once for the current site using the Campaign API's public serverless route:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
curl -X GET 'https://www.wixapis.com/google
|
|
25
|
+
curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns' \
|
|
26
26
|
-H 'Authorization: <AUTH>'
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Use this full URL exactly once. The `/_serverless/pa-google` prefix is part of the public endpoint. Do not retry with a relative URL or another service prefix, or probe another site when the documented call returns an error.
|
|
30
|
+
|
|
29
31
|
Read each campaign's `id`, `name`, `campaignType`, and `status`.
|
|
30
|
-
3. Select a campaign only when one result clearly matches the user's wording. If
|
|
32
|
+
3. Select a campaign only when one result clearly matches the user's wording. If several campaigns on that site plausibly match, show concise campaign choices and ask the user to choose; never guess.
|
|
31
33
|
4. Continue only for `campaignType: "PERFORMANCE_MAX_LEADS"`. If the selected campaign has another type, explain that campaign success guides currently support Google Ads Performance Max Leads campaigns only. For a supported campaign, do not gate guide retrieval on `status` or query analytics first: `LEARNING` and missing performance metrics are not reasons to wait.
|
|
32
34
|
|
|
33
35
|
The common flow always sends `platformType: "GOOGLE"`; do not ask the user to provide it.
|
|
34
36
|
|
|
35
37
|
## Retrieve or create the guide
|
|
36
38
|
|
|
39
|
+
Skip this call when the conversation already contains a retrieved guide or its recommendations; immediately present the supplied result using the next section instead of retrieving it again or asking for campaign identity. When the user paraphrases recommendation labels, map them to the closest unambiguous suggestion types in the translation table. Wording such as "still need to" or "still to do" means those items are `OPEN`.
|
|
40
|
+
|
|
41
|
+
When the user only wants a supplied guide presented, this article already contains the response behavior. Do not read the linked action recipes until the user accepts an offer to perform that action; unnecessary recipe reads delay the answer and can prevent the navigation block from being returned.
|
|
42
|
+
|
|
37
43
|
```bash
|
|
38
44
|
curl -X POST \
|
|
39
45
|
'https://www.wixapis.com/pa-platform/suggestions/v1/campaign-success-guides/get-or-create' \
|
|
@@ -67,6 +73,76 @@ Present only the suggestions the API returns and preserve their order; `suggesti
|
|
|
67
73
|
|
|
68
74
|
`OPEN` means pending action. `COMPLETED` means the user marked the item completed; it does **not** mean the API changed the site or campaign for them.
|
|
69
75
|
|
|
76
|
+
## Present the guide as an actionable plan
|
|
77
|
+
|
|
78
|
+
Do not return a bare list of task labels. Turn the returned suggestions into a compact action plan while preserving the API's order:
|
|
79
|
+
|
|
80
|
+
Use this output structure:
|
|
81
|
+
|
|
82
|
+
1. A numbered suggestion list with no navigation URLs or Markdown links inside the suggestion items.
|
|
83
|
+
2. One grouped offer for the supported work the agent can perform after approval.
|
|
84
|
+
3. A **Next actions** block after the complete suggestion list and offer, containing each relevant destination link exactly once.
|
|
85
|
+
|
|
86
|
+
This structure is mandatory even when only one suggestion uses a destination. Never put the Editor, Google Ads, or another shared navigation link inline with a suggestion.
|
|
87
|
+
|
|
88
|
+
1. Name the campaign and link `campaignSuccessGuide.url` as the analyzed landing page when present.
|
|
89
|
+
2. For every returned suggestion, show its user-facing label, tracking status (`Pending` for `OPEN`, `Marked complete` for `COMPLETED`), and one concrete next step. Do not show enum values unless they help resolve an ambiguity.
|
|
90
|
+
3. For each `OPEN` item, distinguish work the agent can help perform from work the user must finish in Wix. Prefer an offer to do supported work over instructions that make the user do the same operation manually.
|
|
91
|
+
4. Do not offer work for `COMPLETED` items unless the user asks to reopen them.
|
|
92
|
+
5. Put each unique navigation link after the suggestions as a destination-specific CTA. Do not group every URL under a generic **Open in Wix** label or reuse that label for unrelated destinations. Name the actual page or action—for example, **Go to Editor**, **Go to Google Ads**, or **Connect Google Business Profile**. Deduplicate by destination: if two or ten tasks require the Editor, include the Editor CTA **once**, at the bottom, and never repeat it beside individual tasks. Apply the same deduplication to the Google Ads dashboard or any other shared destination.
|
|
93
|
+
|
|
94
|
+
The navigation block is part of the guide, including when the user supplied or paraphrased the recommendations. Before responding, resolve the destinations required by the `OPEN` items. Resolving navigation is read-only and does not require approval, including when the user says not to change anything yet. Use the selected site's `id` and `editUrl` from available site context. If the current-site ID is known but `editUrl` is absent, look up the site's navigation metadata through an available site-listing capability once; select only the result whose `id` or `metaSiteId` exactly matches that current-site ID, then read its `displayName`, `editUrl`, and `editorType`. Do not inspect other sites for campaigns. When no current-site ID is known and the lookup returns exactly one site, use it for navigation. When several sites are available and none is selected, present the action plan immediately and ask which site's CTAs to add. If an item belongs in the Editor or Google Ads, include that destination once unless the destination is genuinely unavailable; do not omit navigation merely because no API call was needed to obtain the guide.
|
|
95
|
+
|
|
96
|
+
### Which action to offer
|
|
97
|
+
|
|
98
|
+
| Suggestion types | Response behavior |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `CLEAR_CTA_COPY`, `ABOVE_THE_FOLD_CTA`, `HEADER_MATCH`, `CONVERSION_POINT`, `GOOGLE_REVIEWS`, `TESTIMONIAL`, `CONTACT_AND_CREDIBILITY`, `FAQ_SECTION`, `MINIMIZE_FORM_FIELDS`, `SOCIAL_CHANNELS` | These change visible landing-page content. Briefly describe the edit and point to the single **Go to Editor** CTA after the suggestions. If the current environment has a site-editing capability that can safely make the specific change, offer to make it after the user approves; otherwise do not imply that marking the suggestion complete will edit the page. |
|
|
101
|
+
| `MOBILE_OPTIMIZATION`, `SITE_SPEED` | Offer to inspect the problem and recommend a concrete fix first; these broad findings are not a safe one-click mutation. Include the single Editor link when the resulting work belongs there. Do not promise an improvement before identifying the actual cause. |
|
|
102
|
+
| `GOOGLE_ADS_SEARCH_THEMES` | Offer to generate relevant search themes, show the proposed set, and apply the approved set to the existing campaign by following [Get AI Campaign Suggestions](get-campaign-suggestions.md) and [Manage Campaign Lifecycle](manage-campaign-lifecycle.md). Updating the campaign is a mutation, so do not apply themes merely because the guide returned this item. |
|
|
103
|
+
| `GOOGLE_MERCHANT_CENTER_CONNECTION` | Offer to link the Merchant Center account using the account flow below. Reuse an already-linked Merchant Center account ID when present; otherwise ask the user for the ID. Get approval before the account update. Explain that the link begins as `PENDING` and its owner may still need to approve it in Google. |
|
|
104
|
+
| `GOOGLE_BUSINESS_PROFILE_CONNECTION` | Offer to check the connection and start it by following [Connect a Wix Site to Google Business Profile](../google-business-profile/connect-google-business-profile.md). Be explicit that the agent can initiate the flow and provide its authorization URL, but the site owner must finish Google's consent in their browser. |
|
|
105
|
+
|
|
106
|
+
After the tasks, make one closing offer that groups the supported actions you can take; do not append a separate approval question to every item.
|
|
107
|
+
|
|
108
|
+
For a Merchant Center connection, first read the selected site's Google Ads account:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/accounts/current-site' \
|
|
112
|
+
-H 'Authorization: <AUTH>'
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Read `account.id`, `account.merchantCenterAccountId`, and `account.merchantCenterAccountLinkStatus`. If `merchantCenterAccountId` is present, use it as the existing connection context. If it is absent, ask the user for the account ID shown in Google Merchant Center; the Google Ads account API does not list candidate Merchant Center accounts. After the user confirms the ID and approves the mutation, follow [Install Google Ads and Create an Account](install-and-create-account.md) and update `merchantCenterAccountId` on `account.id`.
|
|
116
|
+
|
|
117
|
+
### Build destination-specific CTAs
|
|
118
|
+
|
|
119
|
+
- **Editor:** Include this only when at least one returned `OPEN` item requires landing-page or mobile editing. Use the exact `editUrl` from the selected site context or the single matching result from the site-navigation lookup described above; prefix a relative value with `https://manage.wix.com`. Never construct or guess an Editor URL, and do not substitute the public landing-page URL for an Editor link. If the site is `EDITORLESS` or has no `editUrl`, say that an Editor link is unavailable instead of inventing one. Label the CTA **Go to Editor** or name the more specific editing action; do not label it **Open in Wix**.
|
|
120
|
+
- **Google Ads:** When a returned item belongs in Google Ads, use the verified route from [Google Ads Dashboard Navigation](google-ads-dashboard-navigation.md): `https://manage.wix.com/dashboard/{metaSiteId}/google-ads`. Label the CTA **Go to Google Ads** or name the specific campaign action.
|
|
121
|
+
- **Other destinations:** Name the destination or action in the CTA, such as **Open Forms dashboard**, **Review site speed**, or **Connect Google Business Profile**. Never make several unrelated links look like the same generic action.
|
|
122
|
+
- Include only relevant destinations and list each URL once. Authorization URLs created by a later connection flow are task-specific; return one only after the user accepts that offer and the flow creates it.
|
|
123
|
+
|
|
124
|
+
Example when several tasks share the Editor:
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
## Campaign success guide
|
|
128
|
+
Landing page: [Request a quote](https://www.example.com/request-a-quote)
|
|
129
|
+
|
|
130
|
+
1. **Clarify the main call to action — Pending**
|
|
131
|
+
Make the button describe the conversion, such as “Request a quote.”
|
|
132
|
+
2. **Move a call to action above the fold — Pending**
|
|
133
|
+
Place the primary button where visitors see it without scrolling.
|
|
134
|
+
3. **Configure Google Ads search themes — Pending**
|
|
135
|
+
**I can help with this:** I can propose relevant themes and apply the set you approve.
|
|
136
|
+
|
|
137
|
+
I can take care of the search-theme update after you review the proposed set.
|
|
138
|
+
|
|
139
|
+
### Next actions
|
|
140
|
+
- [Go to Editor]({editUrl})
|
|
141
|
+
- [Go to Google Ads](https://manage.wix.com/dashboard/{metaSiteId}/google-ads)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Each link has its own destination-specific CTA, and the Editor URL appears once even though the first two recommendations both use it.
|
|
145
|
+
|
|
70
146
|
## Translate suggestion types for the user
|
|
71
147
|
|
|
72
148
|
Keep the enum value unchanged in API calls, but use these labels when explaining the guide:
|
|
@@ -95,9 +171,9 @@ The update endpoint identifies the suggestion by its **`type`**, not its suggest
|
|
|
95
171
|
|
|
96
172
|
Before executing an update:
|
|
97
173
|
|
|
98
|
-
1. Identify the campaign and a suggestion `type` currently present in its latest guide.
|
|
174
|
+
1. Identify the campaign and a suggestion `type` currently present in its latest guide. Use the current-site ID directly and follow the campaign-resolution flow above; listing that site's campaigns once is valid context resolution, but account-wide site listing is not. Ask one focused site or campaign question only when the current context or campaign results leave more than one plausible target. Do not probe several sites or guess, because the same recommendation type can exist on multiple campaigns.
|
|
99
175
|
2. Match the user's wording to one returned suggestion and infer the requested status only when it is clear: a statement that they completed the recommendation means `COMPLETED`; a request to reopen it means `OPEN`.
|
|
100
|
-
3. Execute immediately when the campaign, suggestion, and status are unambiguous. Ask one targeted clarification only when
|
|
176
|
+
3. Execute immediately when the campaign, suggestion, and status are unambiguous. The completion statement is approval for this tracking-status update; do not ask a redundant confirmation question. Ask one targeted clarification only when identity, suggestion, or intended status is unclear; never guess.
|
|
101
177
|
|
|
102
178
|
Mark an item completed:
|
|
103
179
|
|
|
@@ -112,6 +188,24 @@ curl -X POST \
|
|
|
112
188
|
}'
|
|
113
189
|
```
|
|
114
190
|
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"campaignSuccessGuide": {
|
|
194
|
+
"id": "7d4a9c2e-86f1-4b37-a2d5-9e18c6f043ab",
|
|
195
|
+
"suggestions": [
|
|
196
|
+
{
|
|
197
|
+
"type": "CLEAR_CTA_COPY",
|
|
198
|
+
"status": "COMPLETED"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "FAQ_SECTION",
|
|
202
|
+
"status": "OPEN"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
115
209
|
Reopen the same item by sending:
|
|
116
210
|
|
|
117
211
|
```json
|
|
@@ -132,7 +226,7 @@ If a mutation times out with an unknown outcome, do not retry automatically. Ret
|
|
|
132
226
|
| `PLATFORM_NOT_SUPPORTED` | Use `GOOGLE`; do not substitute another platform value. |
|
|
133
227
|
| `CAMPAIGN_TYPE_NOT_SUPPORTED` | Explain that success guides currently support Google Ads Performance Max Leads campaigns only. |
|
|
134
228
|
| `SUGGESTION_NOT_FOUND` | Retrieve the latest guide and choose a `type` actually present; do not keep retrying stale data. |
|
|
135
|
-
| Authentication or permission error | Stop after the first rejected campaign or guide call and explain that the current collaborator cannot access or modify it. Do not try alternate base URLs, infer that Google Ads is not installed, or probe other endpoints to bypass authorization. |
|
|
229
|
+
| Authentication or permission error | Stop after the first rejected campaign or guide call and explain that the current collaborator cannot access or modify it. Do not try alternate base URLs, infer that Google Ads is not installed, or probe other sites or endpoints to bypass authorization. |
|
|
136
230
|
|
|
137
231
|
## References
|
|
138
232
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Generate and Read a Wix Site's Content Plan"
|
|
3
|
-
description: Generate an SEO content plan and read its blog post topics, or troubleshoot an existing content plan flow stuck at KEYWORD_RESEARCH while polling GetContentPlanFlow. Use this recipe for both generation and stalled-flow questions: it explains the intentional pause, the Create Content Plan release request, missing flow IDs, and the exact public API paths and response fields.
|
|
3
|
+
description: "Generate an SEO content plan and read its blog post topics, or troubleshoot an existing content plan flow stuck at KEYWORD_RESEARCH while polling GetContentPlanFlow. Use this recipe for both generation and stalled-flow questions: it explains the intentional pause, the Create Content Plan release request, missing flow IDs, and the exact public API paths and response fields."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Generate and Read a Wix Site's Content Plan
|