Skip to content

Margin Awareness#


Margin Awareness brings profit and margin into merchandising and search decisions across Miva stores. It calculates real-time profit and margin values for products and keeps them up to date whenever price or cost data changes.

Core formulas#

Profit = Price - Cost
Margin = (Profit ÷ Price) × 100

Both values are stored on the product record and recalculate automatically when price or cost changes.

Setup#

Step 1 — Navigate to the Margin tab#

In the Miva admin, go to Catalog → Margin. This is the central configuration point for the feature; no modules or developer work are required to enable it.

Step 2 — Choose a calculation method#

Select the calculation method that matches where the merchant stores cost data:

  • Price Minus Cost: use when the merchant tracks cost in Miva’s native Cost field.
  • Price Minus Custom Field: use when cost lives in a product custom field (for example, landed cost or supplier cost).
  • Custom Field: use when a custom field already holds a precomputed profit value.
  • Template (Advanced): use when cost logic is more complex than a single field.

Template example#

This template method example replicates the default Price Minus Cost calculation:

<mvt:assign name="l.settings:product:profit"
    value="l.settings:product:price - l.settings:product:cost" />

<mvt:if expr="l.settings:product:price EQ 0">
    <mvt:assign name="l.settings:product:margin" value="0.0" />
<mvt:else>
    <mvt:assign name="l.settings:product:margin"
        value="( ( l.settings:product:profit / l.settings:product:price ) * 100 ) ROUND 2" />
</mvt:if>
  • Assigning product:profit sets the calculated profit value.
  • Assigning product:margin sets the margin percentage.
  • Any valid MVT expression may be used, including custom fields, conditionals, and business-specific lookups.

Configure search relevance (optional)#

Margin Awareness can re-rank search results without fully overriding the normal relevance sort.

  • Relevance: None · Profit · Margin
  • Relevance Count: number of top results to reorder (for example, 24)

How it works: Miva first applies normal relevance. Then, within the top N results, it reorders by profit or margin.

Example: Relevance = Margin, Count = 24 → the top 24 relevance-matched products are reordered so the highest-margin items appear first.

This same reordering also applies to Vexture merchandising results when Vexture is active.

Calculate margins#

After saving the configuration, click the Recalculate Profit Margin button in the top-right of the Margin tab to run the initial catalog calculation.

Recalculation also runs automatically when:

  • a product is added or updated
  • the Recalculate Product Profit and Margin scheduled task is triggered

After any bulk cost or pricing import, always trigger a recalculation or schedule the task to keep margin values fresh.

Verify your data#

Once calculated, profit and margin data can be displayed in the Catalog Batch List by adding Profit and Margin columns for side-by-side comparison.

Using Margin Awareness across the store#

Search relevance#

With relevance enabled, high-margin products move to the top of an already-relevant search result set. Shoppers still see relevant matches, but the highest-margin products surface first within that set.

Vexture merchandising#

Margin-aware reordering also applies inside Vexture’s semantic merchandising results. AI-matched results are still returned first, then Margin Awareness reshuffles the top N products by margin or profit.

Collections#

Profit and margin are available as Collection filter criteria. This enables dynamic product groups such as:

  • Margin ≥ 40% for premium or featured collections
  • Margin ≤ 5% for loss leader suppression
  • Profit ≥ $50 for high-value item groups

Use Immediate rebuild for most collections. Use Scheduled rebuild for very large catalogs where real-time evaluation is too resource-intensive.

Real-world use cases#

1. Private label vs. name brand surfacing#

A retailer can surface private-label products with 55–65% margins ahead of national brands with 18–25% margins, while preserving relevance in the search result set.

2. Liquidating low-margin SKUs quietly#

Create a Collection filtered to Profit < $2 and assign it to a markdown price group. The collection updates automatically when cost changes, without manual product selection.

3. Supplier cost volatility with landed cost#

If landed cost is tracked in a custom field, use Price Minus Custom Field and point Margin Awareness at that custom field. Margin updates with each cost feed import, and Miva’s native cost field can remain unused.

4. Complex margin logic with templates#

Use the template method for advanced cost policies such as FIFO/LIFO approximations or choosing the higher of multiple cost fields.

Example template logic for conservative costing:

<mvt:assign name="l.cost"
    value="max( l.settings:product:customfield_values:customfields:current_cost,
                 l.settings:product:customfield_values:customfields:avg_cost )" />

<mvt:assign name="l.settings:product:profit"
    value="l.settings:product:price - l.cost" />

<mvt:if expr="l.settings:product:price EQ 0">
    <mvt:assign name="l.settings:product:margin" value="0.0" />
<mvt:else>
    <mvt:assign name="l.settings:product:margin"
        value="( ( l.settings:product:profit / l.settings:product:price ) * 100 ) ROUND 2" />
</mvt:if>

5. Vexture merchandising cross-sells#

Margin Awareness can reshuffle AI-generated accessories and cross-sell suggestions so the highest-margin relevant items appear first.

6. B2B tiered pricing and margin visibility#

Use Collections and margin filters to automate product groups for strategic accounts, restricted products, and customer-specific pricing policies.

7. Paid traffic optimization#

Build a Collection of products with Margin ≥ 35% AND Price ≥ $25 and assign it to a Google Ads eligible feed or tag to focus paid channels on higher-margin items.

8. Homepage merchandising without manual curation#

Create a Collection filtered to Margin ≥ 40% and use it as the source for a homepage carousel or featured product set. The collection updates automatically as pricing and costs change.

Best-fit merchants#

  • Broad catalogs with private label and name brand products
  • Merchants already tracking cost in Miva but not using it
  • Stores with complex cost structures like landed cost or FIFO/LIFO
  • Merchants running paid traffic or aggressive merchandising
  • B2B/distributors using tiered pricing
  • Stores using or evaluating Vexture

Important notes#

  • Products marked Exclude from Search Results are not affected by margin-based reordering.
  • Margin-aware reordering only applies to products included in search results.
  • After bulk cost or pricing imports, manually trigger recalculation or schedule the task.
  • Use Immediate rebuild for most margin-based Collections; use Scheduled for very large catalogs.