Create PayClass Payload with JavaScript

Recipe ToolsDeveloper ToolMarketing

What it does

When a function call arrives, this automation executes JavaScript code to flatten shortnames into a structured payload. The result is returned so the calling system receives the transformed data.

Who it's for

Engineering teams who need to transform function call data into a standardized payload format.

How teams use this

Transform API request data into PayClass format

Convert incoming function calls with shortname fields into a standardized PayClass payload that downstream systems expect. The transformation happens in real-time without manual intervention.

Flatten nested shortname structures

Use JavaScript to collapse multi-level shortname hierarchies into a flat PayClass payload that simplifies downstream processing. Only the transformation logic changes based on your data structure.

Route transformed payloads to multiple systems

Send the flattened PayClass payload to different downstream services based on payload content or type. Add conditional routing after the JavaScript step to direct data to the right destination.

How it works

  1. Receive the function call. A function call arrives in real-time with shortname data that needs to be transformed into a PayClass payload structure.
  2. Flatten shortnames with JavaScript. Js Eval executes JavaScript code to transform the incoming data by flattening shortnames into the required PayClass payload format.
  3. Return the transformed result. Send the flattened payload back to the calling system so it receives the structured data immediately.