create_mapping
Map CSV columns or constant values to Importer target fields for entities like Journal Entry, Bill, or Invoice. Returns the created mapping with its ID.
Instructions
Creates a new field mapping for an entity (e.g. 'Journal Entry', 'Bill', 'Invoice'). Look up valid target fields with get_fields first. Returns the created mapping including its id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"companyId": "<companyId>",
"title": "<title>",
"entityName": "<entityName>",
"fields": "<fields>"
},
"name": "create_mapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | Company id from list_companies. | |
| title | Yes | Human-readable mapping name. | |
| entityName | Yes | Entity this mapping targets — must match list_entities output (e.g. 'Journal Entry'). | |
| fields | Yes | Field mappings. Each entry maps a CSV column or a constant to an Importer target field. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Mapping id. | |
| title | Yes | Mapping name. | |
| entityName | Yes | Entity this mapping targets. | |
| fields | Yes | Persisted field entries. | |
| createdAt | No | ISO timestamp. | |
| updatedAt | No | ISO timestamp. |