Standard
You can get the standard HTML and JavaScript code by clicking on the “HTML & Javascript” button in the “Share” tab of your agent dialog. In this section, you can modify container dimensions. Below is an example:
See all possible settings
See all possible settings
Multiple agents
To display multiple agents on the same page, assign uniqueid
props to each:
Popup
Get the popup HTML and JavaScript code by clicking on the “HTML & Javascript” button in the “Share” tab of your agent dialog.
See all possible settings
See all possible settings
Bubble
Click the “HTML & Javascript” button in the “Share” tab of your agent dialog to integrate the bubble.
See all possible settings
See all possible settings
Custom button position
You can adjust the position of the button with custom CSS. For example:Commands
Here are the commands you can use to trigger your embedded agent:-
Agent.open()
: Open popup or bubble -
Agent.close()
: Close popup or bubble -
Agent.toggle()
: Toggle the bubble or popup open/close state, -
Agent.showPreviewMessage()
: Show preview message from the bubble, -
Agent.hidePreviewMessage()
: Hide preview message from the bubble, -
Agent.setPrefilledVariables(...)
: Set prefilled variables. Example:For more information, check out Additional configuration. -
Agent.setInputValue(...)
: Set the value in the currently displayed input.
For each command you can pass an optional
id
prop to target a specific agent. I.e. Agent.open({ id: 'my-bubble' })
Callbacks
If you need to trigger events on your parent website when the user interact with the agent, you can use the following callbacks:Additional configuration
You can prefill the agent variable values in your embed code by adding theprefilledVariables
option. Here is an example:
Current URL
variable with “https://release0.com” and the User name
variable with “John Doe”. More info about variables: here.
Note that if your site URL contains query params (i.e. https://r0.ar/myagent?User%20name=John%20Doe), the variables will automatically be injected to the agent. So you don’t need to manually transfer query params to the agent embed configuration.