Getting Started
Build your first integration in less than 15 minutes
Let's build a simple order fulfillment integration. When a new order is placed, it gets automatically sent to a fulfilment centre for processing, and then the order status is updated.
Create a New Workflow
Click "New Workflow"
Name it "Order Fulfillment"
Adding Steps to Workflow
Transforming incoming order data
First up, we'll need to create a new step to convert incoming order schema to fulfillment centre format.
{
"id": 5,
"orderNumber": "ORD-1752204924208",
"customerName": "Lisa Chen",
"customerEmail": "[email protected]",
"status": "pending",
"total": "299.99",
"shippingAddressLine1": "789 Oak Drive",
"shippingAddressLine2": "Unit 5",
"shippingCity": "Seattle",
"shippingState": "WA",
"shippingZipCode": "98101",
"shippingCountry": "US",
"trackingUrl": null,
"shipmentReferenceId": null,
"createdAt": "2025-07-11T03:35:24.196Z",
"updatedAt": "2025-07-11T03:35:24.208Z",
"items": [
{
"id": 9,
"orderId": 5,
"productId": 2,
"quantity": 1,
"price": 299.99,
"product": {
"id": 2,
"name": "Smart Watch Series X",
"sku": "SWX-002",
"category": "Electronics",
"price": 299.99,
"stock": 12,
"status": "active",
"description": "Advanced smartwatch with health monitoring",
"imageUrl": "https://images.unsplash.com/photo-1523275335684-37898b6baf30?ixlib=rb-4.0.3&auto=format&fit=crop&w=96&h=96",
"createdAt": "2025-07-08T18:36:08.439Z",
"updatedAt": "2025-07-08T18:36:08.446Z"
}
}
]
}
Click "Create New Step"
Name it "Transform incoming order data"
Select preferred language. For this tutorial, we will use Javascript
Click on the icon to select the step type. For this step, we'll keep
Data Transformation
Once the step is created, we can now start adding transformation logic to our step.
(data) => {
const inputOrder = data.input;
// Use Array.map to transform the items array
const transformedItems = inputOrder.items.map(item => ({
sku: item.product.sku,
name: item.product.name,
quantity: item.quantity,
price: parseFloat(item.price) // Convert price from string to number
}));
// Construct the final output object
const outputOrder = {
customer_name: inputOrder.customerName,
customer_email: inputOrder.customerEmail,
customer_phone: "+1234567890", // Placeholder as source data is missing
shipping_address: {
street: `${inputOrder.shippingAddressLine1 || ''} ${inputOrder.shippingAddressLine2 || ''}`.trim(),
city: inputOrder.shippingCity,
state: inputOrder.shippingState,
zip: inputOrder.shippingZipCode,
country: inputOrder.shippingCountry
},
items: transformedItems,
shipping_method: "standard" // Default value as source data is missing
};
return outputOrder;
}
Send Order to Fulfillment Centre
Next up, we'll create a new step to send the transformed order data to the fulfillment centre via API.
Click "Create New Step"
Name it "Send Order to Fulfillment Centre"
Click on the icon to select the step type. For this step, we'll select
HTTP Request
We will then write logic for sending order data to fulfillment centre via HTTP Request.
(data) => {
// The body of the request is the output from the previous step (step_1)
const requestBody = data.step_1.data;
return {
"lam.httpRequest": {
"method": "POST",
"url": "https://shipping-logistics-loic21.replit.app/api/orders",
"headers": {
"Content-Type": "application/json"
},
"body": requestBody
}
};
}
Update Order Status
Finally, we'll add a final step to update the order status.
Click "Create New Step"
Name it "Update order status"
Click on the icon to select the step type. For this step, we'll select
HTTP Request
We will add logic for updating order status via HTTP Request.
(data) => {
// Get the order ID from the initial workflow input
const orderId = data.input.id;
// Get the tracking URL and number from the response of the previous step (step_2)
const tracking_url = data.step_2.response.tracking_url
const tracking_number = data.step_2.response.tracking_number
return {
"lam.httpRequest": {
"method": "PUT",
"url": `https://order-track-pro-loic21.replit.app/api/orders/${orderId}`,
"headers": {
"Content-Type": "application/json"
},
"body": {
"status": "Processing",
"tracking_url": tracking_url,
"shipment_reference_id": tracking_number,
}
}
};
}
Run your Workflow
We are now ready to test our workflow. We will be using the input below to run our workflow
Provide Test Input (Use test input below)
Click Run Workflow Button
After running your workflow, you'll see a new entry in the workflow executions section:
Overall Status: Success or failure indicator
Step Results: Individual step outputs and execution logs
Data Flow: How data moved between steps
Execution Time: Performance metrics for each step
Now that you've built your first workflow, let's dive deeper into creating more sophisticated integrations. Building effective workflows requires understanding how data flows between steps and mastering the different types of operations you can perform.
Last updated
Was this helpful?