> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Build and Manage Wix Automations

## Article: Build and Manage Wix Automations

## Article Link: https://dev.wix.com/docs/api-reference/business-management/automations/skills/build-and-manage-wix-automations.md

## Article Content:

# Wix Automations Builder

You build automations with the **public** Wix Automations APIs. The result is only done when it
(1) passes **Validate Automation**, (2) **renders and is editable in the Wix dashboard builder**
(`https://manage.wix.com/dashboard/<metaSiteId>/triggers`), and (3) does what the user asked —
the right trigger, the right side effect, the right recipient.

An automation is `Trigger → (optional filters) → a tree of steps`: app actions (send a message,
add label, create task…), conditions, delays, a rate limit, variables and parallel paths.

## References — load on demand, never all at once

| File                                        | Load when…                                                                                                                                                                                                                        |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog.md)                 | **Always first.** Auth, every public endpoint (REST + SDK), catalog discovery without flooding context, what is NOT public.                                                                                                       |
| [Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model.md)            | Designing the graph / assembling the Automation object. Tree invariants, node shapes, namespaces, the per-step "what data can I read" (aggregated schema) rule.                                                                   |
| [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration.md)                    | Choosing and configuring the trigger and its filters.                                                                                                                                                                             |
| [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration.md)                     | Choosing an app action and writing its `inputMapping`.                                                                                                                                                                            |
| [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions.md)         | Writing ANY `{{ … }}` value (mappings, filters, delays, variables).                                                                                                                                                               |
| [Automations Conditions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-conditions.md)                  | Adding a CONDITION or CODE_CONDITION.                                                                                                                                                                                             |
| [Automations Delays Variables and Branches](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-delays-variables-and-branches.md)             | 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.md)).                                                                                                                                      |
| [Automations Schemas and Scheduling](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-schemas-and-scheduling.md)      | Dynamic schemas, override output schema, scheduled / date-based triggers, timezone.                                                                                                                                               |
| [Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence.md) | **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. |
| [Automations Activation Status](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-activation-status.md) | **Is it active / turn it on or off?** Status-only operations, locks, idempotence and read-back. |

A typical build needs 4–6 of these. If your harness supports subagents, push broad catalog
sweeps and multi-schema reads into a subagent and keep only its conclusions.

## Prerequisites

- **Site + auth.** A token with the **Set Up Automations** scope
  and the target `metaSiteId` (see [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog.md) §1). Lock one site for the whole task; confirm it before the first write.
  Never print tokens or auth headers.
- **What the user wants**, concretely enough to pick a trigger and each side effect. Ask only
  what you can't find out from the site's catalog or data.

## Workflow — keep the stages separate

For status-only requests, go directly to [Automations Activation Status](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-activation-status.md); it requires no planning or
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.

### 0. Feasibility — [Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations.md)

Check the request against what the public APIs and the builder support **before** planning.
Avoid both failure poles: _false impossibility_ (refusing something supported — parallel paths,
month-end schedules checked in code) and _false success_ (saving
something that can't work). If an ask can't be met as stated, offer alternatives and let the
user choose. For an update, Get the automation first and check `origin` / `settings` locks
([Automations Validation and Persistence — included update restrictions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence.md)).

### 1. Resolve real components — [Automations API Catalog](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-api-catalog.md), [Automations Trigger Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-trigger-configuration.md), [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration.md)

Find the trigger and actions in **this site's** catalog (Resolve Triggers with `basicFieldsOnly`;
Resolve Actions filtered by `appId`/`actionKey` — it has no `basicFieldsOnly`; small pages; search
locally). Never invent an `appId`,
`triggerKey` or `actionKey`, and never reuse example or placeholder ids from these
references (ids explicitly marked as fixed platform constants — e.g. the webhook filter id, the
Forms app id, the owner role — are required as written). Decide by payload and
input schemas, not display names. Hydrate only the shortlisted components with full schemas.

### 2. Skeleton — [Automations Graph and Data Model](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-graph-and-data-model.md)

Plan the structure only: trigger, step list with fresh uuid v4 ids and builder-format
namespaces, connections, and a one-line note per step (what it does, which entity ids it needs).
Hard rules (the builder breaks otherwise):

- exactly **one** root; a RATE_LIMIT, if any, is that root and the only one;
- every `postActionIds` / `truePostActionIds` / `falsePostActionIds` has **at most one** id;
- a **single-parent tree** — no joins, cycles, orphans, or MERGE. To "continue after both
  branches", duplicate the downstream steps in each branch with fresh ids;
- 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.md)).

### 3. Configure one step at a time, top-down

For each step load only the matching reference, then:

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.md)): trigger payload
   (dynamic schema only after its filters are final) + each _ancestor_ action's output under its
   namespace (dynamic output only after that action's mapping is final) + variables + identity
   enrichment. Only paths in it may appear in `var("…")`.
2. **Action input.** Map every required field yourself, following the field-type rules in
   [Automations Action Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-action-configuration.md) / [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions.md). For provider-owned settings, follow the configuration procedure and permissions required by the provider; do not invent its opaque mapping.
   **Provider recipe required:** Other opaque widgets require their dedicated published recipe; if none is available, explain that configuration requires manual setup in the automations builder.
3. **Entity ids.** Fields backed by an entity selector take **ids**, never display names. Get
   them through the owning vertical's public API, or ask the user ([Automations API reference](https://dev.wix.com/docs/api-reference/business-management/automations.md)).
   A failed lookup means _unknown_, not _doesn't exist_.
4. **Expressions.** Self-check every `{{ … }}` against [Automations Mapping Expressions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-mapping-expressions.md) /
   [Automations Conditions](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-conditions.md) — builder-renderable functions and operators only; anything the condition
   panel can't render becomes a CODE_CONDITION.

### 4. Validate → fix → loop — [Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence.md)

Run the **builder-renderability checklist** (§4 there — the single pre-save gate; script its
[code] items: graph, ids, namespaces, `var()` paths, field limits), then **Validate Automation** on
the full unsaved object. Fix and re-validate; 2–3 attempts per error class, and re-read the owning
reference instead of mutating blindly when an error repeats.

**Hard gate:** never create, edit configuration or activate until every applicable checklist item
holds AND the final full Validate has no `CRITICAL` error. `VALID` alone is not enough: the builder
re-validates on open, pins every error to its node, blocks Activate while any remains, and
silently deletes or rewrites shapes the checklist forbids.
Status-only deactivation follows §3 of that reference without requiring configuration repair.
Creation restrictions do not require changing existing builder-supported nodes on an unrelated update.

### 5. Persist and hand off

- **Create:** Create Automation with `origin: "USER"`, `configuration.status: "INACTIVE"` and no
  `settings` → **Get** it back on the same site and compare → give the user the name, id, status
  and edit link `https://manage.wix.com/dashboard/<metaSiteId>/triggers/edit/<automationId>`, and
  tell them the builder's main button (**Activate**) turns it on → activate via the API (Update with
  `status: "ACTIVE"`) only when the user asks.
- **Update:** if the user has been editing it in the builder, ask them to publish or discard
  there first (their draft is invisible to you) → Get with override schemas and current `revision` → change only what was
  asked → checklist + Validate → confirm first if the automation is ACTIVE (updates are live) or
  if you delete nodes (unless already authorized) → Update with the complete merged object,
  preserving origin/settings/status → Get the returned id back (preinstalled overrides can change ids).
- Report honestly: validated ≠ saved ≠ verified ≠ active. Never claim runtime behavior from
  validation alone. **Test Automation executes real side effects** — only with explicit consent.

## Non-negotiables

- Use the API contracts in these references and the public Automations docs. Supported
  `automationConfigMapping` fields are described here even where the docs omit them; use the
  catalog's configuration schema and preserve the mapping on updates.
- Builder renderability is part of correctness, not polish: the §4 checklist in
  [Automations Validation and Persistence](https://dev.wix.com/docs/api-reference/business-management/automations/skills/automations-validation-and-persistence.md) gates Create, configuration edits and activation; deactivation
  uses its status-only procedure.
- Real ids from the site; no display names in id fields; no invented content (addresses,
  coupon codes, template ids).
- Obtain authorization for activating, live edits, deleting or test runs when the request does
  not already authorize that action. Do not ask again for an explicitly requested status change.