To get helpful responses
I’m integrating a discount code when importing orders to ShipStation from Shopify via Make.com.
Upon examining the order JSON from our primary Shipstation-connected store using the “get order” module, it appears the discount code should be incorporated as a line item.
I can add line items via the iterator & array aggregator modules. Here’s my current setup without the discount information:
[IMG - Whole Scenario]
[IMG - Iterator module ]
[IMG - Array Aggregator module ]
[IMG - ShipStation Create Order module ]
I’m facing challenges integrating the discount code as it’s structured differently. Can anyone guide me on combining line items and discount code lines into a singular array?
Your assistance would be invaluable!
Hi @scho ,
I have not encountered this exact problem, but I can see what you need. You are asking for a way to “artificially” create one more line item in your array when a discount code has been used.
First, I’d try to using the
add() function to create one more line item in the ShipStation Create Order Module. It would look something like this:
You’d need to specify the field “keys” (such as “itemName”) exactly as they appear when you hover over the results from the “Get Order” module (your second screenshot).
If that didn’t work, I’d instead try using a Repeater module instead of the Iterator module. This would allow you to create one more loop than you have items in your array. You could then use this extra loop to create your extra line item.
I hope that’s enough of a pointer to help you figure this out—it seems like you know what you’re doing! If you need more help, I can go into more detail.
Either way, let us know what works.
I cannot thank you enough for your insightful guidance!
Though initially, your recommendation to utilize the add() function within the Order Items and Repeater module methods didn’t hit the mark, it undoubtedly steered me towards the solution I needed!
Post several unsuccessful attempts, I integrated the add() functions within the Iterator, achieving success in incorporating the discount code into the array of line items.
However, I stumbled upon another hurdle…
The Iterator displayed only the line item, omitting the crucial discount code information (seemingly a limitation on Make.com’s end). To navigate this, I added an additional Iterator to establish a conditional function, as depicted below
This crucial step was the breakthrough I needed, culminating in the successful creation of an order.
I am immensely grateful for your assistance, Terry! Your expertise has been invaluable in this process, and your willingness to help has made a significant difference.
Thank you from the bottom of my heart
Hello there @scho
I just want to take a moment to say congrats on getting this up and running with the assistance of @Terry_Hopper
Also, thank you very much for stepping back in here in order to share your insights and the final setup. Your willingness to share this info is incredibly valuable and will undoubtedly be a great resource for others in the future. We truly appreciate your community spirit!