All skills
wix avatar

/wix-manage

@4895cc9 official
by Wix.comwix/skills33 stars
33

REST recipes to configure and manage a Wix site's business solutions — stores, bookings, payments, CMS, and more. Open the matching recipe for the exact endpoint, method, and payload before calling — never guess a Wix API, never write Wix dashboard URL from memory. Routes to: stores, bookings, get-paid, CMS, contacts, forms, media, app-installation, pricing-plans, restaurants, ricos rich-content, sites, blog, calendar, domains, events, site-properties, ecommerce, marketing, google-ads, google-business-profile, analytics, accessibility, seo, dashboard-navigation.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-manage

This session only. Nothing lands on disk.

referencesecommercepricing-promotionsecom-pricing-flow-upsell-boost.md

≈2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Flow: Upsell Boost Campaign

Before executing this skill, read Create Discount Rule with ReadFullDocsArticle — it contains the discount-rule mechanics and the pre-create guardrails (conflict/stacking, margin floor, %-sanity).

Creates a discount that incentivizes customers to spend more per order by setting a minimum subtotal threshold above the store's current AOV. The discount percentage is scaled to the store's average profit margin, and the scope targets high-margin categories or products.

Prerequisites

  • Products exist in the catalog with price data (siteData.hasCatalog === true, checked at context load)
  • AOV data available from site metrics (siteData.aov, loaded by eCommerce Load Context)

Required APIs


Step 1: Use pre-loaded catalog data

Catalog analytics and product data are already in conversation context — do NOT re-fetch:

  • siteData.catalogAnalytics — category groups with count(), quantiles([0.5,0.75,0.9], price), avg(profitMargin). Loaded by the eCommerce Load Context.
  • siteData.productCatalogData — per-product list sorted price DESC, ordersCount DESC for UPSELL_BOOST goal. Loaded by the run-a-sale orchestrator Step 5.
  • siteData.aov — site-level AOV (revenue / ordersCount). Loaded by eCommerce Load Context.

Extract from context:

  • effective_aov — use siteData.aov; run AOV sanity check: if AOV < price_p25, override with price_p50 as effective AOV
  • avg_profit_margin — from the "All Products" group in siteData.catalogAnalytics
  • price_p50, price_p75, price_p90 — from quantiles in siteData.catalogAnalytics
  • Top products by price and order volume — from siteData.productCatalogData

Step 2: Determine margin tier and calculate discount + minSubTotal

Use the average profit margin to select the appropriate discount and threshold tier.

Margin Tier Condition Max Discount minSubTotal Formula
Low margin avg_profit_margin < 25% 10% 1.15 x effective_aov
Medium margin 25% <= avg_profit_margin <= 50% 15% 1.3 x effective_aov
High margin avg_profit_margin > 50% 20% 1.5 x effective_aov
No data Margin data unavailable 10% 1.15 x effective_aov

Example: If effective_aov = $150 and avg_profit_margin = 35% (medium), then max discount = 15% and raw minSubTotal = $195.


Step 3: Round minSubTotal (CRITICAL)

minSubTotal MUST be rounded UP to the nearest $5 increment (the result mod 5 must equal 0). Always round UP, never down.

Raw Value Rounded Value
$195 $195 (already divisible by 5)
$217 $220
$223 $225
$199 $200
$172.50 $175
$201 $205

Formula: minSubTotal = ceil(raw_value / 5) * 5


Step 4: Determine discount scope

Select the scope based on analytics data:

  • CATEGORY (preferred): When analytics show a clear high-margin category opportunity. Target the category with the highest profit margin that also has sufficient product count.
  • ITEMS: When specific high-margin products stand out as upsell candidates (max 5 productIds).
  • SITE (fallback): When no single category or product group dominates, apply catalog-wide.

Step 5: Convert category names to GUIDs (if CATEGORY scope)

If scope is CATEGORY, call getCategoryIds to convert human-readable category names into GUIDs. Never output category names directly as scope IDs.

Exclude the "All Products" system category — it contains every product and would effectively make the discount site-wide.

Max 3 categoryIds per discount rule.


Step 6: Run guardrail checks

Run the pre-create guardrails in Create Discount Rule → "Guardrails" before creating the rule — conflict/stacking (scope, time, coupon cross-stacking), the 25% cap, the 15% margin floor, and %-sanity. Present any warnings to the merchant and get confirmation before proceeding.


Step 7: Create the discount rule

Endpoint: POST https://www.wixapis.com/ecom/v1/discount-rules

Request — 15% off orders over $195, scoped to a category:

{
  "discountRule": {
    "name": "Spend $195+, Get 15% Off",
    "active": true,
    "discounts": [
      {
        "discount": {
          "discountType": "PERCENTAGE",
          "percentage": 15
        },
        "scope": {
          "id": "category-guid-here",
          "type": "COLLECTION"
        }
      }
    ],
    "conditions": {
      "subtotalRange": {
        "from": "195.00"
      }
    }
  }
}

Response:

{
  "discountRule": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "revision": "1",
    "name": "Spend $195+, Get 15% Off",
    "active": true,
    "discounts": [
      {
        "discount": {
          "discountType": "PERCENTAGE",
          "percentage": 15
        },
        "scope": {
          "id": "category-guid-here",
          "type": "COLLECTION"
        }
      }
    ],
    "conditions": {
      "subtotalRange": {
        "from": "195.00"
      }
    }
  }
}

Request — site-wide fallback example:

{
  "discountRule": {
    "name": "Spend $175+, Get 10% Off Everything",
    "active": true,
    "discounts": [
      {
        "discount": {
          "discountType": "PERCENTAGE",
          "percentage": 10
        },
        "scope": {
          "id": "catalog",
          "type": "CATALOG"
        }
      }
    ],
    "conditions": {
      "subtotalRange": {
        "from": "175.00"
      }
    }
  }
}

Save the returned id and revision for later management.


Step 8: Verify the rule is active

  1. Query discount rules to confirm the new rule exists and is active: true
  2. Verify the minSubTotal condition is correctly set
  3. Report to the merchant:

    "Upsell discount is live: {discount}% off on orders over ${minSubTotal} for {scope description}. This threshold is {percentage}% above your current average order value of ${effective_aov}, designed to incentivize higher spending."


Branching logic

Merchant intent Scope Discount minSubTotal
"Increase average order value" Determined by analytics (CATEGORY preferred) Margin-tiered Calculated from AOV
"Get people to spend more on electronics" COLLECTION with electronics category GUID Margin-tiered Calculated from AOV
"20% off orders over $200" (explicit) As specified by merchant 20% (user override) $200 (user override)
"Reward big spenders" CATALOG (site-wide) Margin-tiered Calculated from AOV

Error Handling

Error Cause Fix
DISCOUNT_RULE_NOT_FOUND Rule ID doesn't exist Re-query discount rules for current IDs
REVISION_MISMATCH Revision doesn't match Re-fetch rule for latest revision, then retry
AOV unavailable No revenue or order data Use price_p50 from catalog analytics as AOV proxy
Margin data unavailable No profit margin data in catalog Default to low-margin tier (10% discount, 1.15x AOV)
Category GUID not found Category name doesn't match any collection Re-query categories or fall back to SITE scope

References

Source: SKILL.md on GitHub

1 warning1d4 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    The wix-manage skill is an extensive collection of management recipes for Wix sites, covering business solutions such as eCommerce, Bookings, SEO, and site provisioning. It utilizes official Wix REST endpoints and incorporates robust safety patterns, including mandatory user confirmation for sensitive operations and careful validation of site data before mutation.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4895cc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
compatibility
Requires Wix REST API access (API key or OAuth).
  • wix
  • rest-api
  • ecommerce
  • bookings
  • cms
  • contacts
  • blog
  • domains
  • restaurants
  • site-configuration
  • api-integration

README badge

README badge for wix/skills/wix-manage

REST API operations for configuring Wix business solutions including stores, bookings, CMS, contacts, domains, and ecommerce. Routes to site setup, entity management (products, services, staff), bulk administrative operations, and server-to-server integrations across Wix's business app ecosystem.

Generated from the current SKILL.md.

Do I need API credentials to use these recipes?
Yes. The skill requires Wix REST API access via either an API key or OAuth token to execute any management operations.
Can I use these recipes to display data on my site frontend?
No. These recipes are for backend REST API operations only — site configuration, entity management, and administrative tasks. They do not cover frontend development or displaying data to users.
What business domains do these recipes cover?
The skill covers stores, bookings, payments, CMS, contacts, forms, media, apps, pricing plans, restaurants, rich content, sites, blogs, calendars, domains, and site properties.
Do these recipes handle OAuth authentication with external services like Google Calendar?
Yes. The external calendar integration recipe covers OAuth-based setup with Google Calendar, Microsoft Outlook, and Apple Calendar for bidirectional event sync.

Generated from the current SKILL.md. These answers refresh after source changes.