客戶

這一頁從系統實際的 tool 產生。授權項目是權杖要勾的項目;「核可」是 Agent 呼叫之後要不要等人在網站上核可。

customer_create

寫入核可:不用

新增客戶;客戶編號相同的訂單和報價單會連到這位客戶。

給 Agent 的原文

Create a customer. Orders and quotes whose customer number matches are linked to it. A taken number returns CUSTOMER_NUMBER_TAKEN.

參數

名稱型別必填說明
numberstring必填Unique in the workspace (case-sensitive); usually the id in your own CRM
namestring必填
titlestringLegal name used on bills and e-invoices
tax_idstring8 digits, or empty
addressstring
primary_emailstring
cc_emailsstring[]
phonestring
notestring
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:customers:manage

customer_get

核可:不用

用編號或 id 查一位客戶,附 version(customer_update 要用)。

給 Agent 的原文

Get one customer by number or id, with its version (needed by customer_update).

參數

名稱型別必填說明
customerstring必填Customer number (exact match) or id

授權項目:customers:read

核可:不用

用編號、名稱、抬頭或統一編號找客戶,照編號排序;回摘要,要一位的完整資料用 customer_get。

給 Agent 的原文

Search customers by number, name, title or tax ID, ordered by number. Returns summaries; use customer_get for one customer.

參數

名稱型別必填說明
keywordstringPart of the customer number, name, title or tax ID; an email or phone needs pii:read
limitintegerdefault: 20
cursorstring(可以是 null)

授權項目:customers:read;keyword 像 Email 或電話時,另外要 pii:read。

customer_update

寫入核可:不用

整份換掉客戶的資料;已經成立的訂單和請款單維持當時的資料。

給 Agent 的原文

Replace a customer's fields. Orders and bills already created keep the details they were created with.

參數

名稱型別必填說明
numberstring必填Unique in the workspace (case-sensitive); usually the id in your own CRM
namestring必填
titlestringLegal name used on bills and e-invoices
tax_idstring8 digits, or empty
addressstring
primary_emailstring
cc_emailsstring[]
phonestring
notestring
customerstring必填Customer number (exact match) or id
versioninteger必填The version from customer_get; a different one returns CONCURRENT_MODIFICATION
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:customers:manage、pii:read