Customer Management
View and manage customer profiles, groups, and order history
The customer management section of the admin dashboard gives you a complete view of your customer base, including profiles, order history, groups, and communication tools.
Customer List
The customer list displays all registered customers with:
- Name, email, and registration date
- Total orders and lifetime spend
- Customer group membership
- Account status (active, disabled)
- Quick search by name or email
const customers = await sdk.admin.customer.list({
limit: 50,
offset: 0,
sort: '-createdAt',
q: 'search term',
})Filtering
| Filter | Options |
|---|---|
| Status | Active, Disabled |
| Group | Any customer group |
| Registration date | Date range picker |
| Order count | Min / Max orders |
| Lifetime spend | Min / Max amount |
Customer Profile
Click any customer to view their full profile:
Overview
- Contact information -- name, email, phone number
- Account status -- active or disabled
- Registration date -- when the account was created
- Last login -- most recent authentication timestamp
- Lifetime metrics -- total orders, total spend, average order value
Order History
A chronological list of all orders placed by this customer:
const orders = await sdk.admin.order.list({
customerId: 'cust_abc123',
sort: '-createdAt',
limit: 20,
})Each order entry shows the order number, date, status, and total. Click any order to navigate to the full order detail view.
Addresses
Customers can store multiple addresses. The admin can view, edit, and manage them:
// List customer addresses
const addresses = await sdk.admin.customer.listAddresses('cust_abc123')
// Add a new address
await sdk.admin.customer.addAddress('cust_abc123', {
firstName: 'Jane',
lastName: 'Doe',
line1: '456 Oak Ave',
city: 'Portland',
state: 'OR',
postalCode: '97201',
country: 'US',
isDefault: true,
})
// Update an existing address
await sdk.admin.customer.updateAddress('cust_abc123', 'addr_001', {
line1: '789 Pine St',
})
// Delete an address
await sdk.admin.customer.deleteAddress('cust_abc123', 'addr_001')Customer Notes
Add internal notes to a customer profile for team reference:
await sdk.admin.customer.addNote('cust_abc123', {
text: 'VIP customer - always expedite shipping.',
author: 'admin_user_id',
})
const notes = await sdk.admin.customer.listNotes('cust_abc123')Notes are visible only to admin team members and are not shown to the customer.
Customer Groups
Customer groups let you segment your customer base for pricing, promotions, and reporting.
Creating Groups
await sdk.admin.customerGroup.create({
name: 'Wholesale',
description: 'Approved wholesale buyers with volume pricing',
})
await sdk.admin.customerGroup.create({
name: 'VIP',
description: 'High-value customers with priority support',
})Managing Membership
// Add customers to a group
await sdk.admin.customerGroup.addCustomers('group_wholesale', {
customerIds: ['cust_abc123', 'cust_def456'],
})
// Remove a customer from a group
await sdk.admin.customerGroup.removeCustomer('group_wholesale', 'cust_abc123')
// List customers in a group
const members = await sdk.admin.customerGroup.listCustomers('group_wholesale', {
limit: 50,
})Group-Based Pricing
Link customer groups to pricing rules for automatic discounts:
await sdk.admin.pricing.createRule({
type: 'customer_group',
customerGroupId: 'group_wholesale',
discount: {
type: 'percentage',
value: 20, // 20% off for wholesale customers
},
})Editing Customers
Update customer details from the profile page:
await sdk.admin.customer.update('cust_abc123', {
firstName: 'Jane',
lastName: 'Doe',
phone: '+1-555-0123',
metadata: {
preferredLanguage: 'en',
referralSource: 'partner',
},
})Disabling Accounts
Disable a customer account to prevent login and new orders:
await sdk.admin.customer.update('cust_abc123', {
status: 'disabled',
})Disabling an account does not cancel existing orders or remove customer data. The customer can be re-enabled at any time.
How is this guide?
Last updated on