Tech 201: Transforms
Bryan O'Neal
Updated on Mar 04, 2025
Hi, I'm Brian O'Neill from Coherent, and in this video, I'd like to introduce you to a fantastic feature built into the Coherent platform for transforms. This feature is designed to shape the JSON coming from a calling system so that it fits the schema needed by your Coherent Spark service and then transform that data on the way back out.
Let's start by understanding the type of problem we're trying to solve. In Coherent, I have a property rater, and if you look at the JSON request, you'll notice it's a very flat data structure. It consists of many single fields with a few tables, such as a table of location values. This structure makes sense because Excel is two-dimensional, which constrains the type of data you can pass in or out via tagging as X inputs or X outputs into Coherent.
What if you have a complex data structure coming out of your calling system, like something that's deeply nested? You need to transform that JSON, and we've made this easier for you by publishing the Transforms API.
Here's a little diagram of what's going on. Ultimately, you're trying to call this Spark service, but your data coming out of your system will have a complex data structure that needs to be transformed. Instead, you'll call an endpoint called /transform
that sits in front of the transform document itself. The transform document is written in a library called JSON-ADA, which allows you to quickly and tersely express JSON transformations.
Let me show you an example. In this folder for the transform demo, I have uploaded a transform. Let's edit it to see how it looks:
Request Transform: On the left, you have JSON-ADA expressions or rules.
Response Transform: On the right, you have the transformation of the X outputs coming out of Coherent into the data structure the receiving system needs.
The JSON-ADA itself is written here in cursor. Here's my request JSON-ADA and my response JSON-ADA. By the way, AI is excellent at writing these. If you provide your AI with an example of your source data and destination data and ask it to write a JSON-ADA transform, it often gets it right the first time. It's amazing and wonderful.
When you're ready to call your transform with Postman, follow these steps:
Call the API using /v4/transforms/transform-demo-property-v1
. This is the name of your transform.
Specify the name of the service being called.
In the body of the request, pass the untransformed payload coming out of your calling system. You'll see a much more complex data structure here.
Hit send. It calls the property rater API, performs the pricing, transforms the response, and adjusts it to the scheme your receiving system needs.
This feature is wonderful and really accelerates your implementation. If we can help you get started with it, please give us a call. Thanks for watching!