Log a note

distru-mutate-noteWrite

Logs one note, call, meeting or email (noteType) on a record: a sales order, purchase order, invoice, company, assembly, batch, return or stock transfer.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
actionenum
CREATE
Yes
recordTypeenum
ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER
Yes
recordIdstringYesThe record's ID: resolve via distru-search-sales-orders, distru-search-purchase-orders, distru-search-invoices, distru-search-companies, distru-search-assemblies, distru-search-batches, distru-search-returns or distru-search-stock-transfers.
noteTypeenum
EMAILMEETINGNOTEPHONE
NoNOTE when omitted. PHONE, MEETING and EMAIL log a call, a meeting or an email.
textstringYesNot blank, at most 10,000 characters. Surrounding spaces are cut.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresenceDescription
noteobjectAlways
note.idstringAlways
note.noteTypeenum
EMAILMEETINGNOTEPHONE
Always
note.textstringAlways
note.userobjectCan be nullNull for syncs and jobs.
note.user.idstringCan be nullNull for Distru Support and another company's user, whose id no tool takes.
note.user.namestringAlways
note.user.companyNamestringCan be nullThe actor's company, when it isn't the record's (a buyer's user).
note.recordobjectAlwaysThe record the note is listed under: the one asked for, else where it was logged.
note.record.typeenum
ASSEMBLYBATCHCOMPANYINVOICESALES_ORDERPURCHASERETURNSTOCK_TRANSFER
Always
note.record.idstringAlways
note.loggedOnobjectCan be nullWhere the note was written, when not `record`: a linked invoice, payment, shipment, return or task.
note.loggedOn.typeenum
129 values
ACCOUNTASSEMBLYASSEMBLY_INPUTASSEMBLY_OUTPUTASSEMBLY_OUTPUT_BINAUTOMATIONAUTOMATION_RUN_ROLEAUTOMATION_VERSIONBATCHBILL_OF_MATERIALSBINCHARGECHARGE_PRESETCHARGE_PRESET_OWNER_TEAMCHARGE_PRESET_OWNER_USERCHARGE_PRESET_TAGCOMPANYCOMPANY_GROUPCOMPANY_SETTINGSCOMPLIANCE_DELIVERYCOMPLIANCE_TRANSFERCONTACTCOST_TYPECREDITCREDIT_USECUSTOM_FIELDCUSTOM_VALIDATIONDATASETDEFAULT_MENU_INTERNAL_ORDER_NOTIFICATIONS_RECIPIENTDRIVERHARVESTHARVEST_GROUPHARVEST_WASTEIMAGEINVITATIONINVOICEINVOICE_ITEMINVOICE_PAYMENTINVOICE_RECIPIENT_EMAILINVOICE_SIGNATURELABEL_TEMPLATELICENSELOCATIONMATERIAL_TEST_RESULTMCP_API_KEYMENUMENU_BANNER_IMAGEMENU_COLLECTIONMENU_COLLECTION_BRANDMENU_COLLECTION_IMAGEMENU_COLLECTION_OFFICIAL_PRODUCT_CATEGORYMENU_COLLECTION_PRODUCT_CATEGORYMENU_COLLECTION_PRODUCT_GROUPMENU_COLLECTION_PRODUCT_SUBCATEGORYMENU_COLLECTION_STRAINMENU_COLLECTION_STRAIN_TYPEMENU_HOLDERMENU_INTERNAL_ORDER_NOTIFICATIONS_RECIPIENTMENU_OFFICIAL_PRODUCT_CATEGORY_TO_SELL_BY_POTENCYMENU_PRICE_TIERMENU_PRODUCTMENU_URLOFFICIAL_PRODUCT_CATEGORYORDER_ITEMORDER_SHIPMENTORDER_SHIPMENT_ITEMORDER_SHIPMENT_SIGNATUREPACKAGEPACKAGE_BINPARTNERPARTNER_CONNECTIONPAYMENTPAYMENT_METHODPAYMENT_TERMPENDING_METRC_ITEMPLANTPLANT_ADDITIVEPLANT_ADDITIVE_TARGETPLANT_ADDITIVE_TYPEPLANT_GROUPPLANT_WASTEPLANT_WASTE_PLANTPRICE_TIERPRODUCTPRODUCT_CATEGORYPRODUCT_GROUPPRODUCT_SUBCATEGORYPRODUCT_TAGPROFILEPUBLIC_API_KEYPURCHASEPURCHASE_PAYMENTQB_ACCOUNTQB_AUTH_TOKENQB_CLASSQB_CUSTOMERQB_VENDORQUICKBOOKS_ITEMQUICKBOOKS_SETTINGSRECURRING_SCHEDULERELATIONSHIP_TYPEREQUESTRETURNRETURN_ITEMROLESALES_ORDERSCHEDULED_ALERTSCHEDULED_QB_EXPORTSCHEDULED_REPORTSIGNATURESTOCK_ADJUSTMENTSTOCK_TRANSFERSTOCK_TRANSFER_ITEMSTRAINTAGTASKTAXTAX_TAGTEAMTEAM_MEMBERSHIPTEARDOWNTEARDOWN_INPUTTEARDOWN_MAPPINGTEARDOWN_OUTPUTTEST_RESULTUNIT_TYPEUSERVEHICLEWEBHOOK_CONFIGURATION
Can be null
note.loggedOn.idstringCan be absent
note.loggedOn.namestringAlways
note.insertedAtstringAlways
note.updatedAtstringAlways
What the AI reads

Logs one note, call, meeting or email (noteType) on a record: a sales order, purchase order, invoice, company, assembly, batch, return or stock transfer. It is logged as the key's user and shows on the record's History tab in Distru. Needs the permission to view that record's history, not to edit the record. Create only: a note can't be changed or deleted through this tool. Returns the note as distru-search-notes lists it; read a record's notes back with distru-search-notes. Errors as not found when no record matches recordId (another company's included); a permission error if the caller can't view it.