> ## 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.

# Price elasticity monitoring

> Track how price changes affect unit volume and margin so you can optimize pricing decisions

Every price change is a bet. Raise the price too much and volume drops. Lower it too far and you erode margin without enough incremental units to compensate. Most retail teams set prices based on competitor matching or cost-plus formulas without understanding the actual demand response.

Wayak connects your POS data, detects price change events automatically, and runs Python-powered elasticity calculations in playbooks. You get a clear picture of how price-sensitive each product is, so your pricing team can make decisions that maximize total margin — not just revenue or volume.

***

## What you need

<CardGroup cols={2}>
  <Card title="Data sources" icon="database">
    * **POS database** — Transaction line items with SKU, quantity sold, selling price, date, and location
    * **Pricing database** — Price change history with SKU, old price, new price, effective date, and change reason
  </Card>

  <Card title="Knowledge spaces" icon="book-open">
    * **Pricing strategy guidelines** — Internal rules for price floors, competitive positioning, and margin targets by category
    * **Competitive pricing reports** — Uploaded competitor price comparisons for key SKUs
  </Card>
</CardGroup>

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

| Component | Name              | Definition                                                                                                               |
| --------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Object    | `SKU`             | Maps to the POS item master. Represents a product with its price and sales history                                       |
| Object    | `PriceChange`     | Maps to the pricing database. Represents a single price change event with before/after values                            |
| Metric    | `PriceElasticity` | Percentage change in unit volume divided by percentage change in price. Values below -1 indicate elastic demand          |
| Metric    | `MarginPerUnit`   | Selling price minus cost of goods sold per unit                                                                          |
| Dimension | `ElasticityBand`  | Categorization: highly elastic (below -1.5), elastic (-1.5 to -1.0), unit elastic (-1.0 to -0.5), inelastic (above -0.5) |

<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** | Pricing Analyst                                                   |
    | **Role** | Price optimization and demand analysis specialist                 |
    | **Goal** | Maximize total margin by understanding price-demand relationships |
  </Step>

  <Step title="Set the description">
    > You analyze the relationship between price changes and demand. When reporting elasticity, always show the math: the percentage change in price, the percentage change in units, and the resulting elasticity coefficient. Distinguish between price increases and decreases — elasticity is often asymmetric. Factor in seasonality and competitive context when interpreting results. Use precise language and avoid vague terms like "slightly" or "somewhat." Present recommendations in terms of total margin impact, not just unit volume.
  </Step>

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

    * POS database (transactions, line items)
    * Pricing database (price change history)
    * Pricing strategy guidelines knowledge space
    * Competitive pricing reports knowledge space
    * `SKU`, `PriceChange` objects and `PriceElasticity`, `MarginPerUnit` metrics
  </Step>

  <Step title="Add skills">
    <AccordionGroup>
      <Accordion title="Calculate price elasticity for a SKU">
        **Trigger:** User asks about price sensitivity or a price change review

        1. Retrieve the price change history for the requested SKU.
        2. For each price change event, pull unit sales for the 4 weeks before and 4 weeks after the change.
        3. Calculate the percentage change in average daily unit volume.
        4. Calculate the percentage change in selling price.
        5. Compute the price elasticity coefficient: % change in volume / % change in price.
        6. Classify the SKU into an elasticity band (highly elastic, elastic, unit elastic, or inelastic).
        7. Estimate the margin-maximizing price based on the elasticity curve and current COGS.
      </Accordion>

      <Accordion title="Identify mispriced products">
        **Trigger:** User requests a pricing review or quarterly pricing audit

        1. Retrieve all SKUs with at least one price change in the past 6 months.
        2. Calculate the elasticity coefficient for each.
        3. Flag SKUs where the current price appears suboptimal: elastic products priced above the margin-maximizing point, or inelastic products priced below it.
        4. Estimate the weekly margin opportunity if the price were adjusted to the optimal point.
        5. Rank by margin opportunity and present as a table with current price, suggested price, and estimated weekly margin gain.
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>

***

## Automation

### Playbook: Price change impact alert

<Steps>
  <Step title="Set the trigger">
    Schedule: **Weekly on Wednesday at 8:00 AM** (evaluates all price changes from the prior week with enough post-change sales data).
  </Step>

  <Step title="Build the workflow">
    1. **Query** the pricing database for all price changes effective in the past 7-14 days (changes that now have at least 7 days of post-change sales data).
    2. **Query** the POS database for pre-change and post-change unit sales for each affected SKU.
    3. **Run Python analysis** to calculate:
       * Price elasticity coefficient for each change event.
       * Actual margin impact: `(new_margin_per_unit * new_daily_units - old_margin_per_unit * old_daily_units) * 7`
       * Projected annual margin impact if the new price holds.
    4. **Condition:** If any price change resulted in a negative margin impact exceeding \$500/week, flag it as "review needed" with a recommendation to revert or adjust.
    5. **Aggregate** into a summary: total price changes evaluated, positive impact count, negative impact count, and net weekly margin effect.

    <Info>
      The **elasticity calculation** step uses a Python code block to compute the elasticity coefficient and margin impact. You can customize the pre/post observation window and the significance threshold for flagging negative impacts.
    </Info>
  </Step>

  <Step title="Configure delivery">
    Send an email to the pricing and merchandising teams with the subject line: "Price change impact — week of \[date]". Flag negative-impact items at the top. Post a summary to the `#pricing` Slack channel.
  </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="Store benchmarking" icon="arrow-right" href="/use-cases/retail/store-benchmarking">
    Combine pricing insights with store-level performance to understand how pricing decisions play out across locations.
  </Card>

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