From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> =replaceNote= Clears all existing notes, and adds a new note to an interaction. If the ''interactionId'' isn't specified, the method will set the note for the cur...")
 
(No difference)

Latest revision as of 13:49, 16 September 2022

• 5.19

replaceNote

Clears all existing notes, and adds a new note to an interaction. If the interactionId isn't specified, the method will set the note for the currently active interaction.

Request

Syntax

replaceNote(note: string, interactionId?: string): Promise<OperationResult<null>>

Parameters

Parameter Parameter Values Data Type Optional/Required Description
note String Required The note you want to replace all other existing notes for the interaction.
interactionId String Optional The specific interaction ID for the interaction the replaced note applies to.

Example Request

    replaceNoteButton.onclick = () => {

        const note = noteInput.value

        const itemId = notesInteractionIdInput.value

        adApi.replaceNote(note, itemId)

    }

Return Value

null


< Previous | Next >