Getting Started
Basic Concepts
Tutorials
Advanced Concepts
How-to Guides
Building integration flows
Data transformation
Integration patterns
Developing Components
Tenant Management
Components
CRM Components
ERP Components
E-Commerce Components
Basic Components
Utility Components
References
Sailor
Component Descriptor
Covered in this article
Related articles
Contracts and Workspaces Understanding credentials Data Sample Overview Creating your first integration flow Getting Started What is an integration component? What is an integration flow? What is a tenant? Take a tour of the product Creating a webhook flow Building a component in Java Building a component in Node.js Content-Based Routing Deploying a component How-to Guides Managing flow history Managing OAuth Clients Managing user roles in a tenant Managing Workspaces Mapping data Building real-time flows Sending data to a list of recipients REST API component Managing your SSH keys Managing your Teams/Components Allmysms component Amazon MWS component AMQP component AppDirect Component AWS Lambda component AWS SNS component Bazaarvoice component ChannelAdvisor component Code component Configuration component CSV component Docusign component Dun-and-bradstreet component Ebay component Edifact-parser component Email component Exact Online component Filter component Google PubSub component Google-shopping component Google-translate component Goto-webinar component Google Spreadsheets component Components JDBC Component JDBC Component JDBC Component Jsonata component Key-value-component component Ldap component Lightspeed-ecom component Lightspeed-retail component Lionbridge-translation component Magento1 component Magento2 component Mailchimp component Mandrillapp component Microsoft Dynamics CRM component MsSQL component NetSuite component ODATA component Outlook component Petstore-nodejs component Pipedrive component Postgresql component Quickbooks-component component Request-reply component Rest API component Router component Salesforce-cpq component Salesfoce Component Sdl-translate component Sftp component Shopify-admin component Shopware component Simple-trigger component Smarty-streets component Soap component Splitter component Stripe component Sugar-crm component Timer component Twitter component Webhook component Xml component Component Descriptor Structure References Sailor compatibility matrix View Classes

Mapper component

The beast doing all the hard mapping work At the moment there are two different languages used to define transformation between input data and result

  • JSONata
  • Based on handlebars template engine (will be deprecated)

Handlebars expression language

Just do not use

JSONata expression language

Expression language is an essential part of functionality of the integration platform, it is frequently required to fight syntactical but also semantical data transformation. Mapper uses JSONata expressions to do complex data transformation. JSONata has many advantages for the use-case:

  • Native JSON support for input but also output. Every valid JSON document is by default a JSONata expression.
  • Set of build-in functions to do content transformation, e.g. type transformation (stirng to number), string transformation (splitting, joining, etc.) and even higher-level functions (lambda, map, reduce, etc.)
  • Comprehensive selector mechanism allowing you to navigate nested JSON structures, arrays, predicated-based selectors
  • Ability to add custom functions, e.g. date parsing or output functions

More information you will find on JSONata website.

How expressions work

In order to generically apply JSONata expressions to the integration platform context we defined following rules:

  • Expression is applied to each incoming message one-by-one, possible runtime errors during evaluation will be reported as errors to the platform. One input message provides one message at the output of the component.
  • Root context is message body. It contains actually data from previous step and, possibly, passthrough data.