Workflow Structure
- Trigger: On a Schedule
- Code: Query your data warehouse
- Code (optional): Format data as array
- Iterator: Loop through each product
- Upsert Record: Create or update in Clara

Step 1: Schedule the Trigger
Set the workflow to run at a frequency matching your data freshness needs:- Every 5 minutes for near real-time sync
- Every hour for less critical data
- Daily for batch updates
Step 2: Query Your Data Warehouse
Add a Code action to fetch recent data:Step 3: Format Data (Optional)
If your warehouse returns data in a format that needs transformation, add another Code action. Common transformations include type conversions, field renaming, and data cleanup.Example: User Data with Boolean and Status Fields
Example: Product Data with Type Conversions
Example: Date and Currency Formatting
Common Transformations
| Source Format | Target Format | Code |
|---|---|---|
"true" / "false" | true / false | v === true || v === "true" |
"123.45" | 123.45 | parseFloat(value) |
"active" | "ACTIVE" | value.toUpperCase() |
1704067200 (Unix) | ISO date | new Date(v * 1000).toISOString() |
"$1,234.56" | 1234.56 | parseFloat(v.replace(/[^0-9.-]/g, "")) |
null / undefined | "" | value || "" |
Step 4: Iterate Through Products
Add an Iterator action:- Input:
{{code.products}}
Step 5: Upsert Each Record
Inside the iterator, add an Upsert Record action:| Setting | Value |
|---|---|
| Object | Your custom Product object |
| Match by | External ID or SKU (unique identifier) |
| Name | {{iterator.item.name}} |
| SKU | {{iterator.item.sku}} |
| Price | {{iterator.item.price}} |
Example Use Cases
| Source | Data |
|---|---|
| ERP system | Product catalog, pricing, inventory |
| E-commerce platform | Orders, customers, product updates |
| Data warehouse | Aggregated metrics, enriched data |
| Inventory system | Stock levels, reorder alerts |