Estimates

Autocomplete suggestions for the line-item note field (ITE-573 + ITE-574): saved note templates merged with distinct notes previously used on estimate lines for the same catalog item. Saved entries carry `source: "saved"` + their `templateId`; history entries carry `source: "history"` + null. Serves the FE combobox (ITE-575). Saved-template candidacy: templates with an attachment to the line's item id, tag attachments whose Smart Tag is assigned to the line's item (service/inventory lines only — retail and billable items are not taggable), plus any-item templates (AppliesToAnyItem, offered on any keyed line); Clinic scope for everyone, Personal scope only for the owner. A history entry whose trimmed case-insensitive text equals a saved template's collapses INTO the saved entry (saved wins). Orphaned templates (item-specific, all items deleted) are never offered. The caller sends exactly one item-id param — whichever FK the line being authored keys on. `PrescriptionItemId` is deliberately NOT a keying param: Rx-created lines always carry `InventoryItemId` too, and a prescription item is a per-prescription governance record, not a reusable catalog identity. Ranking: q match quality (prefix beats substring) → recency → frequency. De-duped case-insensitively on trimmed text; blank or <3-char notes excluded. Always 200 with `[]` on no key / no match.

Changed on
get/Estimates/line-item-notes/suggestions

Request

Query parameters

serviceCatalogItemIdstring
inventoryItemIdstring
retailItemIdstring
billableItemIdstring
qstring
integer
OR
string int32

Response

OK

sourcestring

"history" (a note previously used on this item) or "saved" (ITE-574 template).

textstring
templateIdstring nullable

Saved-template id when string LineItemNoteSuggestionDto.Source is "saved"; always null for history.

Changes