Generate JSON from order template and send via HTTP
Recipe ToolsDeveloper ToolData ParserAPI Integration
What it does
When someone calls Create order, this automation executes custom code and generates a JSON message using the Arlo Order Lines Template. The JSON is parsed, logged, and sent via HTTP so the order data reaches its destination.
Who it's for
Operations teams who need to transform order data into structured JSON and deliver it to external systems.
How teams use this
Convert orders to structured JSON
Transform order details into a structured JSON message using the template, validate it, and send it to an external API. The team gets a reliable way to move order data without manual formatting.
Maintain audit trail of transformations
Each generated JSON is logged to the job report so someone can review what was sent and troubleshoot any issues. This keeps a record of every order transformation for compliance.
Filter order lines before sending
Modify the Ruby code to filter or enrich order lines before the template builds the JSON. Only include lines that meet certain conditions so the downstream system receives clean data.
Route JSON to multiple systems
Set up conditional logic to send the parsed JSON to different HTTP endpoints based on order type or destination. This lets one automation serve multiple downstream systems without duplication.
How it works
- Receive the Create order call. A real-time call for Create order starts this automation with the order details needed to build the message.
- Run Ruby code to prepare data. Execute custom code in Workato Custom Code to transform or enrich the order data before it enters the template.
- Build JSON with Arlo template. Generate the JSON message using the Arlo Order Lines Template so the order structure matches the required format for downstream systems.
- Validate the JSON structure. Parse the generated JSON in Json Parser to ensure it is well-formed and ready to send to the target system.
- Send JSON via HTTP request. Post the validated JSON to the target system using Rest so the order data is delivered to the external endpoint.