Skip to content
No description, website, or topics provided.
JavaScript Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

wice-jsonata-transform-component NPM version Build Status Dependency Status

Dedicated Wice CRM data transformation component for platform based on JSONata


This component requires no authentication.

How it works

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. The 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 from OIH Database component and transform it to a valid Wice object:

  "rowid": msg.body.applicationRecordUid,
  "tenant": msg.body.tenant,
  "name": msg.body.lastName,
  "firstname": msg.body.firstName,
  "salutation": msg.body.salutation,
  "birthday": msg.body.birthday

The result of that transformation will be the following JSON document:

  "rowid": "198562",
  "tenant": "617",
  "name": "Doe",
  "firstname": "John",
  "salutation": "Mr.",
  "date_of_birth": "04.11.1980"

The action Transform to OIH works the same way. Let's take this incoming message body from Wice component:

  "recordUid": msg.body.rowid,
  "oihLastModified": jsonata("$now()").evaluate(),
  "firstName": msg.body.firstname,
  "salutation": msg.body.salutation,
  "birthday": msg.body.birthday,

The result of that transofrmation will be the following JSON document:

  "recordUid": "198562",
  "oihLastModified": "2018-06-11T09:41:45.679Z",
  "lastName": "Doe",
  "firstName": "John",
  "salutation": "Mr.",
  "birthday": "04.11.1980"


Apache-2.0 © GmbH

You can’t perform that action at this time.