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

# Quick start

# Quick Start

Build your first Function Lab discount in under 5 minutes.

## Prerequisites

* Shopify Plus store
* Function Lab app installed
* Admin access to your Shopify store

## Your First Discount Function

We'll create a simple 10% discount for VIP customers.

### Step 1: Access Function Lab

1. Log into your Shopify admin
2. Navigate to Apps → Function Lab
3. Click "Create New Function"
4. Select "Product Discount"

### Step 2: Configure Your Rule

```json  theme={null}
{
  "rules": [
    {
      "conditions": {
        "customer.tags": {
          "includes": "VIP"
        }
      },
      "events": [
        {
          "discount": "product_discount",
          "params": {
            "discount_type": "percentage",
            "value": 10,
            "message": "VIP Customer Discount"
          }
        }
      ]
    }
  ]
}
```

### Step 3: Test Your Function

1. Click "Preview" in the Function Lab interface
2. Enter a test cart with a customer tagged "VIP"
3. Verify the 10% discount appears

### Step 4: Activate

1. Give your function a name: "VIP Customer Discount"
2. Click "Save and Activate"
3. Your function is now live!

## What Just Happened?

You created a **rule** with:

* **Condition**: Checks if customer has "VIP" tag
* **Event**: Applies 10% discount when condition is true
* **Message**: Shows "VIP Customer Discount" to customer

## Next Steps

* [Core Concepts](core-concepts.md) - Understand rules, conditions, events, and facts
* [Common Patterns](common-patterns.md) - Explore more discount scenarios
* [Product Discounts](../function-types/product-discounts/overview.md) - Deep dive into product discount features

## Common First Issues

**Discount not appearing?**

* Verify customer has "VIP" tag (case-sensitive)
* Check function is activated in Shopify admin
* Ensure no conflicting discounts exist

**Wrong discount amount?**

* Percentage discounts use whole numbers (10 = 10%, not 0.10)
* Check `discount_type` is set to "percentage"
