Skip to content

Studio customization

Certain parts of the studio user interface can be customized for each bot.

These parts are the user filters, the columns visible on the contacts page and predefined broadcasts. All of these customizations are created by adding the appropriate section in the studio YAML file that is part of your bot.

Predefined filters

If you use filters frequently, it might be convenient to save these for later use, so they can be reused by you and all team members:

filter_control

In order to do so, you can create a user_filters section in the studio YAML file in your bot. Each entry in the user_filters list has a label and a filter expression.

Add the following to the studio YAML file:

user_filters:
- label: "Engaged visitors"
  expr: "tag:engaged and tag:success"
- label: "Returning visitors"
  expr: "tag:again"
- label: "Failed sessions"
  expr: "tag:engaged and not tag:success"

When you have defined such a file, the above dropdown menu will appear next to the filter input, that shows each defined entry and allows you to select it quickly.

CRM columns

It is possible to specify which columns are visible in the overview table on the contacts page. By default, besides the user details page, the first contact, email, and locale column are visible. It is possible to change this using the contacts_column section in the studio YAML file.

All fields that are saved (remembered) in the user object in the bot are elegible for showing here.

contacts_columns:
- label: Email
  field: email
- label: Phone
  field: phone

The fields that are mentioned here are also exported in the contacts CSV export, with their columns ordered before any other user data field.

Custom broadcasts

The broadcast button on the contacts page allows you to send Bubblescript events to a targeted group of users of the bot.

By default, this dialog needs you to enter an event name and optionally a JSON payload. This is not very user friendly, especially for non-skilled operators who do not know the inner workings of the bot. By setting up a list of predefined events and their payloads in the studio YAML file, it is easier for operators to send a specific broadcast in a reliable way, optionally adding extra payload data which can be entered in the UI in a form.

As an example, you can set up the broadcasts section as follows:

broadcasts:
- event: message
  label: Send message
  description: "Send message to all users. Users will receive an email."
  payload_form:
    schema:
      type: string
      title: Message
    ui_schema:
      ui:placeholder: "Type your message here"
      ui:widget: textarea

This will render the following broadcast dialog:

studio_custom_broadcast

In this case, when clicking the broadcast button, the event message will be sent to the intended audience.

You need to ensure that the message event is handled in your Bubblescript code:

dialog event: "message" do
  say "Someone sent you a message"
  say event.payload
end

Note that not all users might be able to receive broadcasts. E.g. the chat process will start but they might not be able to receive it, for instance because they are on a frontend that does not support arbitrary broadcast (e.g. Google Assistant), or, when they came from the web interface, they did not leave their email address or did not opt in to chat notifications user.web_push_status != "yes".

Dashboard configuration

It is possible to configure the dashboard for each bot.

dashboard:
  funnels:
    - registration_flow
  kpis:
  - tag: "user_registered"
    label: "Users registered"

This will create on the dashboard an extra KPI counter to show how many users registered the last 7 days. It also creates a graph of the tags that start with registration_flow: and show these in a horizontal bar chart, just like on the analytics page.