> For the complete documentation index, see [llms.txt](https://docs.peakcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peakcommerce.com/product/rules-and-customizations/rules-overview/protecting-margin-with-policies.md).

# Protecting Margin with Policies

The **Policy Engine** is where you set the guardrails on commerce actions. A policy watches for one kind of change — a discount, a downgrade, a seat change, a cancellation — and returns a decision: **allow**, **warn**, **require approval**, or **block**, with a reason. Your team moves fast, and the rules keep margin from quietly leaking away.

This walkthrough builds two guardrails live.

{% embed url="<https://youtu.be/zHw0v6YU3uk>" %}

**Where to find it**

Go to **Rules & Automation → Policy Engine**. Policies are evaluated top to bottom by priority, and the first block-severity match stops the action.

**Build a discount cap**

1. Select **Add Policy**, then choose the **Discount Cap** type.
2. Name it, and set the **Maximum Discount** — for example, 15%.
3. Choose the enforcement action. **Require Approval** lets the deal proceed but routes anything over the cap for a manager's sign-off, so nothing stalls and nothing slips through.
4. Save. From now on, discounts above the cap route for approval automatically.

**Protect revenue on downgrades**

1. Add another policy and choose **Downgrade Protection**.
2. Set the **MRR Impact Threshold** — the monthly recurring revenue a downgrade would have to exceed before the policy fires (for example, $5,000).
3. Leave enforcement on **Block** to stop high-value downgrades outright above the line, or use **Require Approval** to review them first.
4. Save. High-value downgrades now stop for review before they ever take effect.

**Enforcement actions**

* **Allow** — no restriction.
* **Warn** — allow, but surface a warning.
* **Require Approval** — allow, pending a manager's sign-off.
* **Block** — prevent the action outright.

> **Tip:** Policies apply across every channel — storefronts, CSR flows, and AI agents all honor the same guardrails, so a discount cap set once holds everywhere.

**Learn more:** [Rules Overview](/product/rules-and-customizations/rules-overview.md) · [Creating and Managing Rule Sets](/product/rules-and-customizations/rules-overview/creating-and-managing-rule-sets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.peakcommerce.com/product/rules-and-customizations/rules-overview/protecting-margin-with-policies.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
