Button Block Addon (buttonBlockAddon)
Last updated
Last updated
The purpose of this block is to display interactive buttons in documents source block (interfaceDocumentsSourceBlock).
As shown in the example below, buttonBlockAddon blocks should be placed inside interfaceDocumentsSourceBlock blocks.
Button Name (name)
The label (name) of the button as displayed to the user
"Approve", "Reject"
UI Class (uiClass)
The UI class of the button
βbtn-approveβ, βbtn-rejectβ, βbtn-linkβ
Dialog (dialog)
Determines if a dialog should be opened after the button is clicked
true, false.
Dialog Options (dialogOptions)
Will be shown only if the Dialog setting is set to true.
Dialog Title (dialogOptions.dialogTitle): The title of the dialog. Example: βRejectionβ.
Dialog Description (dialogOptions.dialogDescription): The description of the dialog. Example: βEnter reject reasonβ.
Dialog Result Field Path (dialogOptions.dialogResultFieldPath): The field which will contain the result value from the dialog. Example: βoption.commentβ.
Button block addon events will be automatically added to document source.
The API for the buttonBlockAddon features both GET and POST methods:
Example response to the GET request:
The response to the GET request includes all block settings.
Example payload for the POST request:
Where
documentId - selected document identifier.
dialogResult is used for the dialog only.