update_customer
Modify customer details like name, contact information, and address to keep records current and accurate in the Shopmonkey system.
Instructions
Update an existing customer's information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The customer ID to update | |
| 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:104-109 (handler)The handler for the update_customer tool which updates a customer's information via a PATCH request.
async update_customer(args) { if (!args.id) return { content: [{ type: 'text', text: 'Error: id is required' }], isError: true }; const body = pickFields(args, ALLOWED_FIELDS); const data = await shopmonkeyRequest<Customer>('PATCH', `/customer/${sanitizePathParam(String(args.id))}`, body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/customers.ts:49-67 (schema)The schema definition for the update_customer tool.
{ name: 'update_customer', description: 'Update an existing customer\'s information.', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'The customer ID to update' }, 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' }, }, required: ['id'], }, },