Przejdź do głównej zawartości

AttributeSelection

A configurator selection that the buyer filled in on a line item — typed snapshot taken at add-to-cart and frozen on the resulting order. Distinct from CartLine.attributes (free-form key/value line item properties): selections are validated against the product attribute definition, carry pricing surcharges and can link to a hidden component variant.

type AttributeSelection {
attributeDefinitionId: ID!
attributeName: String!
billingMode: AttributeBillingMode
fillingMode: AttributeFillingMode!
linkedVariantId: ID
optionId: ID
optionIds: [ID!] @deprecated
optionLabel: String
surchargeAmount: Int!
surchargeType: AttributeOptionSurchargeType
taxClassId: ID
textValue: String
type: AttributeType!
}

Fields

AttributeSelection.attributeDefinitionId ● ID! non-null scalar

ID of the attribute definition this selection refers to.

AttributeSelection.attributeName ● String! non-null scalar

Display name of the attribute at the moment it was added to the cart.

AttributeSelection.billingMode ● AttributeBillingMode enum

How the surcharge is charged: BUNDLED (folded into the line unit price) or SEPARATE_LINE (its own line on the order). Null when the selection is informational and has no surcharge.

AttributeSelection.fillingMode ● AttributeFillingMode! non-null enum

Who supplies the value: MERCHANT (set on the product), CUSTOMER (filled at add-to-cart) or BOTH.

AttributeSelection.linkedVariantId ● ID scalar

Linked variant whose stock is decremented when this option is chosen — used by the hidden-product configurator pattern (e.g. finish, accessory). Null when no component stock is tied to the selection.

AttributeSelection.optionId ● ID scalar

Selected option ID for single-choice types (SELECT, RADIO, single-CHECKBOX).

AttributeSelection.optionLabel ● String scalar

Display label of the selected option at the moment of selection.

AttributeSelection.surchargeAmount ● Int! non-null scalar

Surcharge attached to this selection in minor units of the shop currency when surchargeType is FIXED; thousandths of a percent (per mille of a percent) when PERCENT. Already reflected in the line cost.

AttributeSelection.surchargeType ● AttributeOptionSurchargeType enum

How the surcharge is calculated — FIXED (absolute amount) or PERCENT. Null when the selection has no surcharge.

AttributeSelection.taxClassId ● ID scalar

Tax class applied to this selection. Null means the line inherits its tax class from the variant.

AttributeSelection.textValue ● String scalar

Free-text value for TEXT, TEXTAREA, NUMBER or DATE attribute types.

AttributeSelection.type ● AttributeType! non-null enum

Attribute data type (TEXT, SELECT, RADIO, CHECKBOX, NUMBER, DATE, COLOR, etc.). Drives which value field is populated.

Show deprecatedHide deprecated

AttributeSelection.optionIds ● [ID!] deprecated list scalar

DEPRECATED

Always null. A line now carries one entry per chosen option — read optionId on each entry and treat repeated entries of the same field as the tick set. Scheduled for removal after 2026-10-08.

DEPRECATED — see deprecationReason.

Member Of

CartLine object