Config
Orb configuration settings
Orb allows you to set a number configuration settings to control things like when the Orb connects, to which integration it connects, static string etc. Here is an example of snippet of Orb being initialized with a number of custom settings.
window.orbConfig = {
connectionOptions: {
gridUrl: "https://grid.meya.ai",
appId: "app-xxxxx",
integrationId: "integration.orb",
},
theme: { "brandColor": "#4989ea" },
composer: {
placeholderText: "Digite uma mensagem",
collapsePlaceholderText: "Mais alguma coisa a dizer?",
fileButtonText: "Arquivo",
imageButtonText: "Foto"
},
drop: {
dragAndDropText: "Arraste para enviar o arquivo",
},
launcher: {
type: "message",
icon: "streamline-regular/21-messages-chat-smileys/02-messages-speech-bubbles/messages-bubble-question.svg",
text: "Help",
},
container: document.querySelector("#orb-mount"),
windowApi: true,
};
(function () {
var script = document.createElement("script")
script.type = "text/javascript"
script.async = true
script.src = "https://cdn.meya.ai/v2/orb.js"
document.body.appendChild(script)
var fontStyleSheet = document.createElement("link")
fontStyleSheet.rel = "stylesheet"
fontStyleSheet.href = "https://cdn.meya.ai/font/inter.css"
document.body.appendChild(fontStyleSheet)
})()
Connection config
Setting | Type | Default |
---|---|---|
| Required The URL of the Meya grid platform the Orb will connect to. Usually this is set to | |
| Required The ID of Meya app that Orb will connect to. You can find your app ID under you app's Settings page in the Meya Console. | |
| Required The ID of the integration that the Orb will connect to. This ID is set in BFML when you added the Orb integration to your app. When adding an integration to an app the ID can either be set manually using the | |
| This specifies whether the Orb should automatically connect when it is initialized.
This will allow you reduce your MAU (Monthly Active Users) usage. Orb embed mode |
|
| This is a custom callback that will be run when the Orb first connects to the Grid. Note, that this is only run the first time the Orb successfully connects but won't run again when the Orb is in a connection retry loop. |
|
| The custom page context object that can be used to send custom data to the bot. See the Page context page for more detail. |
|
| A list of Orb event entries to initialize the Orb with. This setting is mainly for advanced and debugging use cases. By default the Orb will always receive a list of event entries from the Orb integration. |
|
| The unique Meya ID of the current user connecting to the app. A user's ID can be found in your app's Users view. This setting is mainly for advanced and debugging use cases. By default the Orb will generate a unique integraiton user ID, which is stored in local storage, and the Orb integration will generate a unique user ID for the given integration user ID. |
|
| An object that stores each user's meta data e.g. name, avatar, type. This setting is mainly for advanced and debugging use cases. By default the Orb will always receive the active user data from the Orb integration. |
|
| This allows you to initialize the Orb with a specific magic link ID. See the Magic Links page for more detail. |
|
| This allows you to set a custom Orb integration user ID. This setting is mainly for advanced and debugging use cases. By default the Orb will always generate a random integration user ID and store it in local storage. |
|
| This allows you to set a custom Orb integration thread ID. This setting is mainly for advanced and debugging use cases. By default the Orb will always generate a random integration thread ID and store it in local storage. |
|
| This allows you to set a custom Orb session token. This setting is mainly for advanced and debugging use cases. By default the Orb will always generate a random session token and store it in local storage. |
|
| When set to This allows the Orb to identify an existing user when they return to the same page/s. |
|
Theme config
Setting | Type | Default |
---|---|---|
brandColor | This is a string containing a standard HEX color code. | #95006d |
backgroundTranslucency | A decimal value between 0 and 1.0 | 0.44 |
botAvatarMonogram | Optional string used for the bot avatar if no avatar URL is provided. | null |
botAvatarUrl | Optional URL for the bot's avatar. | null |
Composer config
Setting | Type | Default |
---|---|---|
| The string that appears in the Orb's text input box. |
|
| The bot can specify that the Orb's text input |
|
| The text of file upload button |
|
| The text of the image/photo upload button. |
|
| The text of the button to open the phone's image |
|
| Specify an optional | null |
| Specify an optional | null |
Drop config
Setting | Type | Default |
---|---|---|
dragAndDropText | The text of the drop area when a file is dragged onto the Orb. | Drop to send file |
Updated 15 days ago