import_impex
Import data into SAP Commerce Cloud using ImpEx format to manage products, orders, and system configurations through structured content.
Instructions
Import data using ImpEx format
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| impexContent | Yes | ImpEx content to import |
Implementation Reference
- src/hybris-client.ts:422-443 (handler)The core handler function that executes the Impex import by posting the impexContent to the HAC /console/impex/import endpoint using hacRequest.async importImpex(impexContent: string): Promise<ImpexResult> { const formData = new URLSearchParams({ scriptContent: impexContent, }); const result = await this.hacRequest<{ success: boolean; output: string; errors?: string[] }>( `${this.hacPrefix}/console/impex/import`, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: formData, } ); return { success: result.success, message: result.output, errors: result.errors, }; }
- src/index.ts:161-174 (registration)MCP tool registration defining the 'import_impex' tool, including its input schema.{ name: 'import_impex', description: 'Import data using ImpEx format', inputSchema: { type: 'object', properties: { impexContent: { type: 'string', description: 'ImpEx content to import', }, }, required: ['impexContent'], }, },
- src/hybris-client.ts:78-82 (schema)TypeScript interface defining the output structure of the importImpex function.export interface ImpexResult { success: boolean; message: string; errors?: string[]; }
- src/index.ts:335-337 (helper)Switch case in the MCP tool call handler that dispatches to the importImpex method.case 'import_impex': result = await hybrisClient.importImpex(args?.impexContent as string); break;