@wix/agent-skills 1.31.1 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +4 -12
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +39 -15
  4. package/skills/wix-app/references/BACKEND_API.md +1 -1
  5. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +11 -8
  6. package/skills/wix-app/references/SDK_MODULE_MAP.md +1 -1
  7. package/skills/wix-app/references/STORES_VERSIONING.md +24 -2
  8. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +9 -13
  9. package/skills/wix-app/references/dashboard-page/IMAGE_RENDERING.md +61 -0
  10. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +54 -64
  11. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +14 -21
  12. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +37 -30
  13. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +43 -29
  14. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +40 -39
  15. package/skills/wix-app/references/editor-react-component/PARTS.md +8 -6
  16. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +22 -2
  17. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +39 -16
  18. package/skills/wix-app/scripts/sdk-curated.json +45 -0
  19. package/skills/wix-app/scripts/sdk-lookup.cjs +1180 -0
  20. package/skills/wix-base44-connector/SKILL.md +4 -2
  21. package/skills/wix-base44-connector/scripts/utils.cjs +5 -2
  22. package/skills/wix-headless-kit/SKILL.md +20 -8
  23. package/skills/wix-headless-kit/guides/api-run.md +92 -68
  24. package/skills/wix-headless-kit/guides/existing-site.md +6 -0
  25. package/skills/wix-headless-kit/install/AGENTS.md +3 -2
  26. package/skills/wix-headless-kit/install/attach.mjs +32 -27
  27. package/skills/wix-headless-kit/install/background.mjs +32 -0
  28. package/skills/wix-headless-kit/install/bootstrap.mjs +28 -11
  29. package/skills/wix-headless-kit/install/check.mjs +2 -2
  30. package/skills/wix-headless-kit/install/context.mjs +49 -5
  31. package/skills/wix-headless-kit/install/deploy.mjs +33 -8
  32. package/skills/wix-headless-kit/install/env-ignore.mjs +16 -0
  33. package/skills/wix-headless-kit/install/install.mjs +95 -0
  34. package/skills/wix-headless-kit/install/pins.json +1 -1
  35. package/skills/wix-headless-kit/install/proc.mjs +46 -0
  36. package/skills/wix-headless-kit/install/setup.mjs +16 -25
  37. package/skills/wix-headless-kit/install/templates.mjs +2 -2
  38. package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +3 -2
  39. package/skills/wix-headless-templates/blog/project/package-lock.json +1287 -1299
  40. package/skills/wix-headless-templates/blog/project/package.json +1 -1
  41. package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +3 -2
  42. package/skills/wix-headless-templates/blog/rest/authors.ts +5 -5
  43. package/skills/wix-headless-templates/blog/rest/comments.ts +4 -4
  44. package/skills/wix-headless-templates/blog/rest/post-likes.ts +3 -3
  45. package/skills/wix-headless-templates/blog/rest/posts.ts +4 -4
  46. package/skills/wix-headless-templates/blog/rest/taxonomy.ts +5 -5
  47. package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +2 -1
  48. package/skills/wix-headless-templates/bookings/rest/booking.ts +4 -4
  49. package/skills/wix-headless-templates/bookings/rest/services.ts +4 -4
  50. package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +2 -1
  51. package/skills/wix-headless-templates/cms/rest/collections.ts +3 -3
  52. package/skills/wix-headless-templates/cms/rest/items.ts +4 -4
  53. package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +2 -1
  54. package/skills/wix-headless-templates/donations/rest/campaigns.ts +4 -4
  55. package/skills/wix-headless-templates/donations/rest/donate.ts +3 -3
  56. package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +2 -1
  57. package/skills/wix-headless-templates/events/rest/events.ts +4 -4
  58. package/skills/wix-headless-templates/events/rest/orders.ts +4 -4
  59. package/skills/wix-headless-templates/events/rest/registration.ts +4 -4
  60. package/skills/wix-headless-templates/events/seed/seed-events.mjs +2 -1
  61. package/skills/wix-headless-templates/faq/rest/faq.ts +4 -4
  62. package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +2 -1
  63. package/skills/wix-headless-templates/forms/rest/forms.ts +4 -4
  64. package/skills/wix-headless-templates/forms/rest/submissions.ts +4 -4
  65. package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +2 -1
  66. package/skills/wix-headless-templates/members/rest/auth.ts +3 -3
  67. package/skills/wix-headless-templates/members/rest/members.ts +4 -4
  68. package/skills/wix-headless-templates/members/seed/seed-members.mjs +2 -1
  69. package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +4 -4
  70. package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +2 -1
  71. package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +3 -3
  72. package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +4 -4
  73. package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +3 -3
  74. package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +2 -1
  75. package/skills/wix-headless-templates/rentals/rest/rentals.ts +4 -4
  76. package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +2 -1
  77. package/skills/wix-headless-templates/restaurants/rest/menu.ts +4 -4
  78. package/skills/wix-headless-templates/restaurants/rest/ordering.ts +5 -5
  79. package/skills/wix-headless-templates/restaurants/rest/reservations.ts +4 -4
  80. package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +2 -1
  81. package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +4 -4
  82. package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +6 -4
  83. package/skills/wix-headless-templates/shared/seed/main.mjs +15 -0
  84. package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +43 -11
  85. package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +1 -1
  86. package/skills/wix-headless-templates/storefront/rest/cart.ts +5 -5
  87. package/skills/wix-headless-templates/storefront/rest/catalog.ts +5 -5
  88. package/skills/wix-headless-templates/storefront/seed/SEED.md +27 -9
  89. package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +2 -1
  90. package/skills/wix-manage/SKILL.md +31 -9
  91. package/skills/wix-manage/references/app-installation/install-wix-apps.md +5 -1
  92. package/skills/wix-manage/references/app-installation/list-installed-apps.md +19 -9
  93. package/skills/wix-manage/references/automations/actions.md +134 -0
  94. package/skills/wix-manage/references/automations/activation-status.md +64 -48
  95. package/skills/wix-manage/references/automations/api-catalog.md +213 -77
  96. package/skills/wix-manage/references/automations/automation-model.md +199 -0
  97. package/skills/wix-manage/references/automations/bracket-expressions.md +132 -0
  98. package/skills/wix-manage/references/automations/build-and-manage-automations.md +305 -26
  99. package/skills/wix-manage/references/automations/triggers.md +190 -0
  100. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -0
  101. package/skills/wix-manage/references/bookings/external-calendar-integration.md +3 -0
  102. package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +3 -0
  103. package/skills/wix-manage/references/cms/cms-data-items-crud.md +11 -2
  104. package/skills/wix-manage/references/cms/cms-publishing-flow.md +63 -16
  105. package/skills/wix-manage/references/collaborators/manage-site-collaborators.md +128 -0
  106. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +3 -1
  107. package/skills/wix-manage/references/forms/read-forms-and-submissions.md +277 -0
  108. package/skills/wix-manage/references/forms/update-form.md +8 -0
  109. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +3 -0
  110. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +3 -0
  111. package/skills/wix-manage/references/seo/manage-url-redirects.md +33 -4
  112. package/skills/wix-manage/references/sites/create-headless-site.md +16 -50
  113. package/skills/wix-manage/references/sites/manage-oauth-apps.md +4 -4
  114. package/skills/wix-manage/references/sites/read-site-context.md +4 -0
  115. package/skills/wix-manage/references/sites/upload-static-site.md +368 -261
  116. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +3 -0
  117. package/skills/wix-manage/references/stores/change-store-currency.md +3 -0
  118. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +3 -0
  119. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +3 -0
  120. package/skills/wix-manage/references/stores/update-product-with-options.md +192 -22
  121. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +3 -3
@@ -92,7 +92,7 @@ curl -X POST \
92
92
 
93
93
  Before installing, refer to the [Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix) documentation to find the correct `appDefId` for the app you want to install.
94
94
 
95
- Some common apps:
95
+ Some common apps (`appDefId`; [List Installed Apps](list-installed-apps.md) shows which of them a site already has):
96
96
  | App | appDefId |
97
97
  |-----|----------|
98
98
  | Wix Stores | `215238eb-22a5-4c36-9e7b-e7c08025e04e` |
@@ -102,6 +102,10 @@ Some common apps:
102
102
  | Wix Multilingual | `14d84998-ae09-1abf-c6fc-3f3cace5bf19` |
103
103
  | Wix Pricing Plans | `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3` |
104
104
  | Wix CMS | `e593b0bd-b783-45b8-97c2-873d42aacaf4` |
105
+ | Wix Forms | `225dd912-7dea-4738-8688-4b8c6955ffc2` |
106
+ | Wix Restaurants Menus | `b278a256-2757-4f19-9313-c05c783bec92` |
107
+ | Wix Restaurants Orders (online ordering) | `9a5d83fd-8570-482e-81ab-cfa88942ee60` |
108
+ | Wix Table Reservations | `f9c07de2-5341-40c6-b096-8eb39de391fb` |
105
109
 
106
110
  ### IMPORTANT NOTES:
107
111
  - NEVER guess the `appDefId`. For Wix-built apps, use the table above. For any other app, resolve the ID using Step 0 (Search Market Listings).
@@ -8,7 +8,10 @@ This recipe guides you through listing all installed apps on a Wix site using th
8
8
 
9
9
  ## Prerequisites
10
10
 
11
- - Site ID for the site you want to check
11
+ - A token scoped to the site: the call takes no site parameter and answers for the site the token is
12
+ for. With the Wix CLI, `npx @wix/cli@latest token --site <siteId>`; through the Wix MCP, `ExecuteWixAPI`
13
+ with `scope: 'site'` and the `siteId`. An account token, with or without a `wix-site-id` header, answers
14
+ an empty list, which looks like a site with no apps.
12
15
 
13
16
  ## Required APIs
14
17
 
@@ -18,7 +21,10 @@ This recipe guides you through listing all installed apps on a Wix site using th
18
21
 
19
22
  ## Step 1: Query Installed Apps
20
23
 
21
- Use the Get Installed Apps endpoint to retrieve all apps installed on a site.
24
+ Use the Get Installed Apps endpoint to retrieve all apps installed on a site. It returns every app
25
+ instance, including the dozens of platform apps every site carries, as ids only: the response has no
26
+ names; match them against the table in Step 2. [Read Account or Site Context](../sites/read-site-context.md)
27
+ has the names, but its list can lag an install by many minutes; this call is immediate.
22
28
 
23
29
  **Endpoint**: `GET https://www.wixapis.com/apps-installer-service/v1/app-instances`
24
30
 
@@ -26,7 +32,7 @@ Use the Get Installed Apps endpoint to retrieve all apps installed on a site.
26
32
  ```bash
27
33
  curl -X GET \
28
34
  'https://www.wixapis.com/apps-installer-service/v1/app-instances' \
29
- -H 'Authorization: <AUTH>' \
35
+ -H "Authorization: $(npx @wix/cli@latest token --site <SITE_ID>)" \
30
36
  -H 'Content-Type: application/json'
31
37
  ```
32
38
 
@@ -36,8 +42,7 @@ curl -X GET \
36
42
  "appInstances": [
37
43
  {
38
44
  "id": "instance-id-1",
39
- "appDefId": "1380b703-ce81-ff05-f115-39571d94dfcd",
40
- "version": "^0.0.0",
45
+ "appDefId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
41
46
  "enabled": true,
42
47
  "status": "UNKNOWN"
43
48
  },
@@ -61,12 +66,17 @@ Match the `appDefId` values from the response against known Wix app IDs.
61
66
 
62
67
  | App | appDefId |
63
68
  |-----|----------|
64
- | Wix Stores | `1380b703-ce81-ff05-f115-39571d94dfcd` |
69
+ | Wix Stores | `215238eb-22a5-4c36-9e7b-e7c08025e04e` |
70
+ | Wix Checkout & Orders (installed with Stores) | `1380b703-ce81-ff05-f115-39571d94dfcd` |
65
71
  | Wix Bookings | `13d21c63-b5ec-5912-8397-c3a5ddb27a97` |
66
72
  | Wix Blog | `14bcded7-0066-7c35-14d7-466cb3f09103` |
67
73
  | Wix Events | `140603ad-af8d-84a5-2c80-a0f60cb47351` |
68
74
  | Wix Pricing Plans | `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3` |
69
- | Wix Restaurants | `13e8d036-5516-6f75-e025-2aca3b5d7930` |
75
+ | Wix CMS (Wix Data) | `e593b0bd-b783-45b8-97c2-873d42aacaf4` |
76
+ | Wix Forms | `225dd912-7dea-4738-8688-4b8c6955ffc2` |
77
+ | Wix Restaurants Menus | `b278a256-2757-4f19-9313-c05c783bec92` |
78
+ | Wix Restaurants Orders (online ordering) | `9a5d83fd-8570-482e-81ab-cfa88942ee60` |
79
+ | Wix Table Reservations | `f9c07de2-5341-40c6-b096-8eb39de391fb` |
70
80
 
71
81
  For a complete list, see [Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
72
82
 
@@ -111,8 +121,8 @@ If you receive `401 Unauthorized` or `403 Forbidden` errors from Wix APIs:
111
121
  - Check that the token has `APP-MARKET.VIEW-INSTALLED-APP` permission
112
122
 
113
123
  ### Empty Response
114
- - The site may have no additional apps installed beyond core Wix functionality
115
- - This is normal for new or minimal sites
124
+ - Every site carries dozens of platform app instances, so an empty list means the token was not scoped to
125
+ the site (an account token answers empty), not a site with no apps. Mint a site token and call again.
116
126
 
117
127
  ---
118
128
 
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: "Automations Action Configuration"
3
+ description: "Configure app-defined automation actions from their input schemas and preserve supported existing action mappings."
4
+ ---
5
+
6
+ > **Stage scope:** this stage covers only what [Build and Manage Wix Automations](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) lists; do not perform anything marked "Later stages only" or any workflow that needs a guide marked "not yet published". "Stage", "Later stages only" and "not yet published" describe how this skill is being rolled out; never mention them to the user. Explain a limit in product terms: what can't be done through the API here and where the user can do it instead (for example, in the automations builder).
7
+
8
+ # App-Defined Actions — Discovery, Schemas, Input Mapping
9
+
10
+ **TL;DR**
11
+
12
+ - An action is `appId` + `actionKey`. Find real ones with **Resolve Actions** (site catalog), then read the version active on the site with **Get Runtime Action**. Never invent keys.
13
+ - The configuration is `appDefinedInfo.inputMapping`: an object keyed ONLY by input-schema property names, with values of the schema's type — literals, or `{{…}}` formulas in fields the UI schema marks as dynamic.
14
+ - Fields marked `updateSchemaOnChange: true` reveal more inputs once set → **Get Action Dynamic Input Schema**. Output that depends on configuration → **Get Action Dynamic Output Schema** after the mapping is final.
15
+ - **Later stages only — email is outside stage 2:** **Send an email** (`triggered-emails`): initialize each NEW step with **Generate Action Input Mapping**, persist the returned mapping unchanged, then configure content with Get / Set Email Content (Automations Email Actions (not yet published)). Existing content-only edits do not initialize another email.
16
+ - Entity-selector fields take **ids**, never display names (Automations Entity and Provider Configuration (not yet published)).
17
+ - Before accepting any action, prove its side effect and its recipient (§6).
18
+
19
+ ---
20
+
21
+ ## 1. APIs used here
22
+
23
+ Site-scoped (`wix-site-id` header), SDK module `actionCatalog`: Resolve Actions · Get Runtime Action (the version this site runs — use it) · Get Action Dynamic Input / Output Schema (+ bulk output). Paths and request shapes: [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog) §4.
24
+
25
+ ## 2. Finding the right action
26
+
27
+ 1. Resolve Actions with small pages (`{"query": {"paging": {"limit": 25}}}`); filter by `appId` when known, otherwise search locally over `displayName`, `description`, `actionKey` with a keyword ladder (phrase → domain verb/noun → synonyms).
28
+ 2. Read the `description`. A name like "Add a coupon" or "Get a …" can be a value-producing step that notifies nobody.
29
+ 3. Get Runtime Action for the 1–3 best candidates; build against that version's `inputSchema`, `outputSchema`, `interfaceConfiguration`.
30
+ 4. An action missing from Resolve Actions is not usable on this site. The builder shows such a step as "action not found" and blocks it.
31
+
32
+ **Do not use** unsupported or deprecated actions — `send-mail` (→ `triggered-emails`), `send-coupon-action` (→ `wixcoupons-retrieve_coupon` + a delivery step that uses its code), `wix_automations-velo_action`, `wix_automations-data_manipulation_code` (code variable; public Create refuses it — §4 of Automations Delays Variables and Branches (not yet published)), `whatsapp-send-message` (WhatsApp), `forward-to-zapier` (Zapier), and site actions `wix_automations-wix_api_integration` (non-public). Match these by `actionKey` (+ `appId`), not by app or display name — other actions of the same app are fine. Reasons and replacements: §2 of Automations Feasibility and Planning (not yet published) (site actions: §1).
33
+
34
+ ### Selection rules
35
+
36
+ - Prefer a normal built-in action over any AI action.
37
+ - **Direct action beats communication**: "apply the change" is the change, not an email about it — unless messaging was asked for.
38
+ - **Delivery beats retrieval**: "send the customer a coupon" needs a delivery step. A staging action alone is incomplete; its output must be consumed by a delivery step on the same path.
39
+ - Replacing an unsupported external integration: keep the channel (chat stays chat-like).
40
+ - AI ladder — first that fits: (1) **Delegate to Aria** `ai_assistants-delegate-to-assistant`: autonomous agent, output NOT used downstream (exposes only `summary`); (2) **Custom agent** `ai_custom_agent_bm-delegate_to_agent`: autonomous agent whose output IS used downstream; (3) **Generate or analyze text** `wix_automations-llm_call`: pure LLM over data already in the payload; no tools, no internet. "LLM step" → (3). When later steps need several structured fields, use (3) with an override output schema — not a single-string text action.
41
+ - Ask the user to choose between overlapping actions only when the difference is user-facing and context doesn't decide it.
42
+
43
+ ## 3. Reading the action
44
+
45
+ - `inputSchema` — JSON Schema of the mapping. `required` = must map. `oneOf`/`const` = enum. `format`, `wixCustomType`, `identityType` as in [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration) §3.
46
+ - `interfaceConfiguration.type` — `GENERIC` → the builder renders a form from `inputSchema` + `genericOptions.uiSchema` (rules in §5.2). `WIDGET_COMPONENT` → the app's own configuration widget, which you can't see (below).
47
+ - `interfaceConfiguration.genericOptions.uiSchema` — per-field UI hints (below). It cannot add fields.
48
+ - `outputSchema` — fields downstream steps read as `var("<namespace>.<field>")`. Empty and no dynamic output → later steps must not reference its namespace.
49
+ - `implementedMethods` — `validateConfiguration` (the app validates your mapping on Validate Automation), `getQuotaInfo`. It does **not** tell you about dynamic schemas — decide by `updateSchemaOnChange` and by calling the dynamic-output API.
50
+
51
+ **`WIDGET_COMPONENT` actions.** The widget owns the mapping; the builder's form rules don't apply to it. In these guides an *opaque widget* is a `WIDGET_COMPONENT` action whose `inputSchema` does not fully describe the requested configuration. If `inputSchema` fully describes what the user asked for (e.g. `addLabelsToContact`: `contactId` + `labelKeys`), hand-author it (§5.2) and tell the user to review the step; otherwise tell the user this step can’t be configured through the API here and that they can set it up in the automations builder. If the widget can't load (its app is uninstalled), the builder shows an "app not installed" state with a Replace button instead of the settings.
52
+
53
+ Conditional fields (`if`/`then`/`dependencies`, e.g. a due date shown only when "add a due date" is true): set the toggle and the dependent field together, or leave both out.
54
+
55
+ UI-schema keys that change what you may write:
56
+
57
+ - `dynamicValuesOptions.enabled: true` → the field accepts `{{…}}` formulas. `strict: true` → the formula must return the field's exact type/format. **A field without it is static: literal only.**
58
+ - `"ui:widget": "EntitySelector"` + `entitySelectorOptions` (`selectorId`/`tag`, `filters`, `dynamicFiltersMapping`) → entity picker; value = id or array of ids (§1 of Automations Entity and Provider Configuration (not yet published)). Same for input properties carrying `itemsSelectionConfiguration`.
59
+ - `"ui:field": "AudienceSelector"` → an audience object owned by the app's picker; don't hand-author it — the user sets it in the builder.
60
+ - `"ui:field": "TextSectionField"` → display-only text; never map it.
61
+ - `"ui:widget": "hidden"`, `ui:readonly` → keep the schema `default`. Other `ui:*` keys are presentation only.
62
+
63
+ ## 4. Dynamic input and output schemas
64
+
65
+ - **Input**: a property with `updateSchemaOnChange: true` (e.g. a template or form id) changes which inputs exist. Set it, then call Get Action Dynamic Input Schema with `{appId, actionKey, inputMapping}` (the mapping so far). The builder shows the static schema **merged** with the returned one (properties and `required` united), so keys from either are kept. Repeat if another controlling field is revealed. Never invent a field you expected but didn't get — it appears only after its controlling selection. The builder re-fetches this schema from your saved mapping every time the step is opened, so a dynamic key whose controlling value isn't in the mapping is dropped on the first edit.
66
+ - **Output**: after the mapping is final, call Get Action Dynamic Output Schema (or the bulk variant) and use the returned `outputSchema` for downstream `var()` paths. A dynamic output is a _real_ schema — never replace it with an override (allowlist: §3 of Automations Schemas and Scheduling (not yet published)).
67
+
68
+ ## 5. Building the input mapping
69
+
70
+ ### 5.1 Provider-owned mappings — email and opaque widgets
71
+
72
+ > **Later stages only:** email and other opaque-widget configuration is not available in stage 2; this section is published in stage 4.
73
+
74
+ **In this stage:** never invent an opaque widget's mapping or its app-owned keys; tell the user which action to add in the builder and how it should be configured.
75
+
76
+ ### 5.2 Hand-authored mapping
77
+
78
+ MUST (builder renderability — the `GENERIC` form drops, rewrites or flags anything else):
79
+
80
+ - Keys: only properties of the current (merged dynamic) input schema. The form drops unknown keys on the first edit.
81
+ - Values: the schema's type — string→string, number/integer→number, boolean→boolean, array→array, object→object field by field (e.g. MONEY `{"value": "…", "currency": "…"}`).
82
+ - Every `required` field present. An action with visible fields and a missing/`null` `inputMapping` is flagged "missing required info" and its panel can't be applied.
83
+ - An action with no input properties (or only hidden ones): send `"inputMapping": {}` — the builder writes `{}` itself on open otherwise.
84
+ - Map fields the form would auto-fill, or opening the step silently changes the automation: fields with a schema `default` (write the default or your value), every `identityType` input (the form auto-maps it when exactly one matching payload path exists), required `date`/`date-time`/`time` strings (else filled with "now").
85
+ - Enum fields (`oneOf` / `enum`): one of the listed constants.
86
+ - Entity-selector fields: real ids of the right kind and shape (§1 of Automations Entity and Provider Configuration (not yet published)).
87
+ - `{{…}}` only in fields with `dynamicValuesOptions.enabled` (or an `identityType` field), per [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions) §4: number/boolean hold exactly one expression of that type; date-time a single date-time expression or ISO literal; strings may mix text and expressions. An **array-typed** `var()` in a string field is flagged as a format mismatch.
88
+ - Don't copy volatile values: dates → `now()`/payload dates; ids → resolved at build time, never from examples.
89
+ - Keep what the user describes for one field in that field. A subject described as "Order received, then the customer's first name" is one `subject` string mixing text and expressions (`"Order received {{var(…)}}"`); don't split its values into other fields, such as a message's `fields` rows.
90
+
91
+ Value kinds:
92
+
93
+ ```json
94
+ {
95
+ "subject": "Welcome, {{var(\"contact.name.first\")}}!",
96
+ "priority": "HIGH",
97
+ "notifyCustomer": true,
98
+ "amount": {
99
+ "value": "{{var(\"order.total.value\")}}",
100
+ "currency": "{{var(\"order.total.currency\")}}"
101
+ },
102
+ "contactId": "{{var(\"contactId\")}}",
103
+ "labelKeys": ["<label-key-1>"],
104
+ "note": "Order {{var(\"order_number\")}} from {{var(\"createTask-1.taskId\")}}"
105
+ }
106
+ ```
107
+
108
+ Trigger fields have no prefix; action outputs use the step's `namespace` (e.g. `createTask-1.taskId`); set-variables use `setVariable.<key>`.
109
+
110
+ Optional inputs with no `default` (e.g. `isDueDate`, `onlyWhenAvailable`): omit them unless the request needs them. A deprecated defaulted input (e.g. `labelIds: []` on add-label) may be omitted.
111
+
112
+ Process: (1) fetch the effective schema (§4) before you write a mapping or any script that saves one — never guess an action's field names → (2) classify required vs optional; map optional fields only with a real source → (3) source each required field from payload, upstream outputs or the user; ask for user-specific content (text, recipient, which entity) → (4) build → (5) self-check against the list above → (6) Validate Automation.
113
+
114
+ ### 5.3 Validation errors on actions
115
+
116
+ Error shape, error type → fix, and how the builder shows each: [Build and Manage Wix Automations — included validation procedure](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) §2. Must-know here: fix the field named by `configurationError.fieldKey` — never delete a field to silence it; `CRITICAL` blocks (status `INVALID`), `WARNING` doesn't but must be reported; a `var()` path that doesn't exist may NOT be reported — verify paths yourself.
117
+
118
+ ## 6. Side-effect and recipient review
119
+
120
+ This section owns the semantic review (you, not code) required for every action before acceptance. Confirm from its catalog entry and effective schemas:
121
+
122
+ - **Verb**: it performs what was asked (assign/add/send/create/update/delete). A read-only "get" action can't satisfy a mutation; sending a message about a change is not the change.
123
+ - **Entity**: the affected entity has a matching input (e.g. a label picker for "add label").
124
+ - **Identity input**: the id it acts on, with the right `identityType`.
125
+ - **Recipient lineage** (email, chat, SMS, push): write down `{requestedAudience, resolvedAudienceKind (contact|visitor|owner|contributor|label|phone|device), resolvedIdentityPath}`. The trigger contact and a contact created upstream are different people even if both are `contactId`. Wording never proves the recipient.
126
+ - **Later stages only — email is outside stage 2:** Email: the audience fields decide — read `selectedAudience` / `contactId` exactly as in §3 of Automations Email Actions (not yet published) ("Recipient encoding"). A root `contactId` or `triggerContactExcluded` alone doesn't prove who receives it.
127
+ - Chat (`send-message`): only a schema-supported contact-id or visitor-id route; owner/team chat needs a different, proven component or a clarification.
128
+ - SMS / push: prove the schema-supported contact, audience, phone or device route.
129
+
130
+ Under-required schemas: `send-message` requires only `contactId`/`visitorId` (anyOf), not the text. Always map the message too — a required-fields-only mapping ships an empty action.
131
+
132
+ ## 7. Common failure modes
133
+
134
+ Missing required field or content-free required-only mapping · fabricated user values instead of asking · type/format mismatch, free text in an enum, a name in an id field · `var()` to a path absent from the aggregated schema (or from an unfetched dynamic schema) · formula in a static field or an unknown function · wrong verb or recipient · a single-value field filled from an array · unmapped defaults / identity fields / missing `{}` (the builder rewrites the step on first open).
@@ -1,52 +1,68 @@
1
1
  ---
2
2
  name: "Automations Activation Status"
3
- description: "Read an automation’s current ACTIVE or INACTIVE status and distinguish it from historical run outcomes."
3
+ description: "Read an automation’s current ACTIVE or INACTIVE status, and activate or deactivate it when the user asks."
4
4
  ---
5
5
 
6
- # Inspect activation status
7
-
8
- An automation's current state is `configuration.status`: ACTIVE is eligible for new trigger
9
- events; INACTIVE is not. Neither value proves that a historical run succeeded or that a
10
- pending activation has stopped.
11
-
12
- 1. Resolve the requested name with one Query Automations call filtered by that exact name
13
- (below); don't page through other automations. If the ID is already supplied, go to Get.
14
- If several match, open your answer by listing each match's full returned ID and asking
15
- which one the user means; don't report a single status. If none match, say so and ask the
16
- user to check the name or site; never guess an ID.
17
- 2. Get the matching returned ID and read `configuration.status`.
18
- 3. Answer briefly and completely in one reply. Start with the automation's exact name, its
19
- returned ID and ACTIVE/INACTIVE from that response, then say what it means for new trigger
20
- events. If the user asks whether the status says anything about past runs, answer it
21
- directly in the next sentence: status does not show whether past runs succeeded; they are
22
- visible in the automation's activity view in the site dashboard.
23
- 4. If Get returns not found, do not state a status. Open with: the automation wasn't found on
24
- this site, so its status can't be determined, and ask the user to confirm the site and the
25
- automation ID. This question is required. Then give the possible causes below.
26
-
27
- Use an authorized site-scoped client with Set Up Automations permission. REST calls use
28
- `Authorization: <token>`. An API key also needs `wix-site-id: <metaSiteId>`; do not combine it
29
- with `wix-account-id`. Never print credentials.
30
-
31
- `POST https://www.wixapis.com/automations-service/v2/automations/query`
32
-
33
- ```json
34
- {"query":{"filter":{"name":"<automation name>"},"cursorPaging":{"limit":25}}}
35
- ```
36
-
37
- Read `automations[]` and `pagingMetadata.cursors.next`; continue pages if needed. Retain the
38
- returned `id` and exact name. Then:
39
-
40
- `GET https://www.wixapis.com/automations-service/v2/automations/<automationId>`
41
-
42
- Read `automation.configuration.status` from the Get response. Never infer status from the
43
- name or a previous mutation. Do not validate, change configuration, toggle status or test-run
44
- an automation to answer this read-only request.
45
-
46
- Not-found causes (step 4): unpublished builder drafts do not appear
47
- through this API, but a 404 can also mean deletion or a changed ID after overriding a
48
- preinstalled automation. When the user's history supports an unpublished builder draft as the
49
- cause, ask the owner to publish or discard it rather than reproducing its edits.
50
-
51
- Official contracts: [Query Automations](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/query-automations),
52
- [Get Automation](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/get-automation).
6
+ > **Stage scope:** this stage covers only what [Build and Manage Wix Automations](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) lists; do not perform any workflow that needs a guide marked "not yet published". "Stage" and "not yet published" describe how this skill is being rolled out; never mention them to the user. Explain a limit in product terms: what can't be done through the API here and where the user can do it instead (for example, in the automations builder).
7
+
8
+ # Activation status and lifecycle
9
+
10
+ **What the public API can see.** An automation's live state is `configuration.status` —
11
+ `ACTIVE` (eligible for new trigger events) or `INACTIVE` (not eligible for new trigger events).
12
+ Status does not show whether past runs succeeded. There is no separate
13
+ "published" flag and no public draft API:
14
+
15
+ - **Status check** = Get Automation → read `configuration.status`. Report exactly that value, in a
16
+ short answer that starts with the automation's name and returned ID;
17
+ never infer it from the name or from your own earlier writes. If several automations match the
18
+ supplied name, list each one's returned ID and end with a direct question such as "Which one
19
+ do you mean?"; don't report a single status. If no automation matches the supplied name, say
20
+ so and ask the user to check the name or site; never guess an ID.
21
+ - **Builder drafts are invisible to you**: if the user says "it doesn't show my latest changes",
22
+ tell them to publish (or discard) in the builder first — don't reproduce their edits.
23
+ - **NOT_FOUND is ambiguous.** Open the answer by saying the status can't be determined and
24
+ asking the user to confirm the site and the automation ID; then give the possible causes. A never-published builder draft is absent
25
+ from Get/Query, but deletion and a replaced preinstalled id can also explain a 404. The first
26
+ update of a preinstalled automation can create an override with a new id; use the mutation's
27
+ returned id, or Query to find the current automation and confirm its identity. When the
28
+ user's history supports an unpublished builder draft as the cause, ask the owner to publish or
29
+ discard it rather than reproducing its edits.
30
+
31
+ **Calls** (auth as in [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog) §1). A status question needs only Query and Get — no catalogs, Validate or writes.
32
+
33
+ - Find by name: `POST https://www.wixapis.com/automations-service/v2/automations/query` with
34
+ `{"query":{"filter":{"name":"<automation name>"},"cursorPaging":{"limit":25}}}` → `automations[]`
35
+ with each `id` and exact `name`. If the user supplied the ID, skip this.
36
+ - Read: `GET https://www.wixapis.com/automations-service/v2/automations/<automationId>` → `automation.configuration.status`. Add
37
+ `?fields=OVERRIDE_SCHEMA` before activating or deactivating.
38
+ - Activate / deactivate: `PATCH https://www.wixapis.com/automations-service/v2/automations/<automationId>` with
39
+ `{"automation": <the object exactly as fetched, with only configuration.status changed>}` — it
40
+ carries `id`, the current `revision`, `origin` and any `settings` the Get returned.
41
+
42
+ **Activate** (only when the user asks):
43
+
44
+ 1. Get Automation with `fields: ["OVERRIDE_SCHEMA"]` → current `revision`, `origin`, `settings`.
45
+ If `settings.disableStatusChange`
46
+ or `settings.readonly` is true, stop and report the lock: the owning app doesn't allow it
47
+ (§4 of Automations Feasibility and Planning (not yet published)).
48
+ 2. Already `ACTIVE` → report it and stop (idempotent; no write).
49
+ 3. Set only the candidate's status to `ACTIVE`, then apply the §4 checklist in [Build and Manage Wix Automations — included validation procedure](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) and full Validate — never activate
50
+ an automation that doesn't validate. Preserve existing supported configurations as the §4 checklist in [Build and Manage Wix Automations — included validation procedure](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) explains.
51
+ 4. Explicit activation instructions authorize this change; do not ask again. If the user only
52
+ asked to build or inspect it, obtain authorization before making it eligible for real runs.
53
+ 5. Update Automation with the object exactly as fetched, `configuration.status: "ACTIVE"`, and
54
+ its `revision`. Nothing else changes.
55
+ 6. Capture the returned id (a preinstalled override can change it), Get that id again with
56
+ override schemas, and confirm `configuration.status` is `ACTIVE` and all other requested
57
+ content is unchanged. Report "active" only then.
58
+
59
+ **Deactivate** (on explicit request): Get the complete object with override schemas; check
60
+ `settings.disableStatusChange` and `settings.readonly`; already INACTIVE means no write.
61
+ Otherwise change only `configuration.status` to `INACTIVE`, preserving origin, settings,
62
+ revision, schemas and all nodes, then Update and read back the returned id. **Do not run the §4 checklist in [Build and Manage Wix Automations — included validation procedure](https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations) or
63
+ Validate as a prerequisite**, and do not repair or remove unrelated invalid/legacy steps.
64
+ An explicit request to turn it off is sufficient authorization. Deactivating prevents new
65
+ triggered runs; it is not proof that every pending/running activation has stopped or will finish.
66
+
67
+ **Revision conflicts** (someone published from the builder meanwhile): re-Get and retry once;
68
+ if the fresh object differs in ways that matter, tell the user instead of overwriting.