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

# Reference: Custom attributes

> This document presents the screens, fields, permissions, API operations, and troubleshooting of custom attributes.

## Custom Attributes screen

The screen is at **Settings** > **Custom Attributes**.

The screen has **Customers**, **Contracts**, and **Products**. Each one lists its [custom attributes](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#custom-attribute).

| Column | Description |
| - | - |
| **Name** | The name of the custom attribute, with its [custom attribute key](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#custom-attribute-key) beneath it. |
| **Type** | The [custom attribute type](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#custom-attribute-type). |
| **Default value** | The default value of the custom attribute. |
| **Applies to** | The [business entity](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#business-entity) of the custom attribute, or **All business entities**. The **Products** screen does not have this column. |
| **Rules** | **Required** appears when the custom attribute is required. **Copies to new contracts** appears on the **Customers** screen, and **Copies to new invoices** appears on the **Contracts** screen, when the custom attribute copies. |

## Add and edit screens: fields and their rules

The screens are **Add customer attribute**, **Add contract attribute**, and **Add product attribute**, with the matching **Edit** screens.

| Field | Required | Description |
| - | - | - |
| **Name** | Yes | The name of the custom attribute. |
| **Key** | Yes | The identifier of the custom attribute. See [Generated key: how the dashboard makes a key](#generated-key-how-the-dashboard-makes-a-key). |
| **Description** | No | The description appears under the field on the screen of the record. If the screen shows a **Description** button, click it to show the field. |
| **Type** | Yes | See [Custom attribute types: what a value can hold](#custom-attribute-types-what-a-value-can-hold). The field starts at **Text**. Changing the type clears the options and the default value. The **Edit** screens show the type as a read-only value. |
| **Options** | For **Dropdown** and **Multi-select** | A record that uses a removed option keeps it. Removing an option clears it from the default value. |
| **Default value** | No | The value that new records of this kind start with. Existing records do not get the default value, unless the custom attribute is required. For a checkbox or a dropdown, **No default** leaves the custom attribute without a default value. For a dropdown, the field stays disabled until you add an option. |
| **Applies to** | No | The field starts at **All business entities**. If you select one business entity, the custom attribute appears only on the records of that business entity. Records of other business entities keep their values, but the dashboard no longer shows them. A [product attribute](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#custom-attribute) does not have this field. |
| **Required** | No | See [Required custom attributes: what each record needs](#required-custom-attributes-what-each-record-needs). |
| **Copy to new contracts, invoices and journal entries** | No | For a customer attribute, new [contracts](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract) and invoices of the customer receive a [copied value](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#copied-value). If you clear the checkbox, new records stop receiving the value. A new contract still shows the customer attribute, with the value of the customer. The contract saves that value only if you change it. |
| **Copy to new invoices and journal entries** | No | For a contract attribute, new invoices of the contract receive a copied value. If you clear the checkbox, new invoices stop receiving the value. |

A product attribute does not have a copy checkbox.

### Custom attribute types: what a value can hold

| Custom attribute type | What a value holds | Example value |
| - | - | - |
| Text | Any text | `Northern office` |
| Whole number | A number without decimals | `12` |
| Decimal number | A number that can have decimals | `12.5` |
| Checkbox | `Yes` or `No` | `Yes` |
| Dropdown | One option from a list that you set | `EMEA` |
| Multi-select | Any number of options from a list that you set | `EMEA`, `APAC` |
| Array | A list of text items | `gold`, `renewal` |

### Generated key: how the dashboard makes a key

* The dashboard generates the key by changing the name to lowercase and replacing each run of other characters with one underscore.
* If the name starts with a digit, the generated key starts with `field_`.
* If the name has no Latin letters or digits, you must enter a key.
* You must enter a key if another custom attribute uses the generated key.
* You must enter a key if the generated key is reserved.
* After you enter a key, the key no longer changes with the name.
* If you empty **Key**, the key follows the name again.
* The **Edit** screens show the key as a read-only value, with an icon that copies the key.

### Required custom attributes: what each record needs

| Default value of the custom attribute | New record without a value | Existing record without a value |
| - | - | - |
| Set | The record gets the default value. | The record gets the default value at its next save. |
| Not set | You must enter a value before you can save the record. | The record needs a value at its next save. |

A checkbox always has a value when you save the record. An existing record that has never saved a checkbox saves `No` when the box is clear, even when the default value is `Yes`.

### Constraints: what each field accepts

| Property | Constraint |
| - | - |
| **Name** | The name can have up to 100 characters. |
| | The name must be different from the name of every other custom attribute, ignoring capitalization. |
| **Key** | The key can have up to 64 characters. |
| | The key starts with a lowercase letter. |
| | The key continues with lowercase letters, numbers, and single underscores, and does not end with an underscore. |
| | The key must be different from the key of every other custom attribute. |
| | The keys `crm_source`, `crm_deal_id`, `exempt_tax`, `tax_exemption_number`, `entity_use_code`, `customer_transaction_type`, and `invoice_consolidation_enabled` are reserved for Zenskar. |
| | The key cannot change after you add the custom attribute. |
| **Description** | The description can have up to 1,000 characters. |
| **Type** | The type cannot change after you add the custom attribute. |
| **Options** | A dropdown or a multi-select needs at least one option. |
| | Each option can have up to 100 characters. |
| | A multi-select option cannot contain a comma. |
| | Each option must be different. |

## Custom attributes on records: values and their rules

| Record | Screen to change values | Button to save | Saved values |
| - | - | - | - |
| Customer | **Edit customer** | **Save changes** | **View** next to **Custom attributes** on the customer screen |
| Contract | **Edit contract** | **Save**, or **Apply** for a contract that you are still creating | **View** next to **Custom attributes** on the contract screen |
| Product | **Edit product** | **Save** | **View** next to **Custom attributes** on the product screen |

On the **Edit customer** screen, **Manage** next to **Custom attributes** opens the settings of custom attributes in a new tab.

### Saved values

**View** opens the **Custom attributes** screen. **Attribute** shows the name and the custom attribute key. **Value** shows the saved value. A copied value shows **This value is from the customer**. A default value shows **This is the default value**.

### Fields at the save

| State of the field | What the dashboard shows | What happens at the save |
| - | - | - |
| The field is required, has a default value, and is empty. | **Left empty, this saves as** `<default>` | The record gets the default value. |
| The field is required, has no default value, and is empty. | The dashboard marks the field as required. | The save does not go through until the field has a value. |
| A required field holds a saved value, and you empty it. | The dashboard marks the field as required. | The save does not go through until the field has a value. |
| An optional field holds a saved value, and you empty it. | The field is empty. | The record no longer has the value. |
| The field holds the default value. | **This is the default value** | The record keeps that value. |
| The field holds an option that was removed. | `<option> (removed)` | The record keeps the option while the field stays unchanged. |
| A multi-select field holds a removed option, and you change the field. | The dashboard shows no problem. | The save is rejected. To save, remove the removed option from the field. |
| A checkbox that the record has never saved is clear. | The dashboard shows only the clear checkbox. | The record saves `No`, even when the default value is `Yes`. |

A customer attribute on a contract does not need a value, even when the customer attribute is required.

A connector sync can update an existing record without the value of a required custom attribute that has no default value.

### Copied values on a new contract

This text appears on a contract that you are still creating.

| Text | Description |
| - | - |
| **This value is from the customer** | The field holds the value of the customer. |
| **Edited for this contract** | The field holds a value that differs from the value of the customer. **Inherited value** shows the value of the customer. **Restore** appears next to it. |

If you change the customer of the contract, the field takes the value of the new customer.

### Values of each custom attribute type

These rules apply to a default value and to a value on a record.

| Custom attribute type | How you enter a value | Constraints |
| - | - | - |
| **Text** | You enter the text. | The value can have up to 1,000 characters. |
| **Whole number** | You enter a number. | The value cannot have decimals. |
| **Decimal number** | You enter a number. The dashboard rounds a longer decimal. | The value can have up to 15 decimal places. |
| **Checkbox** | You select **Yes** or **No**. | The value is **Yes** or **No**. |
| **Dropdown** | You select one option. | The value must come from the options. |
| **Multi-select** | You select any number of options. With two or more options, **Select all** selects every option. | The values must come from the options. |
| **Array** | You press Enter or type a comma to add each item. | The value can have up to 100 items. Each item can have up to 1,000 characters. An item cannot contain a comma. |

## Permissions

| Action | Required permission |
| - | - |
| Find custom attributes | **Can Read Organisation Config** |
| Add a custom attribute | **Can Read Organisation Config** and **Can Create Organisation Config** |
| Edit a custom attribute | **Can Read Organisation Config** and **Can Update Organisation Config** |
| Fill in custom attributes on a customer | **Can Read Organisation Config**, **Can Read Customer**, and **Can Update Customer** |
| Fill in custom attributes on a contract | **Can Read Organisation Config**, **Can Read Contract**, and **Can Update Contract** |
| Fill in custom attributes on a product | **Can Read Organisation Config**, **Can Read Product**, and **Can Update Product** |
| Restore a copied value on a new contract | **Can Read Organisation Config**, **Can Read Contract**, and **Can Create Contract** |

## API reference

| Operation | API reference |
| - | - |
| List custom attributes | [List custom attribute definitions](https://zenskar.com/docs/api-reference/custom-attributes/list-custom-attribute-definitions.md) |
| Get a custom attribute | [Get custom attribute definition](https://zenskar.com/docs/api-reference/custom-attributes/get-custom-attribute-definition.md) |
| Add a custom attribute | [Create custom attribute definition](https://zenskar.com/docs/api-reference/custom-attributes/create-custom-attribute-definition.md) |
| Edit a custom attribute | [Update custom attribute definition](https://zenskar.com/docs/api-reference/custom-attributes/update-custom-attribute-definition.md) |

## Troubleshooting

| Problem | Cause | Solution |
| - | - | - |
| A custom attribute has no delete option. | A custom attribute cannot be deleted. | Clear **Required** and the copy checkbox. |
| The custom attribute key or the custom attribute type is wrong. | Neither can change after you add the custom attribute. | Add a new custom attribute with a different name and a different key. |
| The key is rejected. | The key is reserved for Zenskar or is already in use. | Enter a different key. |
| The name is rejected. | Another custom attribute in the [organization](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#organization) has the same name, ignoring capitalization. | Enter a different name. |
| An existing record cannot be saved. | The record has no value for a required custom attribute without a default value. | Enter a value for the custom attribute. |
| A record does not show a custom attribute. | The custom attribute applies to another business entity. | See [Edit a custom attribute](https://zenskar.com/docs/20260301/zenskar-modules/settings/custom-attributes/how-to-guides.md#edit-a-custom-attribute). |
| An existing contract does not show a new value of its customer. | The copy happens once, when the record is created. | Change the value on the contract. |
| A new contract has no value for a customer attribute. | The customer has no value, or the customer attribute does not copy. | Enter a value on the contract, or select the copy checkbox. |
| A record that uses a removed option still shows it. | A record keeps an option after the option is removed. | Change the field to another option. |
| An existing record has no value for a required custom attribute after a sync. | A sync from a connector saves an existing record without the value when there is no default value. | Enter a value for the custom attribute. |
| An existing record has a default value that is wrong for it. | The record had no value when **Required** was selected. The record got the default value at its next save. | Change the value on the record. |
| A multi-select field with a removed option cannot be saved. | The field changed while it held the removed option. | Remove the removed option from the field. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.