updateCustomerAttributeDefinition
Update or archive a customer attribute definition. Only the provided fields change.
Business Rules
- At least one field besides
idmust be provided. delete: truearchives the definition together with every value set on customers, andrestore: truebrings 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.
attributeTypeis fixed at creation and cannot be changed here.- The name and the handle stay unique within the company, archived definitions included.
useInFilters,showInCustomerListandfavoritecannot be set to null.
Error Scenarios
- **
BAD_REQUEST**: the definition does not belong to this company; no field was provided;deleteandrestorewere both set;restorewas 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_definitionpermission.
updateCustomerAttributeDefinition(
input: UpdateCustomerAttributeDefinitionInput!
): UpdateCustomerAttributeDefinitionPayload
Arguments
updateCustomerAttributeDefinition.input ● UpdateCustomerAttributeDefinitionInput! non-null input common
Parameters for UpdateCustomerAttributeDefinition
Type
UpdateCustomerAttributeDefinitionPayload object common
Autogenerated return type of UpdateCustomerAttributeDefinition.