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

# Add deeplinks to your agent

> Deeplinks allow your AI Agent to guide users straight to the exact place they need—whether it’s a filtered product list, a specific category, or a pre-filled search.

### **What You’ll Learn**

* What deeplinks are and why they matter
* How to structure deeplinks for your website
* How to instruct your AI Agent to use them
* A complete example using categories, styles, and sizes

### **What Is a Deeplink?**

A **deeplink** is a URL that leads directly to a specific part of your website.

Instead of sending users to your homepage or main shop, a deeplink can point to:

* A specific product category
* A filtered search result
* A specific size, style, or variant
* A personalized or pre-applied filter combination

This allows your AI Agent to answer with **precise, actionable links** tailored to what the user wants.

### **Building a Deeplink Structure**

Every website is different, but the logic remains the same:

Start with a **base URL**, then add filters (like category, style, size, color, etc.) as URL parameters.

For the example below, we’ll use this base URL:

```
https://fashion-store.com/shop/
```

<Steps>
  <Step title="Add a Product Category">
    Attach a category parameter:

    ```
    ?category=[NUMBER]
    ```

    Example category mapping:

    | **Category** | Code |
    | ------------ | ---- |
    | Dresses      | 101  |
    | T-shirts     | 102  |
    | Jackets      | 103  |
    | Pants        | 104  |
    | Shoes        | 105  |

    If the user asks for a category that doesn’t exist, your AI Agent should return the list of available categories.
  </Step>

  <Step title="Add Style Preferences (Optional)">
    If the user specifies a style, append:

    ```
    &style=[STYLE_CODE]
    ```

    Example style codes:

    | **Style** | **Code** |
    | :-------- | :------- |
    | Casual    | CA       |
    | Formal    | FO       |
    | Athletic  | AT       |
    | Outdoor   | OD       |
    | Business  | BU       |

    If no style is mentioned, skip this parameter.
  </Step>

  <Step title="New Step">
    Append the size code:

    ```
    &size=[SIZE_CODE]
    ```

    | **Size**    | **Code** |
    | :---------- | :------- |
    | Small       | S        |
    | Medium      | M        |
    | Large       | L        |
    | Extra Large | XL       |

    Your AI Agent will only add this when the user mentions a size.
  </Step>

  <Step title="Full Example">
    A user asks:

    ```
    “Show me medium casual T-shirts.”
    ```

    The AI Agent constructs the URL:

    ```
    https://fashion-store.com/shop/?category=102&style=CA&size=M
    ```

    This deeplink leads directly to filtered results for **medium, casual T-shirts**.
  </Step>

  <Step title="Step-by-Step: Add Deeplinks to Your AI Agent">
    To make sure your AI Agent correctly builds deeplinks, add clear rules to the AI Agent settings section at Guidelines

    Recommended Instruction

    ```
    When users specify preferences such as category, style, or size, build a deeplink using the structure below.

    Base URL:
    https://fashion-store.com/shop/

    Available Categories:
    Dresses = 101
    T-shirts = 102
    Jackets = 103
    Pants = 104
    Shoes = 105

    Available Styles:
    Casual = CA
    Formal = FO
    Athletic = AT
    Outdoor = OD
    Business = BU

    Available Sizes:
    Small = S
    Medium = M
    Large = L
    Extra Large = XL

    Deeplink structure:
    ?category=[CATEGORY_CODE]&style=[STYLE_CODE]&size=[SIZE_CODE]

    Rules:
    - Only add parameters the user actually mentioned.
    - If a requested category, style, or size does not exist, provide the list of valid options.
    - Always return the final URL as a clickable hyperlink using Markdown like:
      [View results](URL_HERE)
    ```
  </Step>
</Steps>

### **Best Practices**

* Keep your category and filter lists up to date
* Use hyperlink formatting (e.g., **View results**) rather than raw URLs
* Test multiple example scenarios in the tester
* Make sure your AI Agent only includes parameters the user actually mentioned
