Get Note
What does it do?
Reads one note of the current chat by its ID. The note, or null when it does not exist, is stored under this node's name.
A missing note is not a failure by default: the node goes to on_complete with null. Set failIfEmpty: true to go to on_failure instead.
To read several notes, use listNotes.
1. Syntax
<node_name>:
type: func
func_type: chat
func_id: getNote
params:
noteId: "<note_id>"
failIfEmpty: true
on_complete: <next_node>
on_failure: <failure_node>
required params
typetype of the nodefunc_typehere it will be a chat functionfunc_idwhat function are we calling (getNote)params.noteIdID of a note in this chat. An ID of another chat's note, or one that is not a valid ID, counts as missingon_completenext node after the read
optional params
params.failIfEmptytrueto go toon_failurewhen the note does not exist. Defaults tofalse. Writetruewithout quotes: the string"true"is invalidon_failurenode for a missing note (withfailIfEmpty: true) or invalid paramsdepartmentassigns the chat to a departmentagentassigns the chat to a specific agent (email address or CRM ID as defined in the Texter agents manager)
2. Output
The note, or null, is stored at %state:node.<node_name>%. See the Overview for the fields.
%state:node.<name>.text%the note text%state:node.<name>.author.customName%the custom author name, if one was set
3. Examples
Read a saved note, skip ahead when it is gone
load_ticket_note:
type: func
func_type: chat
func_id: getNote
params:
noteId: "%chat:crmData.ticketNoteId%"
failIfEmpty: true
on_complete: show_ticket_status
on_failure: open_ticket_note
Here a deleted note sends the flow to open_ticket_note, which writes a new one.