Hi there. I'm trying to make or find a custom function for making new orders to be shipped in ShipStation based off of incoming sales orders in Zoho Inventory. As my orders often have more than one product, I need to be able to move over multiline orders. I've started on a custom function to do so, but I'd need information on either what LineItems is an array of for shipStationItem assignment purposes or an example of someone else's similar custom function for this purpose. Basically, the issue I'm having is finding a parallell for:
for each CRMItem in CRMItems
{
CRMItem = CRMItem.toMap();
shipStationItem = Map();
shipStationItem.put("sku",CRMItem.getJSON("product").get("Product_Code"));
shipStationItem.put("name",CRMItem.getJSON("product").get("name"));
shipStationItem.put("quantity",CRMItem.get("quantity"));
shipStationItem.put("unitPrice",CRMItem.get("unit_price"));
shipStationItem.put("taxAmount",CRMItem.get("Tax"));
shipStationItems.add(shipStationItem);
}
using the information given by the Zoho Inventory 'New Sales Order' trigger from Zoho Flow.
Thanks for your time.