# Custom Fields

{% embed url="<https://www.youtube.com/embed/qvsAqdnxvmo>" %}

A custom field is a `key:value` pair that is defined for a given product, which you can override for any license you issue or edit.

### Set a License Custom Field for a License Policy

License policies are templates you can use when issuing a license, and you can specify a license custom field for any license policy. Any license issued with the policy will use the license custom field.

Open the license policy editor by navigating to the license detail page > license policies, and either "add a new license policy" or click the pencil of an existing license policy.

![](/files/c80278c5e82aabf2e5116a827ba2580b2fac6ce8)

In the license policy editor, click on "custom fields" and "select the custom fields" from the dropdown. Tick the box of any product custom field you wish to override the values for. Their values (not their names) for those selected fields can then be edited in the table. Click confirm when you are done.

{% hint style="info" %}
A notice is now displayed above the custom fields: *Setting a value here will override the default value set in the Product custom fields configuration.*
{% endhint %}

![](/files/ec830bdf44028786c5aa2a8376f9b3cf8c678d59)

![Selecting Custom Fields](/files/42c2176255cbf58c039b2d105350d942d9fec6c3)

![Editing Values for Policy](/files/68dbc3139b69820e1cd679d93d8fcf6d2a62f1d3)

### Edit a License Custom Field for an Existing License

Open the license detail page, and click on custom fields. You will see a table with all of the custom fields for that product, regardless whether or not they have been overridden. Click the pencil on the row for the value of the license custom field you would like to override. Click "confirm" to save the changes:

![](/files/e4cd442416e5fa39409eda42bc49d38de0d5db61)

Custom fields display labels indicating whether the value comes from the **Product Default** or is a **License-specific custom value**. Changing a field updates its type automatically if it was previously a product default.

![](/files/8ac07e045807a459aedb58f02a7d727fc243a05e)

#### Resetting License Custom Field Values

{% stepper %}
{% step %}

### Individual License Reset

* For any license with **“License custom value”**, a **“Reset to product default”** button is available.
* Clicking it **reverts the value to the product default**, updates the label to **“Product default value”**, and removes the reset button for that field.
* Works consistently across **multiple custom fields**, and **bundle licenses**.

![](/files/b2e0947d02ea95ce261e75e1bb452388f50af12f)

![Editing Custom Field Value](/files/62ffe222f200b6ca71d8fae506f98f0b7a9ed4e4)
{% endstep %}
{% endstepper %}

### During Order Creation

* When using **custom license values** in an order, any edits to custom fields will **override the product default values**. A notification is shown to alert the user about this override.

![](/files/d1a45965b23cb280ee8b4f210853f9edfa43e1ad)

### Product vs License Custom Fields

**Product custom fields** are defined on the product with default values. When a license is created and those default values are overridden, **license-specific custom fields are** generated in our database. These fields are returned with the license data, allowing you to track license-specific overrides.

{% hint style="info" %}
If you add a new **custom field** to a product after licenses have already been created, those existing licenses **will not automatically** receive the new field.
{% endhint %}

To handle this, when fetching licenses via the **Management API**, LicenseSpring includes **product custom fields** in the license response. This enables you to see the differences between the product defaults and license-specific values.

For new product custom fields added after a license was created, you can retrieve them directly using the following endpoint:

```
GET /api/v1/product-custom-fields/?company={{platform_company_id}}&product={product_id}
```

{% hint style="info" %}
If defined, the key and the value of a custom field is always returned on License Checks and License Activations. You may modify the value for any custom field for each license.
{% endhint %}

For more information on defining product custom fields, please read [**Product Custom Fields**](broken://pages/0984a22f8f6f75cce17cf1afc29c994faab6f94c).


---

# 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://docs.licensespring.com/license-entitlements/custom-fields.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.
