Skip to main content
The Customers module stores contact information for the people and businesses you work with. Customer records are simple and flexible — you can capture as much or as little detail as you need.
All customer data is isolated to your business tenant. Customers you add are never visible to other organizations using Inventory Pro.

Customer data model

The Customer model in the database schema:
model Customer {
  id        String   @id @default(uuid())
  name      String
  email     String
  phone     String?
  address   String?
  tenantId  String
  tenant    Tenant   @relation(fields: [tenantId], references: [id], onDelete: Cascade)
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}
name and email are required. phone and address are optional.

Viewing customers

Navigate to Customers in the sidebar. The page shows all customer records in a table with columns for Name, Email, Phone, Address, and Actions. Customers are fetched from the API filtered by your tenantId:
const customers = await prisma.customer.findMany({
  where: { tenantId: req.tenantId },
})

Adding a customer

1

Open the add customer form

Click the Add Customer button in the top-right corner of the Customers page.
2

Enter the customer's name

Customer Name is required. Enter the full name of the person or business.
3

Enter the customer's email

Email is required. This serves as the primary contact address.
4

Add phone and address (optional)

Phone and Address are optional. Fill them in if you have the information available.
5

Save the customer

Click Save Customer. The backend creates the record scoped to your tenantId and the customer appears in the list.

Editing customer details

Click Edit in the Actions column of any customer row. Editing sends a PUT request to /api/customers/:id with the updated fields:
router.put("/:id", async (req: Request, res: Response) => {
  const { id } = req.params
  const { name, email, phone, address } = req.body

  const customer = await prisma.customer.update({
    where: { id },
    data: { name, email, phone, address },
  })
  res.json(customer)
})

Deleting a customer

Click Delete in the Actions column. This sends a DELETE request to /api/customers/:id and permanently removes the customer record.

API reference

MethodEndpointDescription
GET/api/customersList all customers for your tenant
POST/api/customersCreate a new customer
PUT/api/customers/:idUpdate an existing customer
DELETE/api/customers/:idDelete a customer
All endpoints require a valid JWT in the Authorization: Bearer <token> header.
Keep customer records up to date — accurate contact information and addresses are essential for sales reporting, invoicing, and outreach.

Build docs developers (and LLMs) love