@wix/agent-skills 1.32.0 → 1.33.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 +21 -0
- package/package.json +2 -2
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +40 -41
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +11 -6
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +2 -3
- package/skills/wix-app/references/editor-react-component/DISABLED-INVALID.md +31 -0
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +14 -1
- package/skills/wix-app/references/editor-react-component/PARTS.md +32 -3
- package/skills/wix-app/references/editor-react-component/SSR.md +6 -3
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-manage/SKILL.md +25 -7
- package/skills/wix-manage/references/automations/actions.md +11 -11
- package/skills/wix-manage/references/automations/activation-status.md +6 -9
- package/skills/wix-manage/references/automations/api-catalog.md +48 -32
- package/skills/wix-manage/references/automations/automation-model.md +97 -22
- package/skills/wix-manage/references/automations/bracket-expressions.md +7 -7
- package/skills/wix-manage/references/automations/build-and-manage-automations.md +140 -309
- package/skills/wix-manage/references/automations/conditions.md +187 -0
- package/skills/wix-manage/references/automations/schemas-and-scheduling.md +191 -0
- package/skills/wix-manage/references/automations/special-actions.md +210 -0
- package/skills/wix-manage/references/automations/triggers.md +47 -10
- package/skills/wix-manage/references/automations/validation-and-verification.md +320 -0
- package/skills/wix-manage/references/custom-apps/use-app-tools.md +124 -0
- package/skills/wix-manage/references/events/create-wix-event.md +136 -73
- package/skills/wix-manage/references/events/manage-event-guests.md +366 -0
- package/skills/wix-manage/references/events/manage-event-tickets.md +293 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +313 -55
- package/skills/wix-manage/references/stores/update-product-with-options.md +58 -2
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +0 -208
|
@@ -1,313 +1,144 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Build and Manage Wix Automations"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Create, update, activate or deactivate Wix Automations with app actions, trigger filters, conditions, delays, variables, branches and schedules, and check their current status, using the public Wix Automations APIs."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- **
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
(`
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
on this site → re-resolve; pick another action or tell the user.
|
|
146
|
-
- `DEPRECATED` — the builder shows "Action will be removed soon" → use its replacement
|
|
147
|
-
(§2 of Automations Feasibility and Planning (not yet published)).
|
|
148
|
-
- `INVALID_MAPPING` → remove keys not in the effective schema; re-fetch the dynamic input schema.
|
|
149
|
-
- `MAPPING_TYPE_MISMATCH` → convert (`toString`, `toNumber`), map another field, or build the
|
|
150
|
-
object shape (e.g. MONEY).
|
|
151
|
-
- `MAPPING_MISSING_REQUIRED_FIELD` → map it from the payload or ask the user; never a dummy value.
|
|
152
|
-
- `MAPPING_SCHEMA_MISMATCH` (enum, uuid, email format…) → a legal enum value / real id.
|
|
153
|
-
- `MAPPING_VARIABLE_MISSING_FROM_SCHEMA` → fix the path against the aggregated schema, or reorder
|
|
154
|
-
so the source is an ancestor.
|
|
155
|
-
- `SAMPLE_CODE_RUN_FAILED` → fix the code step (guard missing fields — §5 of Automations Conditions (not yet published)).
|
|
156
|
-
- `POST_ACTION_NOT_FOUND` → a successor id doesn't exist; fix the graph.
|
|
157
|
-
|
|
158
|
-
Create/Update can also fail with `ON_BEFORE_SAVE_ACTION_EXCEPTION`: the owning app's save hook (e.g. for Send an email) rejected the step. Treat it like a provider error — read the message, fix the mapping or tell the user; don't retry the same write blindly.
|
|
159
|
-
`PROVIDER_ERROR` usually needs something only the user can do (connect an account, pick a
|
|
160
|
-
resource, finish setup). Report its `title`/`message` and the `ctaUrl`, and don't loop on it.
|
|
161
|
-
|
|
162
|
-
### Fix loop
|
|
163
|
-
|
|
164
|
-
1. Group errors by class (type + node). Fix all independent errors in one pass.
|
|
165
|
-
2. Re-run the §4 checklist, then re-validate.
|
|
166
|
-
3. At most 2–3 attempts per class. If an error comes back unchanged, re-read the reference that
|
|
167
|
-
owns that construct rather than trying variations.
|
|
168
|
-
4. Still failing → stop. Tell the user exactly which node and why, and what you need from them.
|
|
169
|
-
Don't save an INVALID configuration or activate it. Status-only deactivation is still
|
|
170
|
-
allowed under §3; stopping future runs does not require repairing the automation first.
|
|
171
|
-
|
|
172
|
-
## 3. Persistence, read-back and honest reporting
|
|
173
|
-
|
|
174
|
-
### Create
|
|
175
|
-
|
|
176
|
-
1. §4 checklist passes and the final full Validate is `VALID` (or understood warnings).
|
|
177
|
-
2. Create Automation with `origin: "USER"`, `configuration.status: "INACTIVE"`, no `settings`.
|
|
178
|
-
Capture `id`. Send Create as its own call, after a separate full Validate call has returned
|
|
179
|
-
`VALID` (or understood warnings) — never in the same script as that Validate or as discovery.
|
|
180
|
-
Send it once per candidate: if a Create's outcome is unknown, Query Automations before
|
|
181
|
-
resending it (Reporting rules below). A Create that was never sent is not an attempt.
|
|
182
|
-
3. **Read back** with Get Automation on the same site. Confirm the trigger, the root id, and the
|
|
183
|
-
set of action ids/types match what you sent (string literals come back URI-encoded, as sent).
|
|
184
|
-
If you used an override schema, Get with `fields: ["OVERRIDE_SCHEMA"]` ([Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog) §2).
|
|
185
|
-
Run the Get as a separate call once Create has returned (not batched into the same script),
|
|
186
|
-
and keep its response body as returned: the returned `automation` is the evidence, so don't
|
|
187
|
-
replace it with a summary you assemble from selected fields.
|
|
188
|
-
4. Hand off, leading with the outcome. Make the first line of your answer the saved state, for
|
|
189
|
-
example: "Saved **<name>** as inactive (ID `<automationId>`). Click **Activate** in the
|
|
190
|
-
builder to turn it on: `https://manage.wix.com/dashboard/<metaSiteId>/triggers/edit/<automationId>`".
|
|
191
|
-
That first line MUST name the automation, its status and its ID together; don't move the ID
|
|
192
|
-
to a later line, because a reader may see only the first line.
|
|
193
|
-
Then say what it does, and ask the user to review it in the builder. If the user asked to
|
|
194
|
-
turn it on, activate it first (step 5) and make the first line the active state instead:
|
|
195
|
-
"Saved **<name>** and turned it on (ID `<automationId>`): <edit link>".
|
|
196
|
-
5. Activate only on request — see "Activation status, activate, deactivate" below.
|
|
197
|
-
|
|
198
|
-
### Update
|
|
199
|
-
|
|
200
|
-
> **Later stages only:** not available in stage 2; this section is published in stage 3.
|
|
201
|
-
|
|
202
|
-
### What happens when the user opens it in the builder
|
|
203
|
-
|
|
204
|
-
- The builder edits a **hidden draft copy** and autosaves the user's changes into it. The
|
|
205
|
-
published object (what Get returns) changes only when they click **Activate** (inactive
|
|
206
|
-
automation) or **Publish Changes** (active one) — both publish, and Activate also turns it on.
|
|
207
|
-
- On load it re-resolves every trigger/action from the site catalog ("not found" on a miss), runs
|
|
208
|
-
Validate (§2) plus its own checks (required filters, empty filters, the create-contact rule in
|
|
209
|
-
§4), and pins the results to nodes.
|
|
210
|
-
- On load/save it silently rewrites some shapes: RATE_LIMIT `{{1440}} MINUTES` → `{{24}} HOURS`;
|
|
211
|
-
a webhook trigger filter that is missing or has another id is rebuilt from `webhookId`; unreachable actions and root ids that
|
|
212
|
-
point nowhere are **deleted**; an empty name becomes "Untitled …". The §4 checklist avoids all of
|
|
213
|
-
these, so the user's first save doesn't change your automation.
|
|
214
|
-
- Before you Update an automation the user has been editing in the builder, ask them to publish
|
|
215
|
-
or discard there and close the tab, then Get — else their publish can overwrite your change.
|
|
216
|
-
|
|
217
|
-
### Activation status, activate, deactivate
|
|
218
|
-
|
|
219
|
-
Read or change status only as [Automations Activation Status](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-activation-status) describes; this guide adds no status
|
|
220
|
-
procedure of its own. Deactivation does not require repairing the configuration.
|
|
221
|
-
|
|
222
|
-
### Reporting rules
|
|
223
|
-
|
|
224
|
-
- Report separate counts: **attempted**, **acknowledged**, **verified** by read-back, **active**.
|
|
225
|
-
Only verified automations "exist".
|
|
226
|
-
- An id without a successful read-back is **unverified** — say so; don't blindly retry the create
|
|
227
|
-
(Query Automations first to see whether it landed).
|
|
228
|
-
- A validated-but-unsaved object is a proposal, not an automation.
|
|
229
|
-
- Never describe runtime behavior ("it will send…") as verified — only validated.
|
|
230
|
-
|
|
231
|
-
## 4. Builder-renderability checklist — the single pre-save gate
|
|
232
|
-
|
|
233
|
-
Use this gate before Create and activation, not status-only deactivation.
|
|
234
|
-
Creation restrictions ("never add", conservative feature support) do not require rewriting
|
|
235
|
-
existing builder-supported nodes during an unrelated update. Preserve those nodes and their
|
|
236
|
-
metadata; use the owning reference's preservation rules and full Validate. A failing item is a
|
|
237
|
-
blocker, not a warning: some make the canvas spin forever or crash, others are silently
|
|
238
|
-
rewritten or deleted on the user's first save. Each owning reference has a detailed checklist —
|
|
239
|
-
this list is the union; run those too for the node types you used.
|
|
240
|
-
|
|
241
|
-
**Graph and ids** — [Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model)
|
|
242
|
-
|
|
243
|
-
1. [code] Exactly one `rootActionIds` entry, and it exists in `actions`. RATE_LIMIT, if present, is
|
|
244
|
-
that root and the only one.
|
|
245
|
-
2. [code] Single-parent tree: every successor list (`postActionIds`, `truePostActionIds`,
|
|
246
|
-
`falsePostActionIds`, SPLIT `postActionId`) has ≤ 1 id and points to an existing action; every
|
|
247
|
-
non-root action has exactly one parent and is reachable from the root; no cycles; no MERGE /
|
|
248
|
-
`mergeActionId`. Converging branches = duplicated downstream steps.
|
|
249
|
-
3. [code] `actions[k].id === k`; ids are fresh uuid v4, unique across actions, SPLIT path ids and
|
|
250
|
-
the trigger key, and never collide with `<id>true`, `<id>false`, `<id>-end`.
|
|
251
|
-
4. [code] Each action has a known `type`, only its own type's `*Info`, `[]` (not omitted) for an
|
|
252
|
-
ending successor list, and a builder-format `namespace`. Namespaces are unique except that
|
|
253
|
-
SET_VARIABLES steps share `setVariable`; their output keys must be unique across steps.
|
|
254
|
-
For every action type, `skipActionExpression` is `"{{true}}"` or absent.
|
|
255
|
-
|
|
256
|
-
**Trigger** — [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration) §7
|
|
257
|
-
|
|
258
|
-
5. `appId`+`triggerKey` came from Resolve Triggers on this site.
|
|
259
|
-
6. Filters: catalog filter `id`, verbatim `fieldKey`, Shape A/B expression whose literal value array
|
|
260
|
-
holds the form its filter type allows ([Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration) §4.1: quoted entity ids, quoted static
|
|
261
|
-
values, or exactly one bare number/boolean); **no filter with an empty `filterExpression`**; ≤ 5 filters; every required
|
|
262
|
-
filter present, plus required follow-ups of every set parent. Webhook trigger: exactly its
|
|
263
|
-
`webhookId` shape.
|
|
264
|
-
7. Scheduled / future-date configuration and `scheduledEventOffset` match
|
|
265
|
-
Automations Schemas and Scheduling (not yet published).
|
|
266
|
-
|
|
267
|
-
**Actions** — [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration), Automations Entity and Provider Configuration (not yet published), §2 of Automations Feasibility and Planning (not yet published)
|
|
268
|
-
|
|
269
|
-
8. Every APP_DEFINED `appId`+`actionKey` came from Resolve Actions on this site; no unsupported
|
|
270
|
-
action added — including no new code-variable step (the public Create refuses it).
|
|
271
|
-
**Later stages only — email is outside stage 2:** New email steps have a provider-generated mapping used once and persisted before content edits; no fabricated opaque-widget mapping; unrelated existing ones unchanged
|
|
272
|
-
(except the documented site-owner audience replacement).
|
|
273
|
-
9. `inputMapping`: only schema keys (an existing email/widget step's mapping passes through unchanged), types and
|
|
274
|
-
enums match, every required field mapped (optional ones per [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration) §5.2), entity-selector fields hold ids, formulas
|
|
275
|
-
only in `dynamicValuesOptions.enabled` fields.
|
|
276
|
-
10. No "Create a contact" action (`contacts-create_contact`) when the trigger payload already has
|
|
277
|
-
an `identityType: "contact"` field — the builder marks it "can't create a contact" and blocks
|
|
278
|
-
activation.
|
|
279
|
-
|
|
280
|
-
**Expressions and conditions** — [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions) §9, §6 of Automations Conditions (not yet published)
|
|
281
|
-
|
|
282
|
-
11. [code] Every `var()` path exists in that node's aggregated schema
|
|
283
|
-
— trigger + ancestor outputs only — with a compatible type.
|
|
284
|
-
12. Builder-renderable functions only; `;` separators; double-quoted, URI-encoded string literals;
|
|
285
|
-
number/boolean fields hold exactly one expression of that type.
|
|
286
|
-
13. CONDITION: exactly one expression group with `AND`/`OR` and 1–20 panel-renderable expressions;
|
|
287
|
-
not both branches empty; otherwise a CODE_CONDITION.
|
|
288
|
-
|
|
289
|
-
**Special steps** — Automations Delays Variables and Branches (not yet published)
|
|
290
|
-
|
|
291
|
-
14. DELAY: exactly one mode — relative (`offsetExpression` a `{{N}}` literal + unit) or absolute
|
|
292
|
-
(`dueDateExpression`). RATE_LIMIT: `{{1}}`, a trigger identifier allowed by
|
|
293
|
-
§2 of Automations Delays Variables and Branches (not yet published) (preserve existing supported member/user/UUID identifiers), and a
|
|
294
|
-
duration (`{{24}} HOURS`, never `{{1440}} MINUTES`) unless the user explicitly wants
|
|
295
|
-
"only ever once" (no duration).
|
|
296
|
-
SET_VARIABLES: matching keys, every property has a `title`, keys unique across all variable
|
|
297
|
-
steps; preserve existing image-variable metadata per §3 of Automations Delays Variables and Branches (not yet published).
|
|
298
|
-
SPLIT: 2–10 paths.
|
|
299
|
-
|
|
300
|
-
**Object and limits**
|
|
301
|
-
|
|
302
|
-
15. [code] Text limits: `name` 1–100 chars (API allows 500; the builder's name field holds 100),
|
|
303
|
-
`description` ≤ 2000, action `displayName` 1–60, `namespace` ≤ 100, SPLIT path `name` ≤ 100.
|
|
304
|
-
Expression limits: condition expression ≤ 5000 chars (a longer one fails the builder's save),
|
|
305
|
-
code ≤ 1000, filter expression ≤ 5000, `skipActionExpression`/delay/rate-limit expressions ≤ 1000.
|
|
306
|
-
Step count: ≤ 45 actions of any type — at 45 the builder blocks adding or duplicating steps.
|
|
307
|
-
Count before duplicating downstream steps into each branch.
|
|
308
|
-
16. On create: `origin: "USER"`, no `settings` (never `hidden` or `readonly`).
|
|
309
|
-
17. Full Validate Automation returns no `CRITICAL` errors, and you can explain every `WARNING`.
|
|
310
|
-
|
|
311
|
-
## 5. Test Automation — only with explicit authorization
|
|
312
|
-
|
|
313
|
-
> **Later stages only:** not available in stage 2; this section is published in stage 3.
|
|
6
|
+
This publication is being released in stages. Where a topic guide is not yet published, consult the official Automations API reference and method schemas before using that feature; do not guess its contract. Exception: Send an email and other opaque-widget (provider-owned) actions are outside stage 3 until Automations Email Actions is published; explain the limit instead of configuring them from the API reference. “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
|
+
# Wix Automations Builder
|
|
9
|
+
|
|
10
|
+
You build automations with the **public** Wix Automations APIs. The result is only done when it
|
|
11
|
+
(1) passes **Validate Automation**, (2) **renders and is editable in the Wix dashboard builder**
|
|
12
|
+
(`https://manage.wix.com/dashboard/<metaSiteId>/triggers`), and (3) does what the user asked —
|
|
13
|
+
the right trigger, the right side effect, the right recipient.
|
|
14
|
+
|
|
15
|
+
An automation is `Trigger → (optional filters) → a tree of steps`: app actions (send a message,
|
|
16
|
+
add label, create task…), conditions, delays, a rate limit, variables and parallel paths.
|
|
17
|
+
|
|
18
|
+
## References — load on demand, never all at once
|
|
19
|
+
|
|
20
|
+
| File | Load when… |
|
|
21
|
+
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog) | **Always first.** Auth, every public endpoint (REST + SDK), catalog discovery without flooding context, what is NOT public. |
|
|
23
|
+
| Automations Feasibility and Planning (topic guide not yet published; consult the [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations)) | Before promising or refusing anything, and before any update. What's impossible, unsupported actions, update locks, planning heuristics. |
|
|
24
|
+
| [Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model) | Designing the graph / assembling the Automation object. Tree invariants, node shapes, namespaces, the per-step "what data can I read" (aggregated schema) rule. |
|
|
25
|
+
| [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration) | Choosing and configuring the trigger and its filters. |
|
|
26
|
+
| [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration) | Choosing an app action and writing its `inputMapping`. |
|
|
27
|
+
| Automations Entity and Provider Configuration (topic guide not yet published; consult the [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations)) | A field needs an id (form, label, service, email…), or the component has special handling (**provider APIs registry**: triggered emails, webhooks, scheduled, custom trigger…). |
|
|
28
|
+
| Automations Item Selection (topic guide not yet published; until it is published, resolve IDs with a vertical public API or ask the user) | List a trigger's or action's selectable entity ids: dependent fields, statuses, value shapes. |
|
|
29
|
+
| Automations Email Actions (not yet published; email configuration is outside stage 3) | Initialize each new email action, persist it, then edit content; preserve existing email mappings. |
|
|
30
|
+
| [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions) | Writing ANY `{{ … }}` value (mappings, filters, delays, variables). |
|
|
31
|
+
| [Automations Conditions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-conditions) | Adding a CONDITION or CODE_CONDITION. |
|
|
32
|
+
| [Automations Delays Variables and Branches](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-delays-variables-and-branches) | DELAY, RATE_LIMIT, SET_VARIABLES, SPLIT, node naming (CODE_CONDITION spec: [Automations Conditions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-conditions)). |
|
|
33
|
+
| [Automations Schemas and Scheduling](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-schemas-and-scheduling) | Dynamic schemas, override output schema, scheduled / date-based triggers, timezone. |
|
|
34
|
+
| [Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence) | **Before every save** — the builder-renderability checklist (§4, a hard gate), Validate, fix loop, persistence + read-back, what the builder does on open, Test Automation. |
|
|
35
|
+
| [Automations Activation Status](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-activation-status) | **Is it active / turn it on or off?** Status-only operations, locks, idempotence and read-back. |
|
|
36
|
+
|
|
37
|
+
A typical build needs 4–6 of these. If your harness supports subagents, push broad catalog
|
|
38
|
+
sweeps and multi-schema reads into a subagent and keep only its conclusions.
|
|
39
|
+
|
|
40
|
+
## Prerequisites
|
|
41
|
+
|
|
42
|
+
- **Site + auth.** A token with the **Set Up Automations** scope
|
|
43
|
+
and the target `metaSiteId` (see [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog) §1). Lock one site for the whole task; confirm it before the first write.
|
|
44
|
+
Never print tokens or auth headers.
|
|
45
|
+
- **What the user wants**, concretely enough to pick a trigger and each side effect. Ask only
|
|
46
|
+
what you can't find out from the site's catalog or data.
|
|
47
|
+
|
|
48
|
+
## Workflow — keep the stages separate
|
|
49
|
+
|
|
50
|
+
For status-only requests, go directly to [Automations Activation Status](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-activation-status); it requires no planning or
|
|
51
|
+
rebuilding of the automation. Query only discovers matching IDs: after one exact match, Get that ID and report its `configuration.status`. Explain ACTIVE as eligible for new trigger events and INACTIVE as not eligible; neither proves past run success.
|
|
52
|
+
|
|
53
|
+
### 0. Feasibility — Automations Feasibility and Planning (topic guide not yet published; consult the [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations))
|
|
54
|
+
|
|
55
|
+
Check the request against what the public APIs and the builder support **before** planning.
|
|
56
|
+
Avoid both failure poles: _false impossibility_ (refusing something supported — parallel paths,
|
|
57
|
+
month-end schedules checked in code) and _false success_ (saving
|
|
58
|
+
something that can't work). If an ask can't be met as stated, offer alternatives and let the
|
|
59
|
+
user choose. For an update, Get the automation first and check `origin` / `settings` locks
|
|
60
|
+
([Automations Validation and Persistence — included update restrictions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence)).
|
|
61
|
+
|
|
62
|
+
### 1. Resolve real components — [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog), [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration), [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration)
|
|
63
|
+
|
|
64
|
+
Find the trigger and actions in **this site's** catalog (Resolve Triggers with `basicFieldsOnly`;
|
|
65
|
+
Resolve Actions filtered by `appId`/`actionKey` — it has no `basicFieldsOnly`; small pages; search
|
|
66
|
+
locally). Never invent an `appId`,
|
|
67
|
+
`triggerKey` or `actionKey`, and never reuse example or placeholder ids from these
|
|
68
|
+
references (ids explicitly marked as fixed platform constants — e.g. the webhook filter id, the
|
|
69
|
+
Forms app id, the owner role — are required as written). Decide by payload and
|
|
70
|
+
input schemas, not display names. Hydrate only the shortlisted components with full schemas.
|
|
71
|
+
|
|
72
|
+
### 2. Skeleton — [Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model)
|
|
73
|
+
|
|
74
|
+
Plan the structure only: trigger, step list with fresh uuid v4 ids and builder-format
|
|
75
|
+
namespaces, connections, and a one-line note per step (what it does, which entity ids it needs).
|
|
76
|
+
Hard rules (the builder breaks otherwise):
|
|
77
|
+
|
|
78
|
+
- exactly **one** root; a RATE_LIMIT, if any, is that root and the only one;
|
|
79
|
+
- every `postActionIds` / `truePostActionIds` / `falsePostActionIds` has **at most one** id;
|
|
80
|
+
- a **single-parent tree** — no joins, cycles, orphans, or MERGE. To "continue after both
|
|
81
|
+
branches", duplicate the downstream steps in each branch with fresh ids;
|
|
82
|
+
- parallelism only through SPLIT (alpha — see [Automations Delays Variables and Branches](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-delays-variables-and-branches)).
|
|
83
|
+
|
|
84
|
+
### 3. Configure one step at a time, top-down
|
|
85
|
+
|
|
86
|
+
For each step load only the matching reference, then:
|
|
87
|
+
|
|
88
|
+
1. **Compute the step's aggregated schema locally** ([Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model)): trigger payload
|
|
89
|
+
(dynamic schema only after its filters are final) + each _ancestor_ action's output under its
|
|
90
|
+
namespace (dynamic output only after that action's mapping is final) + variables + identity
|
|
91
|
+
enrichment. Only paths in it may appear in `var("…")`.
|
|
92
|
+
2. **Action input.** Map every required field yourself, following the field-type rules in
|
|
93
|
+
[Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration) / [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions). Check the **provider APIs registry** in
|
|
94
|
+
Automations Entity and Provider Configuration (topic guide not yet published; consult the [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations)) first — some components have a dedicated configuration API.
|
|
95
|
+
**Later stages only — email is outside stage 3:** **Send an email** (`triggered-emails`) — initialization and content: Automations Email Actions (not yet published; email configuration is outside stage 3).
|
|
96
|
+
**Later stages only — not in stage 3:** Other opaque widgets require their provider API or manual setup.
|
|
97
|
+
3. **Entity ids.** Fields backed by an entity selector take **ids**, never display names. Get
|
|
98
|
+
them through the owning vertical's public API, or ask the user (Automations Entity and Provider Configuration (topic guide not yet published; consult the [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations))).
|
|
99
|
+
A failed lookup means _unknown_, not _doesn't exist_.
|
|
100
|
+
4. **Expressions.** Self-check every `{{ … }}` against [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions) /
|
|
101
|
+
[Automations Conditions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-conditions) — builder-renderable functions and operators only; anything the condition
|
|
102
|
+
panel can't render becomes a CODE_CONDITION.
|
|
103
|
+
|
|
104
|
+
### 4. Validate → fix → loop — [Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence)
|
|
105
|
+
|
|
106
|
+
Run the **builder-renderability checklist** (§4 there — the single pre-save gate; script its
|
|
107
|
+
[code] items: graph, ids, namespaces, `var()` paths, field limits), then **Validate Automation** on
|
|
108
|
+
the full unsaved object. Fix and re-validate; 2–3 attempts per error class, and re-read the owning
|
|
109
|
+
reference instead of mutating blindly when an error repeats.
|
|
110
|
+
|
|
111
|
+
**Hard gate:** never create, edit configuration or activate until every applicable checklist item
|
|
112
|
+
holds AND the final full Validate has no `CRITICAL` error. `VALID` alone is not enough: the builder
|
|
113
|
+
re-validates on open, pins every error to its node, blocks Activate while any remains, and
|
|
114
|
+
silently deletes or rewrites shapes the checklist forbids.
|
|
115
|
+
Status-only deactivation follows §3 of that reference without requiring configuration repair.
|
|
116
|
+
Creation restrictions do not require changing existing builder-supported nodes on an unrelated update.
|
|
117
|
+
|
|
118
|
+
### 5. Persist and hand off
|
|
119
|
+
|
|
120
|
+
- **Create:** Create Automation with `origin: "USER"`, `configuration.status: "INACTIVE"` and no
|
|
121
|
+
`settings` → **Get** it back on the same site and compare → give the user the name, id, status
|
|
122
|
+
and edit link `https://manage.wix.com/dashboard/<metaSiteId>/triggers/edit/<automationId>`, and
|
|
123
|
+
tell them the builder's main button (**Activate**) turns it on → activate via the API (Update with
|
|
124
|
+
`status: "ACTIVE"`) only when the user asks.
|
|
125
|
+
- **Update:** if the user has been editing it in the builder, ask them to publish or discard
|
|
126
|
+
there first (their draft is invisible to you) → Get with override schemas and current `revision` → change only what was
|
|
127
|
+
asked → checklist + Validate → confirm first if the automation is ACTIVE (updates are live) or
|
|
128
|
+
if you delete nodes (unless already authorized) → Update with the complete merged object,
|
|
129
|
+
preserving origin/settings/status → Get the returned id back (preinstalled overrides can change ids).
|
|
130
|
+
- Report honestly: validated ≠ saved ≠ verified ≠ active. Never claim runtime behavior from
|
|
131
|
+
validation alone. **Test Automation executes real side effects** — only with explicit consent.
|
|
132
|
+
|
|
133
|
+
## Non-negotiables
|
|
134
|
+
|
|
135
|
+
- Use the API contracts in these references and the public Automations docs. Supported
|
|
136
|
+
`automationConfigMapping` fields are described here even where the docs omit them; use the
|
|
137
|
+
catalog's configuration schema and preserve the mapping on updates.
|
|
138
|
+
- Builder renderability is part of correctness, not polish: the §4 checklist in
|
|
139
|
+
[Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence) gates Create, configuration edits and activation; deactivation
|
|
140
|
+
uses its status-only procedure.
|
|
141
|
+
- Real ids from the site; no display names in id fields; no invented content (addresses,
|
|
142
|
+
coupon codes, template ids).
|
|
143
|
+
- Obtain authorization for activating, live edits, deleting or test runs when the request does
|
|
144
|
+
not already authorize that action. Do not ask again for an explicitly requested status change.
|