> Part of the walkerOS documentation. Project overview and full index: <https://www.walkeros.io/llms.txt>

# Mapping

Mapping is walkerOS's code-free way to reshape events as they move through the flow. You describe the transformation as data (JSON or object literal), and the collector applies it at two stations: **source push** (clean and normalize incoming data) and **destination transform** (adapt to each tool's expected format).

## Two concepts[​](#two-concepts "Direct link to Two concepts")

Everything in walkerOS mapping is built from two building blocks:

* **[Mapping.Value](https://www.walkeros.io/docs/mapping/value.md)**: the polymorphic primitive. Whenever a config field accepts a value (`data`, `map.*`, `policy.*`, `set[]`, …), you write a `Mapping.Value`. There are eight forms (path, constant, map, loop, set, fn, condition, consent).
* **[Mapping.Rule](https://www.walkeros.io/docs/mapping/rule.md)**: the object on a destination's `mapping[entity][action]`. It composes values into a complete rule (`name`, `data`, `condition`, `consent`, `policy`, `batch`, `ignore`, `skip`, `settings`).

When a destination doc shows `data: any`, the value you put there is a `Mapping.Value`. The whole rule around it is a `Mapping.Rule`.

## Minimal example[​](#minimal-example "Direct link to Minimal example")

```
// Destination rule: transform "product view" for GA4

{

  product: {

    view: {

      name: 'view_item',

      data: {

        map: {

          item_id: 'data.id',

          value: 'data.price',

          currency: { value: 'USD' },

        },

      },

    },

  },

}
```

`product.view` is the entity-action key. `name` renames the event. `data` is a `Mapping.Value` (specifically the `map` form) that builds the destination payload.

## Try it[​](#try-it "Direct link to Try it")

Map events by their entity-action structure, live:

Configuration

Loading...

Result

Loading...

## Where mapping runs[​](#where-mapping-runs "Direct link to Where mapping runs")

**Source mapping** cleans, filters, or renames incoming events before they reach the collector:

```
await startFlow({
  sources: {
    browser: {
      code: sourceBrowser,
      config: {
        mapping: {
          product: { click: { name: 'product view' } },
          test: { '*': { ignore: true } },
        },
      },
    },
  },
});
```

**Destination mapping** adapts events to each tool's API shape:

```
await startFlow({
  destinations: {
    gtag: {
      code: destinationGtag,
      config: {
        mapping: {
          product: {
            view: {
              name: 'view_item',
              data: { map: { item_id: 'data.id' } },
            },
          },
        },
      },
    },
  },
});
```

Both mappings are independent. The same event can be transformed differently at each stage.

## See also[​](#see-also "Direct link to See also")

* [Mapping.Value](https://www.walkeros.io/docs/mapping/value.md): the eight value forms
* [Mapping.Rule](https://www.walkeros.io/docs/mapping/rule.md): rule-level fields and API reference
* [Transformers](https://www.walkeros.io/docs/transformers.md): middleware alternative for validation, enrichment, redaction
* [Consent](https://www.walkeros.io/docs/guides/consent.md): consent-gated mapping
