Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pagination_next: null
<a href="/vendor/releases-creating-customer">Creating and Managing Customers</a>
</li>
<li>
<a href="/vendor/licenses-adding-custom-fields">Managing Custom License Fields</a>
<a href="/vendor/licenses-adding-custom-fields">Managing Customer License Fields</a>
</li>
</ul>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/template-functions-license-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
```go
func LicenseFieldValue(name string) string
```
LicenseFieldValue returns the value of the specified license field. LicenseFieldValue accepts custom license fields and all built-in license fields. For a list of all built-in fields, see [Built-in License Fields](/vendor/licenses-using-builtin-fields).
LicenseFieldValue returns the value of the specified license field. LicenseFieldValue accepts custom license fields and all built-in license fields. For a list of all built-in fields, see [Built-In License Fields](/vendor/licenses-using-builtin-fields).

LicenseFieldValue always returns a string, regardless of the license field type. To return integer or boolean values, you need to use the [ParseInt](/reference/template-functions-static-context#parseint) or [ParseBool](/reference/template-functions-static-context#parsebool) template function to convert the string value.

Expand Down
2 changes: 1 addition & 1 deletion docs/vendor/licenses-about-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Community Licenses
# About Community Licenses

This topic describes community licenses. For more information about other types of licenses, see [License Types](licenses-about#license-types) in _About Customers_.

Expand Down
8 changes: 4 additions & 4 deletions docs/vendor/licenses-about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ Except Community licenses, the license type is used solely for reporting purpose

You can change the type of a license at any time in the Vendor Portal. For example, if a customer upgraded from a trial to a paid account, then you could change their license type from Trial to Paid for reporting purposes.

### Built-in and Custom License Fields
### Built-In and Custom License Fields

Customer licenses have built-in fields and also support custom fields.
Each customer record in the Vendor Portal has built-in fields and also supports custom fields.

Built-in fields are reserved field names. You can specify the values for these fields to define entitlements for the customer. For example, Replicated includes built-in license fields to define the license expiration date, customer name, and application slug. For more information about built-in fields, see [Built-in License Fields](licenses-using-builtin-fields).
The built-in fields include values such as the customer name, customer email, and the license expiration date. You can optionally set initial values for the built-in fields so that each new customer created in the Vendor Portal starts with the same set of values. You can also create custom fields to define entitlements for your application. For example, you can create a custom field to set the number of active users permitted.

You can also create custom license fields to define entitlements specific to the customer. For example, you can create a custom license field to limit the number of active users permitted. For more information about creating custom license fields, see [Managing Custom License Fields](licenses-adding-custom-fields).
For more information, see [Managing Customer License Fields](/vendor/licenses-adding-custom-fields).

## About Updating Licenses

Expand Down
52 changes: 34 additions & 18 deletions docs/vendor/licenses-adding-custom-fields.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# Managing Custom License Fields
# Managing Customer License Fields
Copy link
Contributor

@paigecalvert paigecalvert Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Updated this topic so that it's about managing all types of license fields from the License Fields tab in the Vendor Portal in general. Meaning, the new steps about how to set initial values for built-in fields are moved over to this topic. Previously, this topic just had info about custom fields.

The idea is that you can go to one page in the docs for info about the License Fields Vendor Portal page


In addition to the built-in license fields available through the Replicated vendor
portal, you can also create custom license fields for a customer.
This topic describes how to manage customer license fields in the Replicated Vendor Portal, including how to add custom fields and set initial values for the built-in fields.

For information about the fields that are included by default for each customer
license, see [Using built-in license fields](licenses-using-builtin-fields).
## Set Initial Values for Built-In License Fields (Beta)

## About Custom License Fields
You can set initial values to populate the **Create Customer** form in the Vendor Portal when a new customer is created. This ensures that each new customer created from the Vendor Portal UI starts with the same set of built-in license field values.

Custom license fields are useful when there is entitlement information that applies to a subset of customers. For example, you can create a custom license field to limit the number of active users permitted. Or, you can create a field that limits the number of nodes a customer is permitted on their cluster.
:::note
Initial values are not applied to new customers created through the Vendor API v3. For more information, see [Create a customer](https://replicated-vendor-api.readme.io/reference/createcustomer-1) in the Vendor API v3 documentation.
:::

These _initial_ values differ from _default_ values in that setting initial values does not update the license field values for any existing customers.

To set initial values for built-in license fields:

1. In the Vendor Portal, go to **License Fields**.

1. Under **Built-in license options**, click **Edit** next to each license field where you want to set an initial value.

![Edit Initial Value](/images/edit-initial-value.png)

[View a larger version of this image](/images/edit-initial-value.png)

## Manage Custom License Fields

You can create custom license fields in the Vendor Portal. For example, you can create a custom license field to set the number of active users permitted. Or, you can create a field that sets the number of nodes a customer is permitted on their cluster.

The custom license fields that you create are displayed in the Vendor Portal for all new and existing customers. If the custom field is not hidden, it is also displayed under the **Licenses** tab for customers in the Replicated Admin Console.
The custom license fields that you create are displayed in the Vendor Portal for all new and existing customers. If the custom field is not hidden, it is also displayed to customers under the **Licenses** tab in the Replicated Admin Console.

## Limitation
### Limitation

The maximum size for a license field value is 64KB.

## Create Custom License Fields
### Create Custom License Fields

To create a custom license field:

Expand All @@ -37,20 +53,20 @@ To create a custom license field:
| Type| The field type. Supported formats include integer, string, text (multi-line string), and boolean values. This value cannot be changed. |
| Default | The default value for the field for both existing and new customers. It is a best practice to provide a default value when possible. The maximum size for a license field value is 64KB. |
| Required | If checked, this prevents the creation of customers unless this field is explicitly defined with a value. |
| Hidden | If checked, the field is not visible to your customer in the Replicated Admin Console. The field is still visible to you in the Vendor Portal. **Note**: The Hidden field is displayed only for vendors with access to the Replicated KOTS installer. |
| Hidden | If checked, the field is not visible to your customer in the Replicated Admin Console. The field is still visible to you in the Vendor Portal. **Note**: The Hidden field is displayed only for vendors with access to the Replicated installers (KOTS, kURL, Embedded Cluster). |

## Update Custom License Fields
### Update Custom License Fields

To update a custom license field:

1. Log in to the Vendor Portal and select the application.
1. On the **License Fields** page, click **Edit Field** on the right side of the target row. Changing the default value for a field updates the value for each existing customer record that has not overridden the default value.

:::important
Enabling **Is this field is required?** updates the license field to be required on all new and existing licenses. If you enable **Is this field is required?**, you must either set a default value for the field or manually update each existing license file to provide a value for the field.
Enabling **Is this field is required?** updates the license field to be required on all new and existing customers. If you enable **Is this field is required?**, you must either set a default value for the field or manually update each existing customer to provide a value for the field.
:::

## Set Customer-Specific Values for Custom License Fields
### Set Customer-Specific Values for Custom License Fields

To set a customer-specific value for a custom license field:

Expand All @@ -67,11 +83,11 @@ To set a customer-specific value for a custom license field:

[View a larger version of this image](/images/customer-license-custom-fields.png)

## Delete Custom License Fields
### Delete Custom License Fields

Deleted license fields and their values do not appear in the customer's license in any location, including your view in the Vendor Portal, the downloaded YAML version of the license, and the Admin Console license screen.
Deleted license fields and their values do not appear in the customer's license in any location, including your view in the Vendor Portal, the downloaded YAML version of the license, and the Admin Console **License** screen.

By default, deleting a license field also deletes all of the values associated with the field in each customer record.
By default, deleting a custom license field also deletes all of the values associated with the field in each customer record.

Only administrators can delete license fields.

Expand All @@ -92,4 +108,4 @@ To delete a custom license field:
If you enable **Preserve License Values**, you can create a new field with the same name and `type` as the deleted field to reinstate the preserved values.
:::

1. Follow the instructions in the dialog and click **Delete**.
1. Follow the instructions in the dialog and click **Delete**.
2 changes: 1 addition & 1 deletion docs/vendor/licenses-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For information about how to download customer licenses with the Vendor API v3,

## Download Licenses

A valid license file is required to install with Replicated KOTS. You can download license files for your customers from the **Customer** page in the Vendor Portal.
You can download license files for your customers from the **Customer** page in the Vendor Portal.

To download a license:

Expand Down
2 changes: 1 addition & 1 deletion docs/vendor/licenses-reference-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To check entitlements before installation:

1. In the Vendor Portal, click **Customers**. Select a customer and click the **Manage customer** tab. Alternatively, click **+ Create customer** to create a new customer. For more information, see [Creating and Managing Customers](/vendor/releases-creating-customer).

1. Edit the built-in license fields or add custom fields for the customer. For example, you can set a license expiration date in the **Expiration policy** field. Or, you can create a custom field that limits the number of nodes a user is permitted in their cluster. For more information, see [Managing Custom License Fields](/vendor/licenses-adding-custom-fields).
1. Edit the built-in license fields or add custom fields for the customer. For example, you can set a license expiration date in the **Expiration policy** field. Or, you can create a custom field that limits the number of nodes a user is permitted in their cluster. For more information, see [Managing Customer License Fields](/vendor/licenses-adding-custom-fields).

1. In your Helm chart, update the Helm templates with one or more directives to access the license field. For example, you can access the built-in `expires_at` field with `{{ .Values.global.replicated.licenseFields.expires_at }}`. Add the desired logic to control application behavior based on the values of license fields.

Expand Down
4 changes: 2 additions & 2 deletions docs/vendor/licenses-reference-kots-runtime.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Using the KOTS License API to check entitlements during runtime is _not_ recomme

KOTS includes default logic to control access to features in the KOTS Admin Console and KOTS CLI based on the values for the built-in fields in the customer's license. For example, by default, KOTS uses the built-in `expires_at` field to prevent an instance from receiving updates when the customer license expires. You can add custom logic to your application to control the behavior of your application based on the built-in fields or any of the custom fields that you create.

For more information about creating custom license fields, see [Managing Custom License Fields](licenses-adding-custom-fields). For more information about the built-in license fields, see [Built-In License Fields](licenses-using-builtin-fields).
For information about creating custom license fields, see [Managing Customer License Fields](licenses-adding-custom-fields). For the list of built-in fields in customer licenses, see [Built-In License Fields](/vendor/licenses-using-builtin-fields).

The Replicated admin console runs on the customer's cluster and provides entitlement information during application runtime. You can query the admin console `/license/v1/license` endpoint to enforce entitlements at runtime.
The KOTS Admin Console runs on the customer's cluster and provides entitlement information during application runtime. You can query the admin console `/license/v1/license` endpoint to enforce entitlements at runtime.

## Query Fields

Expand Down
2 changes: 1 addition & 1 deletion docs/vendor/licenses-reference-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To use the SDK API to query entitlements at runtime:

1. In the Vendor Portal, click **Customers**. Select a customer and click the **Manage customer** tab. Alternatively, click **+ Create customer** to create a new customer. For more information, see [Creating and Managing Customers](/vendor/releases-creating-customer).

1. Edit the built-in license fields or add custom fields for the customer. For example, you can set a license expiration date in the **Expiration policy** field. Or, you can create a custom field that limits the number of nodes a user is permitted in their cluster. For more information, see [Managing Custom License Fields](/vendor/licenses-adding-custom-fields).
1. Edit the built-in fields and add custom fields for the customer. For example, you can set a license expiration date in the **Expiration policy** field. Or, you can create a custom field that limits the number of nodes a user is permitted in their cluster. For more information, see [Managing Customer License Fields](/vendor/licenses-adding-custom-fields).

1. (Recommended) Develop against the SDK API `license` endpoints locally:

Expand Down
2 changes: 1 addition & 1 deletion docs/vendor/licenses-referencing-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This topic describes how to check custom entitlements before installation or upg

KOTS includes default logic to control access to features in the Replicated Admin Console and KOTS CLI based on the values for the built-in fields in the customer's license. For example, by default, KOTS uses the built-in `expires_at` field to prevent an instance from receiving updates when the customer license expires. You can add custom logic to your application to control the behavior of your application based on the built-in fields or any of the custom fields that you create.

For more information about creating custom license fields, see [Managing Custom License Fields](licenses-adding-custom-fields). For more information about the built-in license fields, see [Built-In License Fields](licenses-using-builtin-fields).
For more information, see [Managing Customer License Fields](licenses-adding-custom-fields). For the list of built-in fields in customer licenses, see [Built-In License Fields](/vendor/licenses-using-builtin-fields).

## Add Preflights to Check Entitlements Before Installation or Upgrade {#install}

Expand Down
Loading