Getting Started

Overview

In Bento, a workflow is an automated sequence that is set in motion by a specific trigger and then includes one or more actions tied together with transitions.

Flows are dynamic, flexible and lightweight based on simple text documents.

Bento's workflows are designed to make it easy to nurture relationships with your subscribers and customers over the course of their lifecycle as well as pull off unique interactions.

Let's dive in and see what we can do.

How It Works

Workflows are stories you write in our text editor.

These documents are translated into diagrams live as you create them. By using a text-based document format we're able to keep things very simple and easy to edit. It also means that sharing or duplicate workflows just takes a click. Perfect for deep customisation or personalisation.

There are 3 types of objects you can write about in your document:

  • Triggers — how workflows begin and start.

  • Transitions — how people move from trigger to action or action to action.

  • Actions — what happens when a visitor after they go through a transition and reach the new destination. This could be sending an email, waiting 10 minutes or anything!

To show an example of how these three elements work together consider this simple example:

[trigger]
on="event.unsubscribe"
[[trigger.transition]]
to="action.first_message"
[action.first_message]
type="message"
body="Hey! Mind if I ask why you unsubscribed?"

In the above example we will add a visitor to this workflow when they trigger an $unsubscribe event via the API or Javascript embed. We'll then, immediately, transition them to the next action where we will send them a message on live chat to ask why they unsubscribed.

Magic!

Available Triggers

Add a visitor to a workflow if they unsubscribe:

[trigger]
on="event.unsubscribe"

Add a visitor to a workflow if they subscribe:

[trigger]
on="event.subscribe"

Add a visitor to a workflow if they purchase a product via your Shopify store:

[trigger]
on="event.orderPaid"

Available Actions

Send a message to a visitor via live chat (will email if not online):

[action.example]
type="message"
body="hello"

Add a tag to a visitor dynamically:

[action.example]
type="add_tag"
tag_name="new_tag_name"

Add a custom field to a visitor dynamically:

[action.example]
type="add_custom_field"
key="favourite_food"
value="bento box"

Add a visitor to an email sequence:

[action.example]
type="add_to_sequence"
sequence_id= # we in the editor we provide these IDs for you.

Send a Slack notification:

[action.example]
type="slack"
channel="general"
message="New sales lead! {{ visitor.email }}"

Send a one-off email (we recommend message over email):

[action.email]
type="email"
subject="Welcome!"
body="Hey {{ visitor.first_name }}, welcome to our app. How can we help?"
from="jesse@bentonow.com"

Delays

Adding a delay to an action is simple. Just add delay_hours= or delay_days= to the action and it'll run it after that period has completed. For example:

[action.send_a_message_after_5_hours]
type="email"
subject="Hey"
delay_hours=5
from="email@email.com"
body="Welcome"

Liquid Templating

All actions that contain a message can be personalized using liquid templating. This includes all fields that include body or message. The following variables are made available to you:

  • visitor and all the attributes you have available in emails. This includes all custom fields.

  • event and everything available in the data object. This means you can include {{ event.type }} to get the type of event or even {{ event.location.country_name }}.

Complex Examples

An action or a trigger can have multiple transitions set up for it.

A visitor can go down ALL transitions that it qualifies for. In the following example a visitor is added to the workflow when they trigger a subscribe event and goes down two paths.

[trigger]
on="event.subscribe"
[[trigger.transition]] # please update action name
to="action.path_one" # please update
[[trigger.transition]] # please update action name
to="action.path_two" # please update
[action.path_one]
type="slack"
channel="general"
message="Testing the first path"
[action.path_two]
type="slack"
channel="general"
message="Testing the second path"
[[action.path_two.transition]] # please update action name
to="action.path_three" # please update
[action.path_three]
type="slack"
channel="general"
message="Testing the third path"

Will create the following diagram: