# Customer notes tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Customer notes

### add_customer_note

Add a staff note to a customer's page (get_customer shows them, newest first): staff's own words, never shown to the guest, and included when the guest asks for their data (export_customer_data). Needs bookings:write and customers:contact where you reach the customer: someone limited to a location, entity, or product reaches them only through a booking they're covered for. A person writes notes: agents (the assistant included) can't add or rewrite one, since its text is never kept with the change. Its author, or an owner or admin, can change it (update_customer_note) or remove it (remove_customer_note). Undo takes it away while it's unchanged. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write, customers:contact

#### Input

- `customerId` — string; required. The customer's id, from list_customers
- `body` — string or null; required. The note, 1 to 2,000 characters. Staff's own words: never shown to the guest, and included when the guest asks for their data minLength: 1; maxLength: 2000

#### Output

- `note` — object; required. 
  - `note.id` — string; required. The customer note's id, from get_customer
  - `note.body` — string; required. 
  - `note.author` — object or null; required. Who wrote it; null when no member is recorded
    - `note.author.name` — string; required. 
  - `note.createdAt` — string; required.  format: "date-time"
  - `note.updatedAt` — string; required.  format: "date-time"
  - `note.canEdit` — boolean; required. Whether you may change or remove it: its author may, and so may someone with customers:privacy across the organization

### remove_customer_note

Remove a staff note from a customer's page for good (its id from get_customer's notes). Only its author, or someone with customers:privacy across the organization (owner and admin), may. Needs bookings:write and customers:contact where you reach the customer, as add_customer_note does. A person does this: agents can't remove a note. Undo puts it back as it was. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write, customers:contact

#### Input

- `noteId` — string; required. The customer note's id, from get_customer

#### Output

- `noteId` — string; required. The customer note's id, from get_customer
- `removed` — boolean; required.  Value: true

### update_customer_note

Change the text of a staff note on a customer's page (its id from get_customer's notes). Only its author, or someone with customers:privacy across the organization (owner and admin), may; anyone else who can see it is refused. Needs bookings:write and customers:contact where you reach the customer, as add_customer_note does. A person does this: agents can't rewrite a note. Undo puts the earlier text back while it's unchanged. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write, customers:contact

#### Input

- `noteId` — string; required. The customer note's id, from get_customer
- `body` — string or null; required. The note, 1 to 2,000 characters. Staff's own words: never shown to the guest, and included when the guest asks for their data minLength: 1; maxLength: 2000

#### Output

- `note` — object; required. 
  - `note.id` — string; required. The customer note's id, from get_customer
  - `note.body` — string; required. 
  - `note.author` — object or null; required. Who wrote it; null when no member is recorded
    - `note.author.name` — string; required. 
  - `note.createdAt` — string; required.  format: "date-time"
  - `note.updatedAt` — string; required.  format: "date-time"
  - `note.canEdit` — boolean; required. Whether you may change or remove it: its author may, and so may someone with customers:privacy across the organization
