Skip to navigation

write_customer

Create and manage customers and their contacts

Live server: on mcp.solvimon.com only the draft actions are available, see Access modes.

Creates and manages customers and their contacts. Types: ORGANIZATION (B2B) and INDIVIDUAL (B2C). Country drives tax calculation and is set inside the address: organization.registered_address.country or individual.residential_address.country. One organization can be the parent of several child customers for consolidated billing.

Actions: create, update, upsert, delete, activate, deprecate, archive. With resource_type: contacts: create, update, delete.

On live: create (always DRAFT) and update while the customer is DRAFT.

  • DRAFT by default. A create without status makes a DRAFT customer. You can quote a DRAFT customer, but it must be activated before the quote converts to a subscription.
  • Custom fields merge on update, so setting one field keeps the others. Pass custom_fields_mode: replace to replace the list.
  • type can be switched if the new sub-object is sent in the same update. timezone can change only while the customer has no DRAFT or ACTIVE subscription.
  • Changing a customer’s parents regroups it and reprocesses its invoices. The result warns you.
  • Archive, delete and role changes are checked against the backend’s rules before anything is sent, and refused with the reason.
  • A contact create asks whether the contact receives invoices by email. Deleting a contact is confirm-first and warns when nobody would be left receiving invoices.
Create a customer
{
"action": "create",
"body": {
"type": "ORGANIZATION",
"reference": "acme-001",
"timezone": "Europe/Amsterdam",
"organization": {
"legal_name": "Acme Corp",
"registered_address": {
"country": "NL",
"city": "Amsterdam",
"line1": "Keizersgracht 1",
"postal_code": "1015CJ"
}
}
}
}

A customer has no billing_entity_id or country_code field. The API rejects both.

Example prompts

  • “Create a draft customer for Acme Inc., Keizersgracht 1, 1015 CJ Amsterdam, invoices to billing@acme.com.”
  • “Change Acme Inc.’s invoice email to finance@acme.com.”
  • “Add Jane Doe (jane@example.com) as a contact at Acme Inc. who receives invoices.”
  • “The contract is signed: activate Acme Inc.”
  • “Make Acme Holding the parent of Acme Inc. so their invoices are consolidated.”

Example output

Prompt: “Create a draft customer for Docs Example B.V., Voorbeeldstraat 1, 3511 AA Utrecht, invoices to docs-example@example.com.”

Tool call:

{
"action": "create",
"body": {
"type": "ORGANIZATION",
"reference": "docs-example-customers",
"email": "docs-example@example.com",
"locale": "en-US",
"timezone": "Europe/Amsterdam",
"organization": {
"legal_name": "Docs Example B.V.",
"registered_address": {
"line1": "Voorbeeldstraat 1",
"city": "Utrecht",
"postal_code": "3511 AA",
"country": "NL"
}
}
}
}

Response (trimmed):

{
"object_type": "CUSTOMER",
"id": "cust_BwDpzo0vA1cb03CA8t1f",
"reference": "docs-example-customers",
"status": "DRAFT",
"type": "ORGANIZATION",
"email": "docs-example@example.com",
"timezone": "Europe/Amsterdam",
"organization": {
"legal_name": "Docs Example B.V.",
"registered_address": {"line1": "Voorbeeldstraat 1", "city": "Utrecht", "postal_code": "3511 AA", "country": "NL"}
}
}

Claude’s answer: Docs Example B.V. is created as a DRAFT customer with reference docs-example-customers, registered in the Netherlands. You can quote it now; activate it before the quote converts to a subscription.