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

SettingTypeDefault
gridUrlRequired

The URL of the Meya grid platform the Orb will connect to.

Usually this is set to https://grid.meya.ai
appIdRequired

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.
integrationIdRequired

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 id property or it will be the dot path of the integration YAML file e.g. integration.orb when the file path is integration/orb.yaml.
connect
Important!

This specifies whether the Orb should automatically connect when it is initialized.

Note, if you are deploying the Orb to a web page with a lot of user traffic, it is recommended to set this to false so that the Orb will only connect when a user clicks the Orb launcher.

This will allow you reduce your MAU (Monthly Active Users) usage.

Orb embed mode
If you're using Orb in embed mode, then you must set this to true otherwise the Orb will stay in the loading state.
true
onFirstConnectThis 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.
null
pageContextThe custom page context object that can be used to send custom data to the bot.

See the Page context page for more detail.
null
eventStreamA 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.
null
gridUserIdThe 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.
null
userDataAn 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.
null
magicLinkIdThis allows you to initialize the Orb with a specific magic link ID.

See the Magic Links page for more detail.
null
userIdThis 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.
null
threadIdThis 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.
null
sessionTokenThis 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.
null
useLocalStorageWhen set to true the Orb will store the integration user ID, integration thread ID and session token in the browser's local storage.

This allows the Orb to identify an existing user when they return to the same page/s.
true

Theme config

SettingTypeDefault
brandColorThis is a string containing a standard HEX color code.#95006d
backgroundTranslucencyA decimal value between 0 and 1.00.44
botAvatarMonogramOptional string used for the bot avatar if no avatar URL is provided.null
botAvatarUrlOptional URL for the bot's avatar.null

Composer config

SettingTypeDefault
placeHolderTextThe string that appears in the Orb's text input box.Type a message
collapsedPlaceHolderTextThe bot can specify that the Orb's text input
box can be hidden in BFML. This text will appear when the Orb's text input
is hidden and the bot did not specify any placeholder text in BFML.
Have something else to say?
fileButtonTextThe text of file upload buttonFile
imageButtonTextThe text of the image/photo upload button.Photo
galleryButtonTextThe text of the button to open the phone's image
gallery.
Gallery
character_limitSpecify an optional length limit and error_textnull
uploadSpecify an optional progress_test limit and error_text for uploading progress barnull

Drop config

SettingTypeDefault
dragAndDropTextThe text of the drop area when a file is dragged onto the Orb.Drop to send file