Hi everyone,
I’m hoping someone can help me with a problem I’m encountering while trying to integrate my Shopify store with my Fiken ERP system via Make.com. I’m trying to transfer order data, but I’m running into an issue where only the first order line item is being transferred to Fiken. The freight and discount information are transferring correctly, but I can’t seem to get all the product lines from a single order to populate in Fiken.
I’ve already searched the forum and tried various solutions involving arrays and other methods, but I’m still stuck. I’m hoping someone has encountered a similar issue and can offer some guidance.
Here’s a brief overview of my Make.com scenario:
- Shopify - Watch Orders: Triggers the scenario on new or updated orders.
- Shopify - Get an Order (Optional): Retrieves more detailed order information if needed.
- HTTP (Module 84): Retrieves customer information from Fiken based on the order details. This is working correctly and allows me to create the invoice for the correct customer with the appropriate due date.
- Iterator: Iterates through the order’s line items. (This is where I suspect the problem lies)
- Array Aggregator: Aggregates the line item data.
- HTTP: Sends the invoice data (including the aggregated line items) to Fiken.
I’m struggling to get the Iterator and Array Aggregator to work correctly to handle multiple order lines. Any help or suggestions would be greatly appreciated! If you need more details about my setup, please let me know.
Request content in HTTP Module:
{
“uuid”: “123e4567-e89b-12d3-a456-426655440000”,
“issueDate”: “{{formatDate(1.created_at; “YYYY-MM-DD”)}}”,
“dueDate”: “2025-02-25”,
“lines”: [
{
“description”: “{{77.array.name}}”,
“vatType”: “HIGH”,
“vatInPercent”: 25,
“productId”: “{{77.array.variant_id}}”,
“unitPrice”: {{sum(77.array.price / 1.25 * 100)}},
“incomeAccount”: “3000”,
“quantity”: {{77.array.quantity}}
},
{
“description”: “{{85.shipping_lines.title}}”,
“vatType”: “HIGH”,
“vatInPercent”: 25,
“productId”: “”,
“unitPrice”: {{sum(85.shipping_lines.price / 1.25 * 100)}},
“incomeAccount”: “3000”,
“quantity”: 1
},
{
“description”: “Rabatt: {{85.discount_codes.code}}”,
“vatType”: “HIGH”,
“vatInPercent”: 25,
“productId”: “”,
“unitPrice”: {{sum(1.total_discounts / 1.25 * -100)}},
“incomeAccount”: “3000”,
“quantity”: 1
}
],
“yourReference”: “{{85.payment_gateway_names}}”,
“orderReference”: “{{85.name}}”,
“ourReference”: “{{85.name}}”,
“customerId”: 1379326556,
“bankAccountCode”: “1920:10001”,
“currency”: “NOK”,
“cash”: “FALSE”
}