Create customer
Creates a customer with type, group and territory.
MCP tool erpnext_write → create_customer
write
Creates a Customer and returns its ID. ERPNext asks for the Customer Name, Customer Type, Customer Group and Territory on the form; pass the ones your site needs, and the call returns ERPNext's own error if a required one is missing. Address and contact are added in ERPNext under Address & Contact. It reaches no one and can be deleted again, so it does not ask for confirmation.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_name string required | string | Customer Name as it should appear on invoices. |
| customer_type string | string | Company, Individual or Partnership. |
| customer_group string | string | Customer Group name from your site. |
| territory string | string | Territory name from your site. |
| billing_currency string | string | Currency code, for example USD. Sets the default currency of new documents. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "erpnext_write",
"arguments": {
"operation": "create_customer",
"arguments": {
"customer_name": "customer name"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"customer": "Harbor & Pine",
"customer_name": "Harbor & Pine",
"customer_type": "Company",
"customer_group": "Commercial",
"territory": "United States",
"created": true
},
"isError": false
}