How to choose the right formula for your Workato recipe

Formulas
Table of Contents

What are Formulas in Workato?

Formulas are a powerful feature in Workato, and an essential ingredient for recipes across all integrations and automations.

Formulas give you the ability to:

  • perform arithmetic operations
  • make comparisons
  • convert one data type to another
  • format values
  • combine or split strings
  • find and replace patterns, and more.

The latest updates to Workato Formulas

The latest updates to the formula mode provides a guided experience to make the recipe-building process simpler and faster. It also provides tools for power users to have more control and speed when working with advanced application of formulas.

Guidance for an easier start and quicker success

With over 100+ formulas to choose from,  it can be challenging for anyone to find the right formula for the desired outcome.

The new guided experience makes it easy to discover the right formula faster.

Formula guide

Formula guide

Using formula recommendations for faster choices

Today, our experiences are defined by recommendations. The next best movies are suggested on Netflix, the songs we’ll enjoy are recommended on Spotify, and Amazon proposes products that we may want.

Recommendations equal a better user experience. They make it easier and faster for us to discover what we are looking for. We have now brought that experience to formulas in Workato:

Recommended formulas

Formula recommendations

These new formula recommendations are based on algorithms that learn from usage data, and make suggestions that are most likely to fit the requirements and context of the recipe.

In the above example, the .present formula is recommended because validating the amount field by checking existence of a value is the most likely step a user will want to take.

This significantly increases the likelihood of choosing the right formula quickly.

Browsing formulas by categories

Although search and recommendations have grown more common than ever, browsing is still a useful way to discover what we want or need.  We still look for movies by genre to find the latest action film or documentary, look for the cereal or produce aisles in the grocery store, or look for beach destinations when planning a getaway.

Browse formulas by category

Formula categories

Similarly, formulas have been grouped by categories such as “Operators” for arithmetic operations, “Convert to a different data type” for data type conversions. These categories directly map to what we intend to accomplish with the formula.

Automatic filtering of formulas for datatype compatibility

Filtering for compatibility

Datatype filtering

Even though there are 100+ formulas in Workato, not all formulas work with every data type. The newly designed flow filters out formulas that are incompatible with the data type of the data pill, and limits it to the ones that will work without issues.

Formula descriptions: making it easy to understand

Easy to understand descriptions

Short descriptions

Formula names like .to_s, .to_i didn’t provide much information about what they can accomplish. The new design also introduces completely new descriptions for formulas to make it easy for us to know exactly what can be done with these formulas.

Just finding the right formula is not enough

Finding the right formula is only half the work. To use the formula correctly is even more important. Incorrect arithmetic operations can result in incorrect revenue reporting or invoicing;  a mishap in date conversion or calculation can delay the start date of an employee or shipment of an order, and the results can be far more damaging for your business, employees and customers.

New dropdown feature: learning from examples

Whether learning a new cooking technique from a blog or watching how to repair something at home on YouTube, nearly everyone finds that it’s easier to learn from examples to understand how things work.

Formulas now work the same way. Any time a new operator is added to the formula, several examples appear in the help dropdown below that show what happens to the data as a result.

Dropdown to feature easy to use formula examples

Dropdown to feature easy to use formula examples

In the example above, we can see the different ways to use the gsub formula, and how parameters can be used to accomplish different outcomes.

Use formulas the right way, the first time. Every time.

Not all formulas are created equal, and some require very precise syntax to get the right output. While examples in the help section are great to show how to make it work, it is equally important to know common errors to avoid.

Use formulas the right way

Use formulas the right way

In the above example, the help section also includes “Quick Tips” informing us on the right way to use the .now formula, and also goes further to recommend the .today function if timestamp component is not important for the outcome.

Designing for Efficiency

While these changes to the experience when using formula mode are immensely helpful for first time use, power users expect more control and speed.

Shortcut keys for speed

Use shortcut keys for faster access

Shortcut keys

  • Use Shift + Space to toggle between the wizard mode and compact mode.
  • Use Up / Down keys to cycle between the function list and Enter/Tab key to autocomplete the function.

Expanded mode for advanced formula usage

Expanded mode for improved readability

Expanded mode for improved readability

Occasionally, there is a need to compose a complex formula by chaining multiple formulas for advanced transformations. Now, we can use the expand icon on the right of the input field to go into focus mode where the field expands to cover the entire height of  the screen. The expanded space makes it easy to format the formula and improves readability.

 

 

Was this post useful?

Get the best of Workato straight to your inbox.

Table of Contents