create_customer
Add new customers to Shopmonkey by entering their contact details and address information for shop management.
Instructions
Create a new customer in Shopmonkey.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| firstName | No | Customer first name | |
| lastName | No | Customer last name | |
| No | Customer email address | ||
| phone | No | Customer phone number | |
| address | No | Street address | |
| city | No | City | |
| state | No | State | |
| zip | No | ZIP code |
Implementation Reference
- src/tools/customers.ts:98-102 (handler)The handler function that executes the POST request to create a customer.
async create_customer(args) { const body = pickFields(args, ALLOWED_FIELDS); const data = await shopmonkeyRequest<Customer>('POST', '/customer', body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/customers.ts:33-47 (schema)Definition and input schema for the create_customer tool.
name: 'create_customer', description: 'Create a new customer in Shopmonkey.', inputSchema: { type: 'object' as const, properties: { firstName: { type: 'string', description: 'Customer first name' }, lastName: { type: 'string', description: 'Customer last name' }, email: { type: 'string', description: 'Customer email address' }, phone: { type: 'string', description: 'Customer phone number' }, address: { type: 'string', description: 'Street address' }, city: { type: 'string', description: 'City' }, state: { type: 'string', description: 'State' }, zip: { type: 'string', description: 'ZIP code' }, }, },