Basic concepts

Envision is not just a programming language for commerce analytics, it is a fully-fledged collaborative development environment. Envision produces dashboards geared toward high-productivity processes, but it also generates tabular files that can automatically be reimported into other systems when end-to-end automation is desirable. In this section, we review the most important concepts and the most important features of Envision. This section is aimed at helping newcomers to make sense of Envision as a whole.

Tiled dashboards and tabular files

Let’s start with the final result: envision produces dashboards and, if needed, tabular files such as Excel sheets or CSV files. The dashboards produced by Envision are composed by arranging tiles together. Each tile can be adjusted in color and size, and most importantly, the content of the tile can be configured to contain tables, line charts, pie charts, etc.


The dashboards produced by Envision consolidate everything on one page. While each tile can be clicked to obtain an expanded view, the main emphasis is given to a single page dashboard. This approach is quite unlike the traditional Business Intelligence (BI) tools that emphasize the idea of drilling down into the data. Our dashboards’ intent is to display only those key indicators that are worth the time it takes to read them and ignoring all the other indicators containing irrelevant information. Indeed, while producing a wall of numbers is easy, in practice, it tends to be too time-consuming, and companies quickly stop taking into account the BI cube altogether.

However, dashboards are only the most visible output. Envision can also produce tabular output files, such as Excel sheets or CSV flat text files. Like the dashboards, these tabular files are entirely, and programmatically, configurable. For example, it is possible to use Envision to reprice all products on a daily basis, and then to export the list of revised prices into a CSV file, which is downloaded and reimported into the appropriate business system. The files produced by Envision can be downloaded by FTP (or SFTP), and offer the possibility of achieving complete end-to-end automations.


Importing data

In order to get anything out of Envision, Lokad needs to be fed with your business’ historical data. This data should be provided in tabular file format. Envision supports a wide spectrum of data formats such as CSV (comma-separated values) or Excel sheets. Your Lokad account is bundled with an online file repository, and the input data files will be stored within your Lokad account.

Lokad already supports many well-known commerce management software. Thus, if your system happens to be already supported by Lokad, you only need to grant Lokad an access to your system. Lokad will take care of importing all the relevant data; the corresponding tabular files will be created directly within your account. These files are then ready for immediate consumption by Envision.


If Lokad does not yet support the software where your data is currently located, then it is still possible to perform an ad-hoc data extraction, typically by querying the database, and then importing the files into Lokad using FTP (File Transfer Protocol) or its variants like SFTP. Lokad also supports manual uploads through the web, but our experience indicates that if data extraction cannot be automated, re-uploading your most recent data every time tends to be fairly tedious.

Optimization layer on top of a management layer

The vast majority of business apps “manage” digital entries of some kind: product information, employee schedules, client emails, etc. Envision, and Lokad more generally, are different: our intent is not to manage your business, but merely to optimize it. The difference is subtle, but important. Envision is intended to be used on top of one or several other business systems, but unlike these systems, Envision puts very little constraints on the IT landscape of a company.

The management of any given process, say stock movements, is typically geared toward data entries in order to create a digital counterpart for each business operation. In order to leverage such systems to their full potential, it is generally important to reshape the company processes according to the exact methodology outlined by the software. Hence, such systems are typically fairly ‘’structuring’’ for companies and their IT landscape as well.

On the contrary, Envision does not attempt to manage anything. Envision can be used to optimize stock levels, but we expect the actual inventory levels to be managed somewhere else. Envision is a software layer that comes on top of management apps. Envision is designed to be capable of accommodating pretty much any process and any combination of software found in commerce, however one of the key reasons why such flexibility is possible is precisely because Envision takes no “ownership” of the data.

Projects, script editor and tile editor

While Envision is simple enough to be accessible to tiny companies, it is powerful enough to satisfy large ones too. In particular, Envision offers a series of features that helps your company keep everything neat and tidy within your Lokad account. Let’s review how the Envision-related materials are sorted out within your Lokad account.

Envision is a programming language, and we typically refer to a block of Envision code as a script. Your Lokad account can contain many Envision projects, each project being associated to a script. Each project also generates a dashboard. Distinct projects are typically used to fulfill distinct business needs. For example, one project can be created to address dead inventory issues, while another project is designed to keep track of emerging top seller products.


A project can be edited with two distinct editors: the script editor and the tile editor. The script editor can be accessed by clicking the Edit button on the right-hand side of any Envision project. After accessing the script editor view, you get a direct access to edit the script associated with your project. This editor features the practicalities expected from a modern code editor, such as code-autocompletion for example, whereby code snippets are suggested automatically as you start typing.


The Envision grammar should be also respected, e.g. Envision offers the ability to write code that spreads over multiple lines as if it was a single line. A [line continuation] (/legacy/envision-reference/line-continuations) mechanism has been explained in one of the [Envision reference] (/legacy/envision-reference) sections. You can refer to the reference section not only to acquire the basic language syntax but also to extend the Envision capabilities. Envision reference is the right place to get to know all the useful functions, possible operators, aggregators, read options, a description of a StyleCode sub-language included in Envision, and numerous other exciting concepts of the Envision language.

While the script editor gives you full access to the script, in practice, mentally rearranging dozens of tiles on an Excel-like grid is a tedious exercise. For this reason, Envision also features a second editor referred to as the tile editor, which provides a much more visual experience when arranging the tiles on your dashboards. In order to access this editor, click on your project first, and then click the Edit Tiles button on the top right of the screen once you see the dashboard.


The tile editor lets you modify the tiles’ position, size, color, title … directly from the dashboard view. The usual practice typically consists of first writing the script with the script editor without paying too much attention to the placement of the tiles, and then, once the dashboard has been generated, using the tile editor to ‘’beautify’’ the dashboard. The changes made using the tile editor are directly applied to the underlying script.