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

# Set Up Custom Fields

> Create custom fields in the Fungies Dashboard to collect customer data during checkout.

This guide walks you through creating custom fields to collect additional information from customers during checkout.

## Prerequisites

<Check>You have [webhooks set up](/developers/webhooks/setup) to receive custom field data</Check>

## Create a Custom Field

<Steps>
  <Step title="Open the Dashboard">
    Go to [Fungies Dashboard](https://app.fungies.io) → **Products** → **Game Assets**
  </Step>

  <Step title="Select a Project">
    Click **Add project** to create a new one, or edit an existing project
  </Step>

  <Step title="Add a Custom Field">
    In the project form, scroll to **Custom Fields** and click **Add field**
  </Step>

  <Step title="Configure the Field">
    Choose a field type and configure its settings (see below)
  </Step>

  <Step title="Save">
    Click **Save** to apply your changes
  </Step>
</Steps>

<Info>
  Custom fields apply to all products within a project. Customers must fill in all custom fields to complete checkout.
</Info>

## Field Types

### Text Field

A free-form text input for collecting strings like usernames, IDs, or notes.

| Setting            | Description                                               |
| ------------------ | --------------------------------------------------------- |
| **Label**          | Field label shown to customers (e.g., "Player ID")        |
| **Placeholder**    | Hint text shown in the empty field                        |
| **Regex**          | Optional pattern validation (e.g., `^[a-zA-Z0-9]{3,20}$`) |
| **Validation URL** | Optional API endpoint for custom validation               |

**Common uses:**

* Player IDs / Usernames
* Email addresses
* External account identifiers
* Custom notes or messages

### Selection Field

A dropdown menu where customers choose from predefined options.

| Setting     | Description                                            |
| ----------- | ------------------------------------------------------ |
| **Label**   | Field label shown to customers (e.g., "Select Server") |
| **Options** | List of choices (minimum 1 required)                   |

**Common uses:**

* Game server selection
* Region preference
* Product variants or configurations

## Example Configurations

### Player ID Field

```
Label: Player ID
Placeholder: Enter your in-game player ID
Regex: ^[a-zA-Z0-9_]{3,32}$
```

This accepts alphanumeric player IDs between 3 and 32 characters.

### Server Selection Field

```
Label: Select Your Server
Options:
  - US East
  - US West  
  - EU Central
  - Asia Pacific
```

Customers select which server should receive their purchased items.

### Discord Username Field

```
Label: Discord Username
Placeholder: username#1234
Regex: ^.{3,32}#[0-9]{4}$
```

Validates the classic Discord username format.

## Receiving Custom Field Data

When a customer completes a purchase, the custom field data is included in the webhook payload:

```json theme={null}
{
  "object": "event",
  "type": "order.paid",
  "data": {
    "object": "order",
    "id": "ord_abc123",
    "customFields": {
      "playerId": "Player_12345",
      "server": "US East"
    }
  }
}
```

Your webhook handler can extract this data and use it to fulfill the order in your system.

## Best Practices

<Tip>
  **Keep it minimal.** Only ask for information you actually need. More fields = more friction = lower conversion rates.
</Tip>

* Use clear, descriptive labels that customers understand
* Add placeholder text showing the expected format
* Use regex validation to catch errors early
* Consider using selection fields when there's a fixed set of options

## Next Steps

<Card title="Add Validation Rules" icon="shield-check" href="/developers/customer-data/validate">
  Learn how to validate customer input with regex patterns or your own API
</Card>
