Alokai

createCustomer

Create a customer.

It receives data from the createCustomer endpoint exposed by the BigCommerce API

Signature

declare function createCustomer(
	context: BigcommerceIntegrationContext,
	params: CreateCustomerParameters
): Promise<User>;

Parameters

NameRequiredTypeDescription
contextRequiredBigcommerceIntegrationContext
paramsRequiredCreateCustomerParameters

Returns

Returns a response with the User object.

Referenced Types

Examples

Registering a new customer account.

import { sdk } from '~/sdk.config.ts';

const createCustomerResponse = await sdk.bigcommerce.createCustomer({
  {
    "email": "email@account.com",
    "first_name": "test",
    "last_name": "test",
    "password": "y0u1pa55w$rd",
    "accepts_product_review_abandoned_cart_emails": true,
    "custom_fields": []
  }
});

On this page