Iframe sidebar allows you to provide agents with supportive information by embedding any relevant web page, such as an internal CRM or order lists of your customers, into the Ticket details view.
To integrate on the dashboard
Before starting integration, contact our Support to enable the feature. Once enabled, follow the instructions below on Sendbird Dashboard.
- Go to Settings > Integrations, and click Settings on Iframe sidebar.
- Fill out the information and Save.
Note: Secret key is automatically generated when you set up Iframe sidebar.
Operation process
The following steps further explain how Iframe sidebar operates after it is set up on your dashboard.
- Iframe sidebar is initialized using the Sendbird's internal URL. The internal URL is different from the URL registered when setting up the Iframe on your dashboard.
- Iframe sidebar requests HTML to the Desk server through Sendbird's internal URL.
- The Desk server sends an HTTP request to your server through the registered URL. At this point, Secret key and Token are also delivered to your server to verify the request being made.
- After the verification, an HTML response should be sent to the Desk server from your server.
- The Desk server proxies HTML to Iframe sidebar.
- The embedded website is displayed on the right sidebar of the Ticket details view.
You can find your secret key in Settings > Integrations > Iframe sidebar. It is used to verify if an HTTP request is sent from the Desk server, which is encrypted and used to generate a value of an x-hub-signature header for HTTP requests.
Note: Token is generated by the Desk server when there is a request from an agent who is authenticated on the Sendbird Dashboard. It is delivered from the Desk server to your server through
html_key
in the query parameter of the HTTP request, which can be used after the setup to verify if the request for data is sent from the Desk server. The token is valid only for 24 hours since its creation.
Transmitted data
When the Iframe sidebar is set, the following data types are delivered from the Desk server to your server in the form of the following URL. You can also utilize the transmitted data when requesting additional information using Platform API.
https://desk-api-{region}.sendbird.com/api/apps_iframes/{apps_iframe_id}/get_html?html_key={html_key}&agent_id={agent_id}&ticket_id={ticket_id}
Name | Description |
---|---|
html_key | A token consists of an agent's ID, which is valid only for 24 hours. The Desk server updates a token when an error occurs while using the existing token that has passed 24 hours from its creation. |
agent_id | The unique ID of an agent who requests HTML data to your server. |
ticket_id | The unique ID of a ticket, which is delivered only when a ticket is selected. This is optional. |
Note:
Apps_frame_id
is the unique identifier of the Iframe upon its creation. If you create a new Iframe after deletion, a different ID will be provided.
Iframe sidebar allows you to execute javascript on your website. Please note that the path of the images, CSS files, javascript files should be an absolute path, not a relative path.
-
Relative path
<script src="/image.png"></script>
<script src="/js/init.js"></script>
-
Absolute path
<script src="https://example.com/image.png"></script>
<script src="https://example.com/js/init.js"></script>