🌐
Recrubo API
  • Getting Started
    • Introduction
    • Sandbox
    • Async requests
    • Authentication
    • Webhooks
    • Filtering, sorting, pagination and including resources
  • Guides
    • Setting up webhooks
    • Generating flows
    • Editing flows
    • Triggering flows
    • Embedding the Inbox
    • Sending messages
  • Resources
    • API Resource Reference
      • Candidate
      • Conversation
      • Flow
      • FlowRun
      • FlowGeneration
      • Message
      • MessageTemplate
      • MessageThread
      • NodeAction
      • NodeTransition
      • Node
      • VacancyAnalysis
      • Vacancy
      • User
      • WebhookPayload
    • Embeddables
      • Inbox
      • BotStudio
      • GenerateFlow
      • Whatsapp connect button
      • Schedule Form
      • Schedule Table
    • Flow types
      • vacancy_application_flow
  • Management
    • Organizations
Powered by GitBook
On this page
  • Parameters
  • Actions
  • Configuration Settings
  • Initialize
  1. Resources
  2. Embeddables

BotStudio

PreviousInboxNextGenerateFlow

Last updated 1 year ago

The BotStudio is an editor where you can create or change Flows that dictate the chatbot's behavior.

Parameters

Parameter
Type
Description
Required

action

String / Object

Yes

token

String

Authentication token to authorize the component.

Yes

settings

Object

No

arguments

Array

JSON object containing configuration settings for the Inbox component.

No

Actions

Action
Description
Arguments
Settings

initialize

Initializes the component.

updateSettings

Updates the component's settings.

setFlow

Switches the active flow.

flowId ID of the flow.

Configuration Settings

Setting
Type
Description
Default

activeFlowId

string or null

Sets the flow id to be displayed for the user to edit.

null

readOnlyMode

boolean

Disable all options for editing, can be used to simply view a generated flow.

false

showPreview

boolean

Show the preview options used to emulate a conversation of that flow.

true

The theme section contains some Bot Studio specific colors as well.

Initialize

To load the Bot Studio component in your application, you need to embed the component's iframe in your HTML. The iframe's src attribute should be set to https://api.recrubo.app/public/v2/embed/component/bot-studio.

Example

<iframe id="botStudioFrame" src="https://api.recrubo.app/public/v2/embed/component/bot-studio" class="w-full h-full"></iframe>

<script type="text/javascript">
const botStudio = document.querySelector('#botStudioFrame')

botStudio.onload = (evt) => {
    const botStudioSettings = {
        action: 'initialize',
        token: 'XX-XX-XX-XX',
        settings: {
            theme: {
                builderStepBackground: '#D6E6F5',
                builderStepSelectedBorder: '#0267c1',
                builderStepBackgroundHover: '#e0ecf7',

                builderEndStepBackground: '#fcf2e0',
                builderEndStepSelectedBorder: '#9b6600',
                builderEndStepBackgroundHover: '#f6eacb'
            },
            botStudio: {
                activeFlowId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
                readOnlyMode: true,
                showPreview: false
            }
        }
    }

    botStudio.contentWindow.postMessage(botStudioSettings, 'https://recrubo.app')
}
</script>

Can be initialize to initialize a new component or an object to call an on a component.

JSON object containing configuration for the Inbox component.

settings JSON object of new .

settings JSON object of new .

action
settings
configuration settings
configuration settings