Match your data fields to the standard models

Your field names may not match the required fields exactly. For instance, your product could be uniquely identified by a field called id or productId, instead of sku. The values of those fields may not match the requirements of the standard models exactly, either. For instance, the text in your API may be in uppercase, while you don't want to display it in yalo in this way.

The "Product Fields Mapping" pane lets you make these adjustments. Using the UI, you can

  • Rename fields
  • Construct new fields as a combination of other fields
  • Perform simple transformations such as uppercase, lowercase, and trimming whitespace
  • Round and format currency values

Once are done, you can click to validate the schema. The schema mapping only needs to be done once, then you're good to go.

Product Fields Mapping pane

The Product Fields Mapping pane is divided into three columns. The first column lets you select fields present in your data file, which you want to import into the final model. If the data is not present in your dataset in the exact format required by Yalo, you can select "Calculated Field" and use formulas. (See below.)

Mapping

To map data to the final schema, select the name of the source and destination fields in the first and second columns, respectively.

Formulas

To use a formula, select "Calculated Field" from the left-hand-side column. The middle column will turn into a text input, similar to the formula bar in Excel or Google Sheets, where you can input a formula.

Formulas are in double opening and closing braces {{ }}. For instance, here is a formula that you can use to trim extra whitespace

{{ strings.trim(" hi ") }}

The output of this formula will be "hi" (with no leading or trailing whitespace)

Any text before or after the formula will be inserted as-is. So this expression

A{{ strings.toupper("b"). }}C

will result in ABC.

Using the value of other fields

In the example above, the word strings is called a library. The strings library lets you do things with string values, such as toupper, tolower, trim, etc. To use the value of other fields, you use a Record library:

{{ Record.get("oldField") }}