Hi - I am looking for some creativity.. I have a s...
# suitescript
g
Hi - I am looking for some creativity.. I have a scheduled script bringing in Sales Orders. If there is a kit item, it needs to be replaced with the component. But then when updating the order source, we must send the kit sku again any suggestions?
c
Custom field or custom record to remember the kit SKU
Or maybe a custom column on the line with the kit SKU
I'd go with the second option
Then when you loop through the items, you can see an item has a kit SKU, you send the kit SKU and add that item ID to an array. FOr every item you loop through, if you find another kit SKU, you check if that kit SKU exists in your array, if it does then you skip to the next item in the list.
We've done this sort of thing for ecommerce and WMS integrations.
d
That's definitely the way I'd go about it. Consideration to be made about how to handle the same Kit being ordered twice (on diff lines) of the order
b
id be more worried about shipping a partial kit
☝️ 1
c
Yes, you would have to be careful about shipping partial kits, easy enough to do if you send items to WMS that aren't associated with kits first then check the committed / backordered status of each kit component before sending. You'd want to see each item having a committed == qty (or whatever your criteria is) before sending a single item associated to a kit.