Before you start
Before you start, sign in to the dashboard and select the organization you want to work in.- You need a published agent.
- You need the Admin or Member role. The Enable Bridge Events switch is read-only for other roles. See Roles and permissions.
- You need a mobile developer with a React Native, Swift, or Kotlin project. The snippet is code they paste into the app.
Turn on the bridge and copy the snippet
1
Open the Mobile App view
In the builder sidebar, select Distribute, then Mobile App under the Web group. The Mobile App Integration card opens.
2
Turn on Enable Bridge Events
The platform tabs, the snippet, and the Bridge Events Reference appear below the switch. The switch applies to this agent only.
3
Select the platform tab
The tabs are React Native, Swift/UIKit, and Kotlin/Android. React Native is selected first.
4
Copy the snippet
Select the copy button in the top right corner of the snippet. Your agent’s widget URL and region are already filled in.
5
Send the snippet to your mobile developer
Point them to the WebView bridge page for the full message contract and per-platform pages.
What the developer receives
Each snippet opens your agent’s widget URL in a WebView and handles the messages that flow between the app and the agent. The Bridge Events Reference below the snippet lists every message with its direction, and the Bridge events reference page documents each field. Your developer decides what the app does when the agent asks it to navigate, hands over captured data, or asks to close. Your job in the dashboard is to choose which gambits send those messages.Set a bridge event on a gambit
Bridge events fire when the conversation reaches the gambit inside a native app WebView. The Bridge Event section shows in the gambit editor only while Enable Bridge Events is on for the agent.1
Open the gambit in the builder
Select the gambit and expand the Bridge Event section in the gambit editor.
2
Select the Event Type
The options are None, Navigate, Send Data, and Close Agent.
3
If you selected Navigate, fill in the Route and Parameters
Route is the app screen to open, for example
/screen/detail. Select Add Parameter for each key and value the screen needs.{{response.VarName}}. The app can then open a screen for the item the end user picked.
The other event types need no fields:
- Send Data sends all captured conversation variables to the app when the gambit is reached.
- Close Agent tells the app to dismiss the agent screen.
- None removes the bridge event from the gambit.
