Dedicated Snazzy Contacts data transformation component for Open Integration Hub platform based on JSONata
This component requires no authentication.
The component supports two actions - Transform to OIH and Transform from OIH. This means that the component takes the incoming message body from the previous step and creates a new expression in a JSON
format.
The new generated JSON
object has specific properties which represent the input/output for the next/previous component in the flow.
It uses a fact that JSONata expression is a superset of JSON document so that by default any valid JSON document is a valid JSONata expression.
Let's see how the action Transform from OIH works. For example let's take this sample incoming message body and transform it to a valid Snazzy Contacts object:
{
firstName: msg.body.data.firstName,
lastName: msg.body.data.lastName,
position: msg.body.data.position,
title: msg.body.data.title,
jobTitle: msg.body.data.jobTitle,
salutation: msg.body.data.salutation,
gender: msg.body.data.gender,
birthday: msg.body.data.birthday
}
The result of that transformation will be the following JSON document:
{
"firstName": "John",
"lastName": "Doe",
"title": "Doe",
"jobTitle": "Manager",
"salutation": "Mr.",
"gender": "male",
"birthday": "04.11.1980"
}
The action Transform to OIH works the same way. Let's take this incoming message body from Snazzy Contacts component:
{
firstName: msg.body.data.firstName,
lastName: msg.body.data.lastName,
position: msg.body.data.position,
title: msg.body.data.title,
jobTitle: msg.body.data.jobTitle,
salutation: msg.body.data.salutation,
gender: msg.body.data.gender,
birthday: msg.body.data.birthday
}
The result of that transformation will be the following JSON document:
{
"firstName": "John",
"lastName": "Doe",
"title": "Doe",
"jobTitle": "Manager",
"salutation": "Mr.",
"gender": "male",
"birthday": "04.11.1980"
}
Apache-2.0 © elastic.io GmbH