customerUpdate
Update an existing customer's information with partial or complete data modification.
Key Features
- Partial Updates: Update only the fields provided in the input, leaving others unchanged
- Validation Enforcement: All updated fields are validated according to business rules
- Unique Constraints: Ensures email and debtor ID uniqueness if being updated
- Data Integrity: Maintains referential integrity and data consistency
Business Rules
- Customer must exist before update
- Email uniqueness is enforced if email is being updated
- Debtor ID uniqueness is enforced if debtor ID is being updated
- Only provided fields are updated, others remain unchanged
- Field length limits apply to updated fields
Validation Rules
- firstName: Maximum 30 characters, HTML tags removed
- lastName: Maximum 50 characters, HTML tags removed
- middleName: Maximum 20 characters, HTML tags removed
- email: Valid email format, maximum 150 characters, HTML tags removed
- phone/mobile: Maximum 30 characters, HTML tags removed
- debtorId: Maximum 30 characters
- primaryLanguage: Exactly 2 characters (ISO language code)
- dateOfBirth: Valid date string in YYYY-MM-DD format
Error Scenarios
- CUSTOMER_NOT_FOUND_ERROR: Customer with the specified ID does not exist
- CUSTOMER_UPDATE_ERROR: System error occurred during customer update
- CUSTOMER_ALREADY_EXISTS_ERROR: Updated email or debtor ID conflicts with existing customer
- CUSTOMER_BULK_VALIDATION_ERROR: Validation errors in updated customer data
Use Cases
- Customer profile updates
- Data correction and maintenance
- Customer information synchronization
- Administrative customer management
AUTH: Role=[user.OWNER,user.EDITOR] OR (('user is authenticated') AND ('customerId if present in input matches JWT'))
customerUpdate(
id: Int!
input: UpdateCustomerInput!
): Customer!
Arguments
customerUpdate.id ● Int! non-null scalar
Unique internal identifier for the customer used for system operations and data relationships
customerUpdate.input ● UpdateCustomerInput! non-null input
Partial customer data to update - only provided fields will be modified
Type
Customer object
Customer entity representing individual customers and end users.
External entity from the customer service that provides customer identification and profile information. Used as a reference for customer-specific attributes and personalization features within the attribute system.