Plugin Widgets Reference (V1)
Updated on October 4, 2021Widgets offer a wide range of possibilities for developers and companies wanting to provide new features straight in the Crisp app.
A widget can be configured through Crisp Marketplace by creating a Private or Public plugin, and then declaring the Widget Schema.
This reference contains the schema description for widgets.
iFrame Widget
Root
- Description: the root object of an iFrame Widget.
- Properties:
version: the version of the schema (required, current version is1.0)url: the URL to display as the iFrame Widget (required)
{
"version": "1.0",
"url": ""
}
Generic Widget
Root
- Description: the root object of a Generic Widget.
- Properties:
version: the version of the schema (required, current version is1.0)sections: (required)
{
"version": "1.0",
"sections": []
}
Section
- Description: a group of items.
- Properties:
id: the identifier of the section (required)title: the title of the section (required)condition: a condition to whether show or hide the section (read about conditions here)items: the items of the section (required)
{
"id": "",
"title": "",
"condition": "",
"items": []
}
Link Button Item
- Description: a button item that opens a link in a new tab.
- Properties:
id: the identifier of the item (required)type: the type of the item,buttonhere (required)condition: a condition to whether show or hide the item (read about conditions here)value:type: the sub-type of the button,linkhere (required)label: the label of the button (required)url: the link to open (required)color: the color of the button (defaults toblack)- Values
blackbluegreenorangeredpurple
- Values
data: the data to attach to the Button Event request, as query parameters (read about events here)
{
"id": "",
"type": "button",
"condition": "",
"value": {
"type": "link",
"label": "",
"url": "",
"color": "",
"data": {}
}
}
Modal Button Item
- Description: a button item that opens a link in a modal.
- Properties:
id: the identifier of the item (required)type: the type of the item,buttonhere (required)condition: a condition to whether show or hide the item (read about conditions here)value:type: the sub-type of the button,modalhere (required)label: the label of the button (required)url: the link to open (required)color: the color of the button (defaults toblack)- Values
blackbluegreenorangeredpurple
- Values
size: the size of the modal (defaults tonormal)- Values
normalmediumlargewide
- Values
controls: states which controls ("Open in new tab", "Close", "Minimize" and "Move" buttons) are shown bellow the modal (boolean or array, defaults totrue). When the "Close" control is hidden, the modal closure can be triggered via the widget JS SDK.- Boolean value: whether to show all controls or to show none
- Array value: the list of buttons to show
- Values
opencloseminimize(themovebutton will be automatically added when the modal is minimized)
- Values
data: the data to attach to the Button Event request, as query parameters (read about events here)
{
"id": "",
"type": "button",
"condition": "",
"value": {
"type": "modal",
"label": "",
"url": "",
"color": "",
"size": "",
"controls": true,
"data": {}
}
}
Hook Button Item
For this item, the plugin must have a configured action URL (Marketplace dashboard, Plugin area, Settings tab).
- Description: a button item that sends a request to the plugin's action URL.
- Properties:
id: the identifier of the item (required)type: the type of the item,buttonhere (required)condition: a condition to whether show or hide the item (read about conditions here)value:type: the sub-type of the button,hookhere (required)label: the label of the button (required)color: the color of the button (defaults toblack)- Values
blackbluegreenorangeredpurple
- Values
data: the data to attach to the Action Event request, as body payload (read about events here)
{
"id": "",
"type": "button",
"condition": "",
"value": {
"type": "hook",
"label": "",
"color": "",
"data": {}
}
}
Submit Button Item
For this item, the plugin must have a configured action URL (Marketplace dashboard, Plugin area, Settings tab).
- Description: a button item that sends a request to the plugin's action URL, with all the values of the data items having the same group identifier.
- Properties:
id: the identifier of the item (required)type: the type of the item,buttonhere (required)condition: a condition to whether show or hide the item (read about conditions here)value:type: the sub-type of the button,submithere (required)label: the label of the button (required)color: the color of the button (defaults toblack)- Values
blackbluegreenorangeredpurple
- Values
group: the group identifier (required)data: the data to attach to the Action Event request, as body payload (read about events here)
{
"id": "",
"type": "button",
"condition": "",
"value": {
"type": "submit",
"label": "",
"color": "",
"group": "",
"data": {}
}
}
Data Item
For this item, the plugin must have a configured action URL (Marketplace dashboard, Plugin area, Settings tab).
- Description: an item that displays data from internal source (ie. Crisp app) or external source (ie. backend, internal CRM, API).
- Properties:
id: the identifier of the item (required)type: the type of the item,datahere (required)condition: a condition to whether show or hide the item (read about conditions here)value:label: the label of the data (required)value: the data value (can be omitted, empty, static or dynamic)- If value is omitted (ie. no
value), then the item will display the placeholder. If the user enters some data, it will be forwarded to the plugin, via an Action Event request to the action URL (read about events here) - If value is empty (ie. an empty string
"value": ""), the data will be fetched by sending an Action Event request to your plugin's action URL (read about events here) - If value is static (eg. a literal string
"value": "abcde"), it will be displayed as is - If value is dynamic (eg. a data binding
"value": "{conversation.meta.data.order_id}"), it will be bound to Crisp data (read about data binding here)
- If value is omitted (ie. no
placeholder: the placeholder of the data. In case of a static or dynamic value, placeholder will be ignored.editable: whether to allow data edition or not (defaults totrue). In case of a static or dynamic value, editing will not be possible.immediate: whether to immediately fetch the data or not (ie. on conversation's load) (defaults totrue)group: the group identifier of the data (see Submit Button Item)data: the data to attach to the Action Event request, as body payload (read about events here)icon: the icon of the data (defaults toinfo)- Values
align_centeralign_justifyalign_leftalign_rightarrow_anglearrow_double_cleararrow_doublearrow_downarrow_leftarrow_repeatarrow_replyarrow_rightarrow_rotatearrow_shufflearrow_top_rightarrow_topat_boldatattachment_link_angleattachment_linkblock_circle_boldblock_circlebookbriefcasebuildingburger_descendingcalendar_datecards_shufflechart_squarechartcheck_circlecheck_doublecheck_squarecheckchevron_downchevron_leftchevron_rightchevron_upcircle_dashedclip_attachmentclock_arrowclockcloud_checkcloud_crosscloud_downloadcloud_uploadcloud_warningcloudcodecolor_palettecomputercopycredit_cardcross_circlecross_squarecrossdevicesdivider_horizontaldocument_clipdocument_copydocument_searchdoor_exitdots_menu_horizontaldots_menu_verticaldragduplicateemail_letter_pencilemail_lettererasereye_crosseye_visiblefalling_starfile_copyfile_editfile_text_solidfile_textfilefilter_sortflaggif_squaregiftglassesglobe_arrowglobegraduate_hatheartbeat_notificationhome_houseinfoinvoicekey_selectkeyboard_returnkeyboardlab_tubelabel_taglayersletterslight_bulb_offlight_bulb_onlist_bulletslockmagnifiermapmessage_bubble_round_emptymessage_bubble_roundmessage_bubble_squaremicrophone_unmutemicrophoneminus_circleminusmousemovie_clapperboardnotification_bellpaper_plane_sendpaper_planepaper_text_codepassword_keypause_circlepencilphone_endphonephoto_framepicture_in_picture_inpicture_in_picture_outpin_locationplay_circleplugins_blocksplus_circleplus_squareplusquestion_circlequestion_markscreen_zoom_enterscreen_zoom_exitsettings_cogsmiley_smilingsnippetspace_rocketsparkle_variantsparklesparklesstar_filledstarsuitcasetabletagtags_solidtarget_arrowsterminaltext_paragraph_lettertranslatetrash_bin_crosstrash_binuser_account_circleuser_account_squareuser_blockuser_checkuser_groupuser_profile_circleuser_profile_minususer_singlevideo_unmutevideowandwarning_circlewarning_trianglewifi_signal_circlewindow_frame_arrowwindow_frame_crosswindow_frame_resize_leftwindow_frame_resize_rightwindow_frame_searchwindow_frame_sidebarwindow_frame_simple_arrowwindow_frame
- Values
{
"id": "",
"type": "data",
"condition": "",
"value": {
"label": "",
"value": "",
"placeholder": "",
"editable": true,
"immediate": true,
"group": "",
"icon": ""
}
}