With the help of many within this community (thank you!), I’ve built an INCREDIBLY helpful scenario that searches for new orders in Shopify and, based on filters, extracts certain line items, places them into an array, adds a couple of extra shipping and handling costs not included on the Shopify order (extracted from a Xero get an item module) using JSON parsing/variables and finally creates a new purchase order in Xero. Here’s the flow…
And here’s an example of how that purchase order looks in Xero…
My question is this…
Our supplier gives us free economy 5-7 day delivery on orders containing physical products that total a value of over 100.
The basic question is, how do we tell Xero to set delivery to 0.00 IF the purchase order total is >= 100?
There are some complications, however:
In the screenshot above, you’ll see the order total is 96.24. However, the bottom 2 line items (“Tarpaflex handling fee” and “Tarpaflex delivery”) are not physical products and should not be included in the total value of the products. This makes the total for the purposes of the free shipping calculation is 48.13 + 7.36 + 16.22 = 71.71. So the more complex question is, how do we tell Xero to set delivery to 0.00 if the sum of the PHYSICAL products on the order (excluding shipping and handling costs) >=100 ?
Just to complicate things further let’s say we have a customer that specifically pays for express delivery at checkout which results in a Xero purchase order total >= 100. In the above scenario, this would set delivery on the purchase order to 0.00 free 5-7 day delivery. But since the customer has paid for express delivery, we need a rule in place that overrides the free delivery option and retains the express delivery charge so that our supplier knows to ship via an express service.
Any points on how I would go about achieving this would be greatly appreciated! I’ve learnt a lot over the last few weeks but am unsure where to start with this particular challenge!