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:
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 Name | Parameter Property | Description |
---|---|---|
Default Source | defaultSource | Data value to be used in the mapper expressions if not overridden within the mapper definition. |
Default Expression Type | defaultExpressionType | One of: jmespath , jsonpath , jsonata , javascript |
Property Maps | propertyMaps | Array objects that descrbe how to map source to target properties. propertyMaps: [{ source, expressionType, mappings }] |
Property Maps / Source Data | source | The data value to be used for the expressions in this set of property mappings. |
Property Maps / Expression Type | expressionType | One of: jmespath , jsonpath , jsonata , javascript |
Property Maps / Mappings | mappings | Array of objects that map a target property to an expression to be evaluated. mappings: [{ targetProperty, sourceExpression }] |
Property Maps / Mappings / Target Property | targetProperty | The path in the final object that should contain the evaluated source expression. |
Property Maps / Mappings / Source Expression | sourceExpression | Expression to be evaluated and mapped to the specified target property. |
:::tipImportant Note The sequence of the mapping is non-deterministic. Therefore, it is important that the specified targetProperties are not overlapping in any way. :::