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

# CreateFunctionAttributeCommandRequestInput

> Creates a function attribute in a group. Function attributes steer online shops and interfaces and are not shown to customers. The group is created together with its first attribute. Errors: errorCode is ATTRIBUTE_NAME_REQUIRED (the name is missing or empty), ATTRIBUTE_NAME_INVALID (the name contains '#'), ATTRIBUTE_CODE_REQUIRED (the code is missing or empty), ATTRIBUTE_GROUP_NAME_INVALID (the group name is empty, longer than 150 characters or contains '#'), ATTRIBUTE_ALLOWED_VALUES_REQUIRED (data type 'VALUE_LIST' without values), ATTRIBUTE_ALLOWED_VALUES_NOT_SUPPORTED (values given for another data type), ATTRIBUTE_ALLOWED_VALUES_INVALID (an entry is empty, repeated or contains '|'), ATTRIBUTE_SALES_CHANNEL_NOT_SUPPORTED (a sales channel is not an online shop); ATTRIBUTE_NAME_ALREADY_EXISTS (another attribute or function attribute of the entity type has this name, regardless of upper and lower case), ATTRIBUTE_CODE_ALREADY_EXISTS (another function attribute of the entity type has this code). - Request



**Kind**: `input`

## Fields

**`entityType`**: `String!` (required)

The kind of record the attribute can be assigned to. It cannot be changed afterwards. Known values: ITEM, CATEGORY. The set can grow; a client must tolerate values it does not know.

---

**`groupName`**: `String!` (required)

The name of the group the attribute is displayed under. A name that matches an existing group of the same entity type apart from letter case uses the existing spelling. It must not contain the character '#'.

---

**`code`**: `String!` (required)

The technical identifier by which online shops, plug-ins and interfaces recognise the function attribute. It must be unique among the function attributes of the entity type; upper and lower case are distinguished.

---

**`name`**: `String!` (required)

The name of the function attribute. It must not contain the character '#'. It is not translated.

---

**`dataType`**: `String`

The data type. Known values: INTEGER, DECIMAL, TEXT, CHECKBOX, VALUE_LIST, URL, EMAIL, PHONE, COUNTRY_ISO, PRICE, DATE, SHORT_TEXT. The set can grow; a client must tolerate values it does not know. Defaults to 'TEXT'. It cannot be changed afterwards.

---

**`allowedValues`**: `[FunctionAttributeAllowedValueInput]`

The allowed values in the order they are offered. Required, with at least one entry, for data type 'VALUE_LIST'; not allowed for other data types. A 'renamedFrom' is not allowed when creating.

---

**`description`**: `String`

An internal description of the function attribute for staff.

---

**`sortOrder`**: `Int`

The position within the group, starting at 1. Defaults to the end of the group; a larger value also places the attribute at the end.

---

**`activeSalesChannels`**: `[AttributeSalesChannelInput]`

The online shops the function attribute is transferred to. Defaults to none.

---

**`idempotencyKey`**: `String`

Client-supplied idempotency key. When provided, a repeated request with the same key and payload replays the original result instead of re-executing the mutation.

