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

Parameters: create_customer
NameTypeDescription
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

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "erpnext_write",
    "arguments": {
      "operation": "create_customer",
      "arguments": {
        "customer_name": "customer name"
      }
    }
  }
}

Example response

JSON

{
  "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
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.