mergeCustomers
Merge two customer profiles in the Mews hospitality platform by transferring data from a source customer ID to a target customer ID.
Instructions
Merges two customers together
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| SourceCustomerId | Yes | ID of customer to merge from | |
| TargetCustomerId | Yes | ID of customer to merge into |
Implementation Reference
- The execute handler function that implements the core logic of the mergeCustomers tool by making an HTTP request to the Mews API endpoint '/api/connector/v1/customers/merge'.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/customers/merge', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the required parameters SourceCustomerId and TargetCustomerId for the mergeCustomers tool.inputSchema: { type: 'object', properties: { SourceCustomerId: { type: 'string', description: 'ID of customer to merge from' }, TargetCustomerId: { type: 'string', description: 'ID of customer to merge into' } }, required: ['SourceCustomerId', 'TargetCustomerId'], additionalProperties: false },
- src/tools/index.ts:97-97 (registration)Registration of the mergeCustomersTool in the allTools array, making it available for execution.mergeCustomersTool,
- src/tools/index.ts:12-12 (registration)Import of the mergeCustomersTool from its implementation file.import { mergeCustomersTool } from './customers/mergeCustomers.js';