You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Box Embed is a HTML-based framework that allows embedding the entire
14
-
Box Web App experience in a custom-made application. Box Embed provides the ability to upload, search, comment, share, tag, and edit files using Box Edit.
14
+
Box Web App experience in a custom-made application. Box Embed provides the ability to upload, search, comment, share, tag, and edit files using Box Edit. You can also embed Box Hubs AI Chat for a focused chatbot experience.
15
15
16
16
## Before you start
17
17
18
18
To create a widget, you need to:
19
19
20
-
* Set an embeddable element, such as a **folder**, **file**, **Hub**, **note**, or **app** for sharing.
20
+
* Set an embeddable element, such as a folder, file, hub, note, or app for sharing.
21
21
* Have at least **Viewer**[permissions][5].
22
22
23
23
## Using web app
@@ -32,19 +32,23 @@ To fetch the Box Embed widget code from the Box web app, perform the following s
32
32
33
33
### Hubs
34
34
35
-
1. Navigate to the chosen Hub.
36
-
2. Click on the ellipsis menu in the top right corner.
35
+
1. Navigate to the chosen hub.
36
+
2. Click on the ellipsis menu in the upper-right corner.
37
37
3. Click **Embed Hub**.
38
38
39
+
<Messagetype='notice'>
40
+
You can also embed only the AI chat interface from a hub. Users can ask questions and get AI-powered answers based on the hub's files, without accessing navigation or file browsing features. For more information, see the [Box Hubs AI Chat embedding][6] section.
41
+
</Message>
42
+
39
43
### Notes
40
44
41
-
1. Navigate to the chosen Box Note.
45
+
1. Navigate to the chosen note.
42
46
2. Click on the ellipsis menu.
43
47
3. Click **Embed Box Note**.
44
48
45
49
### Apps
46
50
47
-
1. Navigate to the chosen Box App or Box App View.
51
+
1. Navigate to the chosen app or Box App View.
48
52
2. Click on the ellipsis menu.
49
53
3. Click **Embed**.
50
54
@@ -54,9 +58,14 @@ To fetch the Box Embed widget code from the Box web app, perform the following s
54
58
55
59
In the next step, configure the parameters of an embeddable element.
| Size of the widget.| Size of the widget, sorting of the files in a folder, hiding the navigation path and sidebar. | Size of the widget, hiding the parent navigation path and sidebar. | Size of the widget, skipping cloud game (results in note being in read only mode), hiding notes navigation. | Size of the widget. |
61
+
| Element Type | Configuration Options |
62
+
|--------------|----------------------|
63
+
| Files | Size of the widget. |
64
+
| Folders | Size of the widget, sorting of the files in a folder, hiding the navigation path and sidebar. |
65
+
| Hubs | Size of the widget, hiding the parent navigation path and sidebar. |
66
+
| Hubs AI Chat | Chat mode: button or widget. |
67
+
| Notes | Size of the widget, skipping cloud game (results in note being in read only mode), hiding notes navigation. |
|`hideHubsGallery`| Hide or show navigation chevron button to go back to Hubs gallery. Can be `true` or `false` (default). |
138
148
|`hideNavigationControls`| Hide or show navigation controls in Box Notes.|
139
149
|`showItemFeedActions`| Hide or show file comments or tasks. Can be `true` (default) or `false`. |
@@ -161,6 +171,133 @@ within an `<iframe>`:
161
171
*`oallowfullscreen`
162
172
*`msallowfullscreen`
163
173
174
+
## Box Hubs AI Chat embedding
175
+
176
+
In addition to embedding the complete Box Hub experience, you can embed only the AI-powered chat interface. This mode provides a focused chatbot experience powered by the files within a specific hub, without navigation or content browsing options.
177
+
178
+
### Prerequisites
179
+
180
+
To access a hub embedded in AI Chat mode:
181
+
182
+
* The enterprise that owns the hub must have Box AI for Hubs enabled.
183
+
* The user must be authenticated and have Box AI for Hubs enabled at their enterprise.
184
+
* The user needs at least Viewer [permissions][5] on the hub.
185
+
186
+
### Creating an AI Chat embed
187
+
188
+
1. Navigate to the hub that will serve as the knowledge source for the AI Chat.
189
+
2. Click the ellipsis menu in the upper-right corner.
190
+
3. Click **Embed Hub**.
191
+
4. Select the **Hub AI Chat** tab.
192
+
5. Select chat mode:
193
+
194
+
*[Chat button][7]
195
+
*[Chat widget][8]
196
+
197
+
6. Copy the embed code.
198
+
199
+
<Messagetype='notice'>
200
+
If you experience issues with the Box Hubs AI Chat embedding, regenerate the embed code to get the latest version of the script by repeating steps 1-6 above.
201
+
</Message>
202
+
203
+
### Chat button
204
+
205
+
In **Chat button** mode, the AI chat widget opens after the user clicks the button. It is generated as a Box-hosted `script` and displays a floating chat button on your page.
206
+
207
+

208
+
209
+
#### Chat button parameters
210
+
211
+
The **Chat button** mode supports the following parameters:
212
+
213
+
| Parameter | Required | Description |
214
+
|-----------|----------|-------------|
215
+
|`data-hub-id`| Yes | The ID of the hub that powers the chatbot. |
216
+
|`data-custom-box-domain`| No | For Box instances with custom domains. Default: `app.box.com`. Example: `mycompanydomain.app.box.com`. |
217
+
|`data-button-text`| No | Custom text to display on the chat button. Default: `Box AI`. This value is also used for the button's area label for accessibility. |
218
+
|`data-shared-link`| No | Optional shared link for hub access. If not provided, the chat loads only for users who are collaborators on the hub. |
219
+
220
+
The following example shows a fully configured chat button with all available parameters:
In **Chat widget** mode, the AI chat widget is embedded directly on page load. It is generated as an `iframe` and displays the full chat interface immediately.
235
+
236
+
<ImageFrameshadow>
237
+

238
+
</ImageFrame>
239
+
240
+
#### Chat widget parameters
241
+
242
+
In **Chat widget** mode, the AI chat widget is embedded directly on the page using an `iframe`. You can customize the behavior by adding URL parameters to the iframe's `src` attribute:
243
+
244
+
| Parameter | Description |
245
+
|-----------|-------------|
246
+
|`hubId`| The ID of the hub that powers the chatbot. |
247
+
|`sharedLink`| The shared link hash for hub access. If not provided, the chat loads only for users who are collaborators on the hub. |
248
+
|`showCloseButton`| Whether to show the [X (close) button][9] in the chat interface. When set to `true`, the close button is displayed. When a user clicks this button, Box generates an event that is sent to the parent web application, enabling you to implement custom closing logic based on the user interaction. |
249
+
250
+
The following example shows a fully configured chat widget with all available parameters:
When embedding the Box AI chat directly with `iframe` (without using the provided script), you can enable a close button within the chat interface that communicates with your parent application through `postMessage`.
269
+
270
+
##### Enabling the close button
271
+
272
+
To display a close button (✕) in the corner of the iframe, add the `showCloseButton=true` query parameter to your `iframe` URL as follows:
|`showDownload`| Shows the download button in the embedded header bar if the viewer has permissions to download the file. Document file types will also show a print button since print and download are governed by the same permissions. Defaults to `false`.|
371
+
|||
372
+
| --- | --- |
373
+
|`showDownload`| Shows the download button in the embedded header bar if the viewer has permissions to download the file. Document file types will also show a print button since print and download are governed by the same permissions. Defaults to `false`. |
237
374
|`showAnnotations`| Enables users with permission Preview and above to annotate document and image previews. Also shows annotations that are already on the document. To learn more about the file types that annotations is available on as well as the types of annotations, you can refer to our Annotations page. Annotations are available today on web browsers only. On mobile browsers, users will be able to view annotations but not create new ones. |
238
375
239
376
## Cloud game
@@ -278,3 +415,7 @@ and **print** options might not show in mobile browsers.
0 commit comments