API: Discount Recommendations Service

Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
Copy

This service provides data-gathering tools used by the discount recommendation flows. These are internal APIs hosted at manage.wix.com (not wixapis.com).

Base URL: https://manage.wix.com/recommendations

Permission: ecom:discounts_recommendations:v1:recommendation:build_recommendation

How to call these APIs

These endpoints are not directly callable as MCP tools. You must use CallWixSiteAPI to invoke them:

Copy

Important: You must have a siteId before calling any of these. Use ListWixSites first to resolve the site.


GetSiteData

Retrieves site-level business metrics needed for discount analysis.

Endpoint: POST https://manage.wix.com/recommendations/v1/recommendations/get-site-data-tool

Request:

Copy

Response:

Copy
FieldTypeDescription
countrystringSite's primary country (ISO alpha-2)
businessTypestringType of business
industrystringIndustry vertical
visitorsintVisitors in last 30 days (0-1M)
revenueintRevenue in last 30 days in site currency (0-1M)
ordersCountintOrders in last 30 days (0-1M)
aovintAverage order value (revenue / ordersCount)
currencystringStore currency code (ISO-4217)
languagestringSite language code
currentDiscountsstring"YES" or "NO" — whether active discounts exist
discountMargindoubleGlobal max discount as decimal (0.25 = 25%)

Validation: If country, industry, or revenue are missing/null, do not proceed with recommendations.

Note: discountMargin is returned as a decimal (0.25). Convert to percentage by multiplying by 100 (= 25%).


GetCatalogAnalytics

Computes aggregate statistics on the product catalog, grouped by category.

Endpoint: POST https://manage.wix.com/recommendations/v1/recommendations/get-catalog-analytics-tool

Request:

Copy

Request fields:

FieldTypeRequiredDescription
aggregatesarrayYesList of aggregation operations (max 100)
aggregates[].openumYescount, sum, avg, min, max, stddev, quantiles
aggregates[].fieldenumYesquantity, price, cost, profit, profitMargin, ordersCount
aggregates[].qdouble[]If QUANTILESQuantile values 0.0-1.0 (max 20)
minMarginPctdoubleYesMin margin filter as decimal (e.g., 0.15 for 15%)

Response:

Copy

Aggregates to request per business goal:

GoalAggregates
UPSELL_BOOSTcount(price), quantiles([0.5,0.75,0.9], price), avg(profitMargin)
STOCK_MOVERsum(quantity), sum(ordersCount), avg(profitMargin)
SEASONALsum(ordersCount), quantiles([0.5,0.9], price), avg(profitMargin)
BUNDLE_AND_SAVEmin(price), max(price), avg(profitMargin), count(price)

Important: Always exclude "All Products" from category-level analysis. Use the "All Products" group only for overall catalog stats (AOV sanity check, price distribution).


GetProductCatalogData

Fetches product-level data for analysis. Returns individual products with pricing, margins, and inventory.

Endpoint: POST https://manage.wix.com/recommendations/v1/recommendations/get-product-catalog-data-tool

Request:

Copy

Request fields:

FieldTypeRequiredDescription
querystringNoKeyword filter for products (max 250 chars)
categoryNamesstring[]NoCategory names to restrict search (max 10). Pass empty array if none.
businessGoalstringNoUPSELL_BOOST, BUNDLE_AND_SAVE, STOCK_MOVER, or SEASONAL. Affects sort order.
minMarginPctdoubleYesMin margin filter as decimal (0.15 = 15%)
catalogLimitintNoMax products to return (1-1000, default 30)

Sort order by goal (applied server-side based on businessGoal):

GoalSort order
UPSELL_BOOSTprice DESC, ordersCount DESC
BUNDLE_AND_SAVEprice DESC, ordersCount DESC
STOCK_MOVERquantity DESC, ordersCount ASC
SEASONALordersCount DESC

Response:

Copy

Response item fields:

FieldTypeDescription
idstringProduct UUID — use this for productIds in discount rules
namestringProduct name
descriptionstringProduct description
brandstringProduct brand
quantityintCurrent stock level
pricedoubleProduct price
profitdoubleProfit per unit
profitMargindoubleProfit margin as decimal (0.45 = 45%)
ordersCountintNumber of orders in the period

Important rules:

  • Always exclude "All Products" from categoryNames
  • Max 30 items per request is the recommended catalog limit
  • If both getCatalogAnalytics and getProductCatalogData fail, fall back to site-wide conservative discount

GetCategoryIds

Converts human-readable category names to GUID IDs. Must be called before using CATEGORY scope — never output category names as IDs.

Endpoint: POST https://manage.wix.com/recommendations/v1/recommendations/get-category-ids-tool

Request:

Copy

Response:

Copy
FieldTypeDescription
categoryNamesstring[]Category names to convert (max 10, max 100 chars each)
categoryIdsstring[]Resolved GUIDs (GUID format)

If empty response: The category name doesn't exist. Fall back to SITE scope and explain: "Could not resolve IDs for category '{name}', using site-wide discount instead."


Usage pattern in discount flows

All discount L4 flows follow this data-gathering pattern:

Copy

Single attempt policy: You get one chance to call GetCatalogAnalytics + GetProductCatalogData. No retries.

Partial failure handling:

  • If GetCatalogAnalytics succeeds but GetProductCatalogData returns empty: use category name from analytics → call GetCategoryIds
  • If both fail: fall back to SITE scope with conservative 5-10% discount using only site data
Did this help?