Help with Custom Function for Inventory -> ShipStation?

Help with Custom Function for Inventory -> ShipStation?

Hi everyone. I've made a function to try to move new salesorders in Zoho Inventory to shippable orders in ShipStation (based off an old CRM related one posted here), but I'm having issues now and I'm not entirely sure what the issue is. I'll attach my code here, does anyone have experience with such an integration? I'm passing in all the information from the new sales order as the similarly named parameters of the following function. There is also an example output from a Test & Debug attached.