Skip to main content

attributeCreate

Create a new attribute with typed values and complete configuration.

Establishes a new attribute instance with proper type definition and entity association. The attribute is immediately available and properly validated according to its attribute description's specifications.

The creation process includes:

  • Validation against the attribute description's type
  • Proper entity association (product, category, cluster, company, contact, or customer)
  • Value type validation and formatting
  • Metadata and tracking information setup

The newly created attribute is fully functional and can be used immediately for data storage, retrieval, and business logic operations.

Possible errors:

  • ATTRIBUTE_CREATE: Failed to create the attribute due to system error
  • ATTRIBUTE_VALIDATION_ERROR: Attribute data validation failed against description rules
  • ATTRIBUTE_ALREADY_EXISTS: Attribute with the same description already exists for this entity
  • ATTRIBUTE_DESCRIPTION_NOT_FOUND: Referenced attribute description does not exist
  • FORBIDDEN: Insufficient permissions

AUTH: Role=[product.OWNER,product.EDITOR,user.OWNER,user.EDITOR]

attributeCreate(
input: AttributeCreateInput!
): Attribute!

Arguments​

attributeCreate.input ● AttributeCreateInput! non-null input​

Complete attribute creation data including values, entity association, and configuration.

Contains all necessary information to create a functional attribute including:

  • Attribute description reference for type
  • Typed value data matching the description's specifications
  • Entity association (exactly one of: productId, categoryId, clusterId, companyId, contactId, customerId)
  • Metadata and tracking information

Type​

Attribute interface​

Base interface for all attribute types across different entity classes.

Attributes provide extensible metadata and properties for various entities in the system. Each attribute is associated with a specific entity type and contains typed values based on its attribute description schema.