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.