# Storefront rules

## Pricing rules

Pricing rules are the heart of Pallet. They define which customers receive which discounts based on their tags. This guide will walk you through creating, managing, and optimizing your pricing rules.

A pricing rule is a discount configuration that automatically applies to customers with a specific tag. Each rule consists of:

* **Customer Tag**: The tag that identifies which customers receive the discount (e.g., "wholesale", "vip", "tier-1")
* **Discount Percentage**: The percentage discount to apply (1-100%)
* **Status**: Whether the rule is active or inactive

#### Example

**Rule:** Wholesale customers get 20% off

* Customer Tag: `wholesale`
* Discount Percentage: `20`
* Status: `Active`

When a customer tagged "wholesale" logs in and browses your store, all prices will display 20% lower than the regular price.

{% stepper %}
{% step %}

#### Navigate to the Rules Page

* Open your Shopify admin
* Click **Apps** in the left sidebar
* Select **Pallet**
* Click **Rules** in the navigation (if not already there)
  {% endstep %}

{% step %}

#### Start Creating a Rule

* Click the **Create rule** button in the top right
* You'll see the rule creation form with two main sections: **Audience** and **Discount**
  {% endstep %}

{% step %}

#### Configure the Audience

The Audience section defines which customers will receive this discount.

**Customer Tag**

* Enter the exact tag that identifies your customer segment
* Tags are case-insensitive (e.g., "Wholesale" and "wholesale" are the same)
* Common examples:
  * `wholesale` - For wholesale buyers
  * `vip` - For VIP members
  * `tier-1`, `tier-2`, `tier-3` - For tiered pricing
  * `distributor` - For distributors
  * `retail` - For retail partners
    {% endstep %}

{% step %}

#### Set the Discount

**Discount Percentage**

* Enter a number between 1 and 100
* This represents the percentage off the regular price
* Examples:
  * `15` = 15% off (customer pays 85% of original price)
  * `30` = 30% off (customer pays 70% of original price)
  * `50` = 50% off (customer pays 50% of original price)
    {% endstep %}

{% step %}

#### Save the Rule

1. Review your settings
2. Click **Create rule**
3. The rule is now active (if status is set to Active)

Your pricing rule is now live! Customers with the matching tag will see discounted prices when they log in.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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:

```
GET https://help.brickspacelab.com/pallet/getting-started/creating-your-first-storefront-rule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
