Skip to main content

updateCustomerAttributeDefinition

Update or archive a customer attribute definition. Only the provided fields change.

Business Rules​

  • At least one field besides id must be provided.
  • delete: true archives the definition together with every value set on customers, and restore: true brings both back. The two cannot be combined.
  • A name and a handle stay reserved while the definition they belong to is archived, so a deleted definition is restored rather than recreated.
  • attributeType is fixed at creation and cannot be changed here.
  • The name and the handle stay unique within the company, archived definitions included.
  • useInFilters, showInCustomerList and favorite cannot be set to null.

Error Scenarios​

  • **BAD_REQUEST**: the definition does not belong to this company; no field was provided; delete and restore were both set; restore was asked for a definition that is not archived, or whose name or handle is now held by another one; the name is blank, already used, or held by an archived definition; the handle is malformed, too long, or already used; or one of the boolean flags was set to null.

Permissions Required​

  • customers:update_attribute_definition permission.
updateCustomerAttributeDefinition(
input: UpdateCustomerAttributeDefinitionInput!
): UpdateCustomerAttributeDefinitionPayload

Arguments​

updateCustomerAttributeDefinition.input ● UpdateCustomerAttributeDefinitionInput! non-null input common​

Parameters for UpdateCustomerAttributeDefinition

Type​

UpdateCustomerAttributeDefinitionPayload object common​

Autogenerated return type of UpdateCustomerAttributeDefinition.