Blog
/
Insights

Build smarter rules with expression language

See what Sperta can do for you
We'll connect you with a Sperta expert who can share more about the product and answer any questions you have.
Thank you! We'll be in touch soon.
Oops! Something went wrong while submitting the form.

We often get asked why it makes sense to build rules with an expression language when the appeal of a decision engine is a no-code experience.

Expression language lets users write expressions to implement logic and compute values. It relies on the decision engine to handle loops, conditionals, concurrency, and other nitty-gritty engineering details so that the expression can just focus on implementing business logic.

The main users of decision engines are analysts and data scientists, and they are familiar with Excel functions, SQL, and even Python. Expression language has a similar syntax and it takes days to master for users who know these languages. After analysts spot a pattern with SQL queries, they can easily translate the query into a rule with expression language for real-time decisioning.

Compared to building rules with a UI, expression language offers higher efficiency, better readability, and stronger auditability. You can write expressions much faster than selecting features and operators from dropdowns in a UI. When you have complex logic, expressions are shorter and easier to read than representations in a UI. In addition, when you compare the difference between two versions of a rule, it’s easier to show the difference with expressions.

In addition, expression language provides some advanced functions that are often not available in UI-based interfaces. For example, you can use an expression to find the number of transactions that have an amount of more than 500.

When choosing an expression language, it’s important to know if it has static or dynamic typing. Static typing means variables in expressions have a pre-defined type, and you can prevent errors related to type mismatches when saving the expressions. On the other hand, expression languages with dynamic typing can only catch these errors when running the expression, which might be too late.

For these reasons, Sperta offers its own expression language, SEL. SEL has static typing, provides useful functions, and supports many data types, including timestamps, lists, and JSON. Users write expressions with the help of autocomplete and syntax checking. To learn more, check out our expression language docs.

See what Sperta can do for you
We'll connect you with a Sperta expert who can share more about the product and answer any questions you have.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

More from Sperta