Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.frontic.com/llms.txt

Use this file to discover all available pages before exploring further.

The Value Composer is the per-field configuration inside a Data Sync. For every field in the target Data Storage, it defines how that field’s value gets produced from the incoming feed record. A Data Sync does two things: it maps the integration’s channels and translations onto your project’s scopes and locales, and it holds the Value Composer configuration that defines what every field of the target record becomes. This page covers the second part.
Value Composer runs at sync time — it produces the values that land in a storage record. To include a value from another storage without syncing it in, see Mapped fields — they resolve as the response is built, so the value appears alongside the stored fields.
Buddy can read, create, debug, and manage Value Composer configurations for you. Describe the source shape and the target shape, and Buddy will build a working configuration — often faster than setting it up by hand. You can always refine the result in the UI afterward.

Four slot modes

Each field in the storage mapping is a slot. Every slot operates in one of four modes:
ModeWhat it doesWhen to use it
Schema FieldMaps a field directly from the feed recordStraight field renames, 1:1 mappings
Computed ValueBuilds the value through a chain of operationsReshaping, conditional logic, combining, transforming
Static ValueSets a fixed value that never changesFlags, defaults, brand-wide constants
Keep EmptyLeaves the field untouched during syncFields you don’t want to populate yet
Schema Field and Static are straightforward — pick a source field or enter a constant. Computed Value is where the Value Composer becomes interesting: a declarative language of chainable operations that take feed fields, static inputs, and the output of other operations as arguments.
Compose Value dropdown showing four slot modes: Schema Field, Computed Value, Static Value, Keep Empty

Operations

Computed Value mode gives you access to a wide range of operations across categories like logic, comparison, text, math, array, object, and transform. Operations are type-aware — the UI only shows operations compatible with the slot’s expected output type, so you don’t have to memorize what’s available. See the Value Composer reference for the full catalogue with arguments and return types.

Working with slots

Every slot in the composer can be switched between the four modes. When you select Computed Value, a dialog opens where you build the operation chain visually.
Compose Value dialog showing an IF operation with condition, then, and else slots configured

Copy, paste, and wrap

Slots support clipboard operations that speed up repetitive work:
  • Copy a slot’s configuration to reuse it on another field
  • Paste a copied configuration into a different slot — the UI checks type compatibility before allowing it
  • Wrap an existing slot inside a new operation. For example, wrap a Schema Field in an if to make it conditional, or wrap a concat result in tolower to normalize it. The UI shows which operations are compatible wrappers for the current slot type.

Iteration context

When working inside an array mapping (e.g. transforming an array of images into an array of MediaFile composites), the Value Composer provides special variables:
  • $item — the current element in the array being iterated
  • $parent — access the parent iteration context when nesting arrays inside arrays
For example, if each image has a list of size variants, use $item.url for the current variant and $parent.alt for the parent image’s alt text.

Auto-complete from feed schema

When selecting a Schema Field, the UI auto-completes from the feed schema. If a field doesn’t appear in auto-complete, either the schema hasn’t been inferred yet (no records have arrived) or the field needs to be added manually in the feed’s Schema tab. You can also create new feed schema fields directly from the composer UI.

Debug configurations

The Value Composer has a built-in debugger that runs your configuration against a JSON payload. Load an initial payload from a feed record with Search Record, paste your own, or edit the current one at any time — the payload persists between runs and is fully yours to manipulate. It’s not connected to the live record, so changes you make stay until you load a different one. The payload is shared across both debugger levels.

Field-level debugger

Open the debugger from the Compose Value dialog to test a single field’s configuration in isolation:
Field-level debugger showing node-wise output alongside the Compose Value configuration, with Search Record and Edit Payload buttons
  • Node-wise output — see what each operation in the chain produces before it feeds into the next
  • Live updates — results refresh as you modify the configuration

Record-level debugger

Record-level debugger showing complete output for all storage fields with error highlighting
Test all field configurations at once across the entire storage mapping:
  • Runs every slot’s configuration against the selected record
  • Shows the complete output for each storage field
  • Highlights fields with errors so you can spot broken configurations without checking each one individually
Use the field-level debugger while building individual compositions, and the record-level debugger as a final check before activating the sync.

Worked examples

The examples below use a sample product record. Each covers a pattern that shows up in most Data Syncs.
Disclaimer — Apple, iPhone, and iPhone Pro are trademarks of Apple Inc. Used for illustrative purposes only.

Example 1: Concatenate values

Combine vendor.name and name into a single label field — producing “Apple - iPhone Pro”.
1

Switch the slot to Computed Value

Click the mode toggle on the label slot and select Computed Value.
2

Add the concat operation

In the Compose Value dialog, search for concat and select it. You’ll see three input slots: the two values to join and a separator.
3

Map the input slots

Set the first slot to Schema Fieldvendor.name, the separator to Static Value-, and the second slot to Schema Fieldname.
4

Test with the debugger

Open the debugger to see the node-wise output. With the sample record, the result is Apple - iPhone Pro.

Example 2: Conditional logic

Set an availability field to “In Stock” or “Low Stock” based on the stock value.
1

Add an if operation

Switch the slot to Computed Value and add the if operation. It takes three slots: condition, then, else.
2

Build the condition

Set the condition slot to Computed Value and add greaterthan. Map its value slot to Schema Fieldstock and its compare slot to Static Value10.
3

Set the return values

Set the then slot to Static ValueIn Stock and the else slot to Static ValueLow Stock.
4

Test it

Open the debugger. With stock: 15, the result is “In Stock”. Edit the payload to stock: 5 and the result flips to “Low Stock”.

Example 3: Array transformation

Transform an array of source images into an array of MediaFile composites with description, type, and url fields.
1

Set the reference array

The images storage field expects an array. Set the reference array to Schema Fieldimages — this is what the composer iterates over.
2

Map fields using $item

Inside the iteration, each sub-field maps from the current element:
  • descriptionSchema Field$item.alt
  • typeSchema Field$item.mimeType
  • urlComputed Valueconcat with Static Value https://cdn.demo-shop.com/images/, separator Schema Field$item.key, and second value Static Value/gallery.jpg
3

Test the output

The debugger shows each source image transformed into a MediaFile with a full CDN URL built from the image key.

Example 4: Extract from a nested array

A common pattern in commerce data: product properties sit in an array, but you need a specific property as a flat field. Here, extract the color hex value from the properties array to fill a colorHex storage field.
1

Add findfirst to locate the property

Switch the slot to Computed Value and add findfirst. Set its array slot to Schema Fieldproperties. The filter function needs to match items where id equals color.
2

Build the filter condition

Inside the filter function, add an equals operation. Set the value slot to Schema Field$item.id and the compare slot to Static Valuecolor.
3

Extract the value

Wrap the findfirst result in a get operation to pick the value field from the matched property. The output is #2F4F4F — the hex color, ready to render as a swatch.

Tips

  • Start with Schema Field, upgrade when needed. Most fields start as direct mappings. Switch to Computed Value when you discover the simpler mode can’t express what you need.
  • Use the debugger early and often. The field-level debugger shows node-wise output, so you can pinpoint exactly which operation in the chain produces the wrong result.
  • Use wrap to extend existing configurations. Need to lowercase a mapped field? Don’t rebuild — wrap the existing Schema Field slot in a tolower operation.
  • Edit the payload when real data hasn’t arrived yet. Craft a test input that exercises the edge cases you care about without waiting for production data.
  • Cast types when they don’t match. Source data often has numbers as strings (e.g. "123" instead of 123). Use toNumber, toBoolean, or toString to make sure the value matches the storage field type — a price field expects a number, not a string that looks like one.
  • Watch the feed schema. Fields you reference need to exist in the schema. If auto-complete isn’t finding a field, check the feed’s Schema tab or add it manually.
  • Let Buddy build the first draft. Describe the source shape and the target shape, and Buddy will propose a working configuration you can refine in the UI.

Data Storages

Storage schemas, field types, and how Data Syncs connect feeds to storages.

Ingest Data

Connectors and Data Feeds — where the source records come from.

Value Composer reference

Complete catalogue of every operation with arguments and return types.

Storage Field Types

The field types your storage supports and that composer outputs must match.