Flow: Optimize Shipping Rates

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

Before executing this skill, read these referenced skills with ReadFullDocsArticle:

Analyzes the site's catalog price distribution and current shipping rate structure to determine if the rate strategy is optimal. Recommends and applies changes when flat rates should become tiered, when tier gaps exist, or when per-item penalties are harming conversion.

Prerequisites

  • Wix Stores (or another eCommerce business solution) installed on the site
  • Catalog stats available (product_count, price quantiles, price_stddev)
  • Site metrics available for AOV calculation
  • At least one shipping option configured

Required APIs


Step 1: Gather catalog price distribution

Retrieve catalog statistics for the "All Products" category group. Required fields:

MetricDescription
product_countTotal number of products
price_minLowest product price
price_maxHighest product price
price_avgAverage product price
price_stddevStandard deviation of prices
price_p2525th percentile price
price_p5050th percentile (median) price
price_p7575th percentile price
price_p9090th percentile price

1a: Calculate price spread ratio

Copy

This ratio indicates how diverse the catalog pricing is. A ratio of 3 means the most expensive product is 3x the cheapest; a ratio of 50 means extreme price diversity.


Step 2: Query current shipping options

Retrieve all shipping options to analyze the existing rate structure.

Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-options/query

Request:

Copy

Response:

Copy

For each option, classify its rate structure:

  • Flat rate: conditions[] is empty
  • Tiered: Multiple rates with BY_TOTAL_PRICE, BY_TOTAL_WEIGHT, or BY_TOTAL_QUANTITY conditions
  • Free shipping: amount="0"
  • Per-item: multiplyByQuantity=true

Step 3: Apply the rate strategy decision tree

3a: Check for per-item penalty (highest priority)

If any shipping option has multiplyByQuantity=true, flag it immediately.

Problem: Per-item charging means shipping cost = amount x cart quantity. A $5 rate on a 5-item order charges $25 for shipping. This discourages larger carts and directly conflicts with AOV growth goals.

Recommendation: Switch to flat rate or tiered pricing. Update the option to set multiplyByQuantity=false.

3b: Evaluate flat-to-tiered conversion

Check ALL three conditions. If all are true, recommend converting flat rates to price-based tiers:

ConditionThreshold
price_spread_ratio > 10Catalog has extreme price diversity
price_stddev > price_avg x 0.5High variance in pricing
Only flat rates currently existNo tiered structure in place

If all three conditions are met, recommend price-based tiers:

TierPrice RangeRate Strategy
Tier 1Orders below price_p50Lower flat rate
Tier 2Orders price_p50 to price_p75Standard rate
Tier 3Orders above price_p75Higher rate or free shipping

3c: Confirm flat rate is optimal

If ALL of the following are true, flat rate is the correct strategy -- no changes needed:

ConditionThreshold
price_spread_ratio <= 3Narrow price range
price_stddev < price_avg x 0.3Low variance

Report: "Your catalog has a narrow price range. Flat rate shipping is the optimal strategy. No changes recommended."

3d: Check for tier gaps in existing tiered options

For options that already use tiered pricing (weight-based or price-based conditions):

  1. Sort all rates by their condition value
  2. Look for gaps between tier boundaries

Example gap: Tier 1 has LTE 5 (kg or $), Tier 2 has GT 10. A cart at 7 matches neither tier and gets no shipping rate for this option.

Fix: Adjust condition boundaries to ensure complete, contiguous coverage.


4a: Fix per-item penalty

Update the shipping option to disable per-item multiplication.

Endpoint: PATCH https://www.wixapis.com/ecom/v1/shipping-options/{shippingOptionId}

Request:

Copy

Response:

Copy

4b: Create tiered shipping option

When converting from flat to tiered, create a new option with price-based tiers. Use catalog quantiles to set tier boundaries.

Example with price_p50=$35, price_p75=$80:

Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-options

Request:

Copy

Response:

Copy

Tier logic: Multiple conditions within the same rate use AND logic. The middle tier (GT 35 AND LTE 80) matches cart totals between $35 and $80.


Step 5: Verify updated rates

Re-query shipping options to confirm changes took effect.

Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-options/query

Verify:

  1. Per-item options now have multiplyByQuantity=false
  2. Tiered options have contiguous tier boundaries with no gaps
  3. All options have estimatedDeliveryTime populated
  4. Rate amounts are reasonable (no single rate exceeds 15% of effective_aov)
  5. Updated options show incremented revision values

Error Handling

ErrorCauseFix
SHIPPING_OPTION_NOT_FOUNDOption ID doesn't existRe-query shipping options to get current IDs
REVISION_MISMATCHRevision doesn't match the current versionRe-fetch the option for the latest revision, then retry
deliveryRegionId is not a valid GUIDUsed deliveryRegionIds (plural) instead of deliveryRegionId (singular)Use the singular deliveryRegionId field
Tier gap detected after updateCondition boundaries don't cover all rangesVerify tier boundaries are contiguous: use LTE for upper bounds and GT for lower bounds of adjacent tiers
Rate exceeds 15% of AOVShipping cost is a cart abandonment riskLower the rate amount or add a free shipping tier for larger orders

References

Did this help?