2023-05-17 10:00:25 +02:00
|
|
|
# Commands
|
|
|
|
|
|
|
|
|
|
Here are the commands you can use to trigger your embedded typebot:
|
|
|
|
|
|
|
|
|
|
- `Typebot.open()`: Open popup or bubble
|
|
|
|
|
- `Typebot.close()`: Close popup or bubble
|
|
|
|
|
- `Typebot.toggle()`: Toggle the bubble or popup open/close state,
|
|
|
|
|
- `Typebot.showPreviewMessage()`: Show preview message from the bubble,
|
|
|
|
|
- `Typebot.hidePreviewMessage()`: Hide preview message from the bubble,
|
|
|
|
|
- `Typebot.setPrefilledVariables(...)`: Set prefilled variables.
|
2023-07-15 17:38:12 +02:00
|
|
|
- `Typebot.setInputValue(...)`: Set the value in the currently displayed input.
|
2023-05-17 10:00:25 +02:00
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
Typebot.setPrefilledVariables({
|
|
|
|
|
Name: 'Jhon',
|
|
|
|
|
Email: 'john@gmail.com',
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
For more information, check out the [HTML & Javascript additional configurations](./html-javascript#additional-configuration)
|