addCustomer
Create a new customer profile in the Mews hospitality platform by entering personal details, contact information, and demographic data.
Instructions
Create a new customer
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 | |
| BirthDate | No | Birth date (ISO 8601 format) | |
| BirthPlace | No | Place of birth | |
| CitizenshipCountryCode | No | ISO country code of citizenship | |
| GenderCode | No | Gender code | |
| LanguageCode | No | Preferred language ISO code | |
| NationalityCountryCode | No | ISO country code of nationality | |
| Occupation | No | Customer occupation | |
| Title | No | Customer title (Mr, Ms, etc.) | |
| SecondLastName | No | Second last name | |
| TaxIdentifier | No | Tax identification number | |
| LoyaltyCode | No | Loyalty program code |
Implementation Reference
- src/tools/customers/addCustomer.ts:29-37 (handler)The execute handler function for the 'addCustomer' tool. It calls the Mews API endpoint '/api/connector/v1/customers/add' with the provided arguments and returns the JSON-formatted result.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/customers/add', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- The inputSchema object defining the expected parameters for the addCustomer tool, including customer details like names, email, phone, birth info, etc.inputSchema: { type: 'object', properties: { FirstName: { type: 'string', description: 'Customer first name' }, LastName: { type: 'string', description: 'Customer last name' }, Email: { type: 'string', format: 'email', description: 'Customer email address' }, Phone: { type: 'string', description: 'Customer phone number' }, BirthDate: { type: 'string', description: 'Birth date (ISO 8601 format)' }, BirthPlace: { type: 'string', description: 'Place of birth' }, CitizenshipCountryCode: { type: 'string', description: 'ISO country code of citizenship' }, GenderCode: { type: 'string', description: 'Gender code' }, LanguageCode: { type: 'string', description: 'Preferred language ISO code' }, NationalityCountryCode: { type: 'string', description: 'ISO country code of nationality' }, Occupation: { type: 'string', description: 'Customer occupation' }, Title: { type: 'string', description: 'Customer title (Mr, Ms, etc.)' }, SecondLastName: { type: 'string', description: 'Second last name' }, TaxIdentifier: { type: 'string', description: 'Tax identification number' }, LoyaltyCode: { type: 'string', description: 'Loyalty program code' } } },
- src/tools/index.ts:93-97 (registration)Registration of the addCustomerTool in the allTools array alongside other customer tools.getAllCustomersTool, addCustomerTool, updateCustomersTool, deleteCustomersTool, mergeCustomersTool,
- src/tools/index.ts:9-9 (registration)Import statement that brings the addCustomerTool into the index for registration.import { addCustomerTool } from './customers/addCustomer.js';