> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wayak.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Promotion performance

> Measure revenue lift, margin impact, and cannibalization after every promotion

Promotions are expensive — you discount prices, run ads, and reposition merchandise. But most retail teams cannot answer a simple question after the fact: did the promotion make money? Without a clear lift calculation that accounts for baseline sales, margin erosion, and cannibalization of non-promoted items, you are flying blind on your biggest investment lever.

Wayak connects your POS and promotions data, runs Python-powered lift calculations in playbooks, and delivers a structured post-promotion report so your merchandising team knows exactly what worked and what did not.

***

## What you need

<CardGroup cols={2}>
  <Card title="Data sources" icon="database">
    * **POS database** — Transaction line items with SKU, quantity, revenue, cost, discount applied, and timestamp
    * **Promotions database** — Campaign records with promotion name, SKU list, discount type, start date, end date, and target revenue
  </Card>

  <Card title="Knowledge spaces" icon="book-open">
    * **Promotion playbook templates** — Internal guidelines for evaluating promotion success (target lift thresholds, acceptable margin erosion)
    * **Markdown policies** — Rules for post-promotion markdown timing and clearance thresholds
  </Card>
</CardGroup>

**Semantic layer:** Define these in your ontology before setting up the agent.

| Component | Name                | Definition                                                                                                                  |
| --------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Object    | `Promotion`         | Maps to the promotions database. Represents a campaign with its SKUs, date range, and discount structure                    |
| Object    | `SKU`               | Maps to the POS item master. Represents a product with its sales and margin history                                         |
| Metric    | `RevenueLift`       | Promoted-period revenue minus baseline revenue (same period prior year or pre-promotion average), expressed as a percentage |
| Metric    | `GrossMarginImpact` | Difference in gross margin dollars between the promoted period and the baseline period                                      |
| Dimension | `PromotionType`     | Categorization: percentage discount, BOGO, bundle, loyalty points, clearance                                                |

<Tip>
  See [building a semantic layer](/quickstart/build-semantic-layer) for a step-by-step guide.
</Tip>

***

## Agent setup

<Steps>
  <Step title="Create the agent">
    Go to **Agent Space** → **New agent**.

    | Field    | Value                                                   |
    | -------- | ------------------------------------------------------- |
    | **Name** | Merchandising Assistant                                 |
    | **Role** | Product performance analyst                             |
    | **Goal** | Identify what drives profitable sales and what does not |
  </Step>

  <Step title="Set the description">
    > You analyze product and promotion performance across channels. When evaluating promotions, always calculate the full picture: revenue lift, margin impact, and cannibalization of related non-promoted items. Present findings with precise numbers — percentages, dollar amounts, and unit volumes. Compare results against targets when they exist. Use a neutral, analytical tone and let the data lead the recommendation.
  </Step>

  <Step title="Scope data access">
    Grant access to:

    * POS database (transactions, line items)
    * Promotions database (campaigns, discounts, date ranges)
    * Promotion playbook templates knowledge space
    * Markdown policies knowledge space
    * `Promotion`, `SKU` objects and `RevenueLift`, `GrossMarginImpact` metrics
  </Step>

  <Step title="Add skills">
    <AccordionGroup>
      <Accordion title="Analyze promotion performance">
        **Trigger:** Promotion end date passes or user requests a review

        1. Pull sales data for the promoted SKUs during the promotion period.
        2. Pull baseline sales data for the same SKUs during the equivalent prior-year period (or the 4 weeks before the promotion if no prior-year data exists).
        3. Calculate revenue lift, unit lift, and gross margin impact for each promoted SKU.
        4. Identify cannibalization: check whether non-promoted SKUs in the same category saw a sales decline during the promotion period.
        5. Compare results against the promotion's target revenue and margin thresholds.
        6. Summarize whether the promotion was profitable after accounting for discounts, cannibalization, and incremental costs.
      </Accordion>

      <Accordion title="Compare promotion types">
        **Trigger:** User asks about promotion strategy or quarterly review

        1. Retrieve all promotions run in the specified period.
        2. Group by promotion type (percentage discount, BOGO, bundle, loyalty, clearance).
        3. Calculate average revenue lift, margin impact, and cannibalization rate for each type.
        4. Rank promotion types by net margin contribution.
        5. Present a comparison table and recommend which types to increase, reduce, or retire.
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>

***

## Automation

### Playbook: Post-promotion report

<Steps>
  <Step title="Set the trigger">
    Event trigger: **Promotion end date reached** in the promotions database. Runs automatically the day after each promotion ends.
  </Step>

  <Step title="Build the workflow">
    1. **Query** the promotions database for the promotion that just ended — get the SKU list, discount structure, and targets.
    2. **Query** the POS database for promoted-SKU sales during the promotion period and the baseline period.
    3. **Run Python analysis** to calculate:
       * Revenue lift percentage: `(promo_revenue - baseline_revenue) / baseline_revenue * 100`
       * Gross margin impact: `promo_margin_dollars - baseline_margin_dollars`
       * Cannibalization index: percentage change in same-category non-promoted SKU sales during the promotion window.
       * Net promotion value: margin impact minus estimated promotion costs (ad spend, signage, labor).
    4. **Condition:** If net promotion value is negative, flag the report as "unprofitable" and include a recommendation to adjust or retire the promotion format.
    5. **Aggregate** into a formatted report with summary metrics and a SKU-level detail table.

    <Info>
      The **lift calculation** step uses a Python code block to compute baseline-adjusted revenue lift, margin impact, and the cannibalization index. You can customize the baseline methodology (prior year vs. pre-promotion average) and the cost allocation formula.
    </Info>
  </Step>

  <Step title="Configure delivery">
    Send an email to the merchandising team and the category manager with the subject line: "Promotion report — \[Promotion Name]". Include the summary at the top and the full SKU detail table below.
  </Step>

  <Step title="Test and activate">
    Click **Run now** to test with live data, then toggle to **Active**.
  </Step>
</Steps>

***

## What's next

<CardGroup cols={2}>
  <Card title="Product assortment optimization" icon="arrow-right" href="/use-cases/retail/product-assortment-optimization">
    Use promotion insights alongside product performance data to optimize your assortment.
  </Card>

  <Card title="All retail use cases" icon="list" href="/use-cases/retail">
    See the full list.
  </Card>
</CardGroup>
