Map Property
Configuration reference for mapping expanded values to item properties with the MapProperty valve.
The MapProperty valve maps a value from an item or another pipe scope to a target property on the current item. Use it for fixed value translations that would otherwise require a script valve, such as mapping a department to an access level or a status code to a display value. Use item_include_expr to control which existing items are processed (see Item).
Configuration
Section titled “Configuration”| Name | Description | Default | Mandatory | Expanded |
|---|---|---|---|---|
source | Value to look up in mappings. The value can reference item, request, exports, session, or other available pipe scopes. | None | ||
target | Name of the item property that receives the mapped value. | None | ||
mappings | JSON object containing source values as keys and target values as strings. Mapping values are used as configured and are not expanded. | None | ||
default | Value to use when source does not match a configured mapping. If omitted, the item is left unchanged when no mapping matches. | Not set | ||
case_sensitive | Controls whether mapping keys are matched using case-sensitive comparison. | true | ||
overwrite | Controls whether an existing target property is replaced. When false, an existing property is preserved. | true |
{ "name": "MapProperty", "config": { "source": "${request.department}", "target": "access_level", "mappings": { "Finance": "high", "Sales": "standard" }, "default": "${request.default_access_level}", "case_sensitive": false, "overwrite": true }}Mapping behavior
Section titled “Mapping behavior”For each current item, the valve expands source and looks up the resulting value in mappings.
- When a mapping matches, its configured string value is written to
target. - When no mapping matches and
defaultis configured, the expanded default value is written totarget. - When no mapping matches and
defaultis omitted, the item is not changed. - When
overwriteistrue, an existing target property is replaced. When it isfalse, an existing target property is preserved, including an empty existing value.
When case_sensitive is false, both the expanded source value and mapping keys are compared without regard to case. Mapping keys that differ only by case are ambiguous in this mode and cause a configuration error.
Flows without items
Section titled “Flows without items”If the flow does not contain an item, the valve creates one with a generated UUID when the mapping or default resolves to a target value. No item is created when there is no matching mapping and no default value.