customerRegister
Create a new customer account with login credentials and authentication setup.
Key Features
- Customer Creation: Creates a new customer with complete profile information
- Account Setup: Automatically creates login credentials for the customer
- Authentication Ready: Customer can immediately log in to the system
- Password Management: Supports custom password or automatic password generation
Business Rules
- Email address must be unique across all customers and users
- Password must meet security requirements (minimum 8 characters)
- Customer profile validation follows standard customer creation rules
- Login credentials are created automatically if not provided
Validation Rules
- email: Required field, valid email format, maximum 150 characters, HTML tags removed
- password: Optional, minimum 8 characters if provided
- All standard customer validation rules apply (firstName, lastName, field lengths, etc.)
Error Scenarios
- CUSTOMER_ALREADY_EXISTS_ERROR: Customer with the same email already exists
- CUSTOMER_REGISTER_ERROR: System error occurred during customer registration
- EMAIL_ALREADY_IN_USE_ERROR: Email address is already in use by another user
- CUSTOMER_CREATE_ERROR: Error occurred during customer profile creation
Use Cases
- Customer self-registration
- Administrative customer onboarding with login access
- Customer account creation with immediate system access
- Integration with external authentication systems
AUTH: Role=[user.OWNER]
customerRegister(
input: RegisterCustomerInput!
): RegisterCustomerResponse!
Arguments
customerRegister.input ● RegisterCustomerInput! non-null input
Customer registration data including login credentials for account creation