Skip to main content

Conscia Property Mapper

Conscia's Property Mapper Component allows you to restructure and/or merge the data from your backend sources into a data model that your applications can more easily consume, according to your unique business requirements. It involves identifying the data elements in the source systems and specifying how they should be transformed and mapped to the corresponding data elements in the target system(s).

A Property Mapper can have multiple sources, which could be Component responses, Context Field values, or JS Expressions. For each source use JS expressions to select, map and transform each of the required properties.

A Property Mapper's target properties can be anything from a single value to a complex, nested object. For example, you could map a cart ID value or map an entire data set to a target property through a single mapping source expression.

Here are examples of using Component Responses and a JS Expression pulling Component metadata as sources to map and transform properties:

Property Mapper Mapping

Property Mapper Mapping

Property Mapper Mapping

For more detailed information on the Property Mapper as well as other Schema Mapping Components and strategy, see the the following page:

Mapping Backend Schema to Frontend Data Model

API Component Configuration

Parameter NameParameter PropertyDescription
Default SourcedefaultSourceData value to be used in the mapper expressions if not overridden within the mapper definition.
Default Expression TypedefaultExpressionTypeOne of: jmespath, jsonpath, jsonata, javascript
Property MapspropertyMapsArray objects that descrbe how to map source to target properties. propertyMaps: [{ source, expressionType, mappings }]
Property Maps / Source DatasourceThe data value to be used for the expressions in this set of property mappings.
Property Maps / Expression TypeexpressionTypeOne of: jmespath, jsonpath, jsonata, javascript
Property Maps / MappingsmappingsArray of objects that map a target property to an expression to be evaluated. mappings: [{ targetProperty, sourceExpression }]
Property Maps / Mappings / Target PropertytargetPropertyThe path in the final object that should contain the evaluated source expression.
Property Maps / Mappings / Source ExpressionsourceExpressionExpression to be evaluated and mapped to the specified target property.
Important Note

The sequence of the mapping is non-deterministic. Therefore, it is important that the specified targetProperties are not overlapping in any way.