customerCreate
Create a new customer account with complete validation and business rule enforcement.
Key Features
- Complete Validation: Validates all customer data including email format, field lengths, and business rules
- Unique Constraints: Ensures email and debtor ID uniqueness across the system
- Source Tracking: Supports external system integration with source identification
- Address Management: Allows creation of multiple addresses during customer setup
Business Rules
- Email address must be unique across all customers
- Debtor ID must be unique if provided
- First name and last name are required fields
- Email format validation is enforced
- Field length limits are enforced (firstName: 30 chars, lastName: 50 chars, etc.)
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_ALREADY_EXISTS_ERROR: Customer with the same email or debtor ID already exists
- CUSTOMER_CREATE_ERROR: System error occurred during customer creation
- CUSTOMER_BULK_VALIDATION_ERROR: Validation errors in customer data
Use Cases
- New customer onboarding
- Customer data import from external systems
- Administrative customer creation
- Customer account setup without login credentials
Note: For customers that need login access, use customerRegister instead.
AUTH: Role=[user.OWNER]
customerCreate(
input: CustomerInput!
): Customer!
Arguments
customerCreate.input ● CustomerInput! non-null input
Complete customer creation data with validation and business rules
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.