Skip to main content

customerCreateAccount

Create login credentials for an existing customer who doesn't have an account.

Key Features

  • Account Creation: Creates login credentials for existing customer
  • Password Management: Supports custom password or automatic password generation
  • Authentication Setup: Customer can immediately log in to the system
  • Email Integration: Uses customer's existing email address for login

Business Rules

  • Customer must exist and not already have login credentials
  • Customer's email address is used as the login identifier
  • Password must meet security requirements if provided
  • Login credentials are created automatically if not specified

Validation Rules

  • password: Optional, minimum 8 characters if provided
  • Customer must have a valid email address
  • Customer must not already have login credentials

Error Scenarios

  • CUSTOMER_NOT_FOUND_ERROR: Customer with the specified ID does not exist
  • CUSTOMER_CREATE_ACCOUNT_ERROR: System error occurred during account creation
  • CUSTOMER_ACCOUNT_ALREADY_EXISTS_ERROR: Customer already has login credentials
  • EMAIL_ALREADY_IN_USE_ERROR: Customer's email is already in use by another user

Use Cases

  • Adding login access to existing customers
  • Customer account activation
  • Administrative account setup
  • Integration with authentication systems

AUTH: Role=[user.OWNER]

customerCreateAccount(
id: Int!
input: CreateAccountInput
): RegisterCustomerResponse!

Arguments

customerCreateAccount.id ● Int! non-null scalar

Unique internal identifier for the customer used for system operations and data relationships

customerCreateAccount.input ● CreateAccountInput input

Optional account creation data including password

Type

RegisterCustomerResponse object