Shopify to Fiken Integration - Only First Order Line Transferring

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:

  1. Shopify - Watch Orders: Triggers the scenario on new or updated orders.
  2. Shopify - Get an Order (Optional): Retrieves more detailed order information if needed.
  3. 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.
  4. Iterator: Iterates through the order’s line items. (This is where I suspect the problem lies)
  5. Array Aggregator: Aggregates the line item data.
  6. 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”
}

Welcome to the Make community!

In the HTTP module, it looks like you are directly mapping a value within an array. E.g.: 77.array.name, 77.array.quantity This means only the first item is used.

To allow others to assist you with your scenario, please provide the following:

Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Output Bundles of the Array Aggregator

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Expected JSON Example

Tell us how the “correct” JSON should look like. For more information, please refer to the external service’s API reference for the endpoint you are calling.

By providing these details, it will allow others to assist you better.

Hi Samliew and hx for your reply. Ive attached the files you asked for :slightly_smiling_face: When it comes to the API file from Fiken, it has some errors when importing to FIken - like date (2018) and the contactID and some other fields. The one attatched in the text works when it is one article, and ex one freight and/or discount. Problem is when there are more then one article. Like the one Ive have attached in the files. Then there are ex two invoices with the same article

api_from_fiken.txt (909 Bytes)
HTTP_74_Fiken.txt (1.8 KB)
array.txt (754 Bytes)
iterator.txt (4.2 KB)
HTTP_84.txt (3.1 KB)
Shopify_85.txt (23.9 KB)
Shopfiy_1.txt (4.6 KB)
blueprint_Shopify_Fiken.json (194.1 KB)