02 flo structure // go with the flo

 

flo_diagram

A FLO is a series of cards. In a FLO, the first card will always be an Event. An Event must always precede Actions. In any FLO, there is only one Event card.

Every card after an Event is an Action, which defines what your FLO does.

When an Event occurs within your FLO, the FLO performs actions, one by one, from left to right.

There are two types of Actions within Azuqua: Application Actions, which pertain to the specific cloud application you are working with, and Function Actions, which allow you to control or manipulate data being returned from your Application Actions

Working with Applicationsevents

The way Azuqua works with your applications is through Events and Actions, such as Gmail, Salesforce, or Smartsheets.

An application may contain many different unique Events and Actions. You can use these unique Events and Actions to build FLOs.

Events

There are three types of events: Application Events, Scheduled Events, and On Demand Events. When a FLO will execute depends on the Event specified.

With an Application Event, you can monitor for changes within your cloud application. When a change has been detected, the FLO will execute.  Scheduled Events allow you to execute a FLO at a given interval. On Demand Events allow you to activate a FLO internally or externally, depending on your needs.

Examples of available Events:

  • Application: When a new Customer is created in Salesforce,
  • Scheduled: Every hour on the hour, execute this FLO,
  • On Demand: Execute this FLO after a customer has filled out a webform.

Actions

actionsActions allow the FLO to tell the cloud application to do something.

Examples:

  • Send an email through Gmail,
  • Update a contact in Salesforce,
  • Modify a row in Smartsheet.

Each application has a unique set of Events and Actions, according to the capabilities of the cloud application.

Cards -- Get More "Out" Than You Put "In"

The ability for an Action card to accept input, and then return a different output, is one of the most powerful features of Azuqua:

get_more_out

Each Card represents one specific step in a FLO. Within a Card, there are two types of fields: input and output. Input fields accept values. Output fields are values that a card produces which can be used by subsequent cards.

Here are a few examples of Action cards from Azuqua:

action_card_examples

Each of these three cards is an Action from a specific application. In this case, it's an Action card from the Twilio application, an Action card from the Twitter application, and an Action card from the Gmail application.

The Twilio Action card contains two input fields: to, and body. It also contains two output fields: sid and dateCreated.

Let's Get Serious with FLOs and Functions

Remember: FLOs are just Actions and Events. However, there are two categories of Actions: Application Actions and Function Actions.

We've covered Application Actions, but we've yet to touch on the topic of Functions.

A Function is a card that allows you to interact with, change, or control the data in your FLO. Typically, a Function card is placed between Action cards.

Categories of Function cards include (but are not limited to):

  • Boolean: evaluate values based on true or false conditions,
  • Control: manage and manipulate the structure of your FLO,
  • Crypto: encrypt or decrypt data,
  • Date: parse and manipulate times and dates,
  • List: create and iterate over lists of items,
  • Math: perform mathematical operations,
  • String: build, modify, and parse text.

Example: a simple FLO that uses Functions might use a card within the Control category of Functions, Continue If, to determine whether or not a FLO should continue, based on a specific condition.

Or, the function Compose within the String category, which allows you to compose a new message that contains output fields from other cards.

Functions such as these can be chained together to create complex interactions between your cards, providing a useful paradigm that allows you to create powerful workflows.

Below are examples of Functions contained within each respective category:

square_function_2square_function_1  

 

 

 

Bringing It All Together

The diagram below represents almost all the building blocks necessary to create complex FLOs.

abstract_flo_example

Let's unpack this diagram, step-by-step:

  • An Event card from a specific application generates a set of outputs, Output A through Output G.
  • Output B and Output F from the Event card are used as inputs for Action card #1. As a result, Action card #1 generates Output X, Y, and Z.
  • Output G from the Event card, and Output Y from Action card #1, are used as inputs to Action card #2.

Below is a simple FLO that illustrates the concepts mentioned previously. This FLO has an Event Card and two Action Cards:

x_ray_mode

The orange lines are representative of connections between the Cards, derived from using an output generated by the 'Card Assigned in Board' Event Card as an input to 'Send Email' and 'Split' Cards.

Theory Is Great, Practice Is Better

Every element inside of a FLO is a card. Every card is one of three things: Event or Action. When thinking about how to design a FLO, it's useful to remember this.

FLOs are just series of inputs and outputs. Something goes in, something comes out.

In the next chapter, we're going to cover Types inside Designer. This is a fundamental concept that will help you understand how data is manipulated and moved during its lifecycle.

Next: 03 - types