RE: Pull itemFulfillment using SalesOrder information

Using the REST API, how do I pull all related item fulfillments for a given sales order?

Ultimately I need the ship date, ship method, carrier and tracking number and quantity fulfilled for each fulfillment, so I can report these fulfillments to another system.

Quantity fulfilled is the only one I’ve been able to find in the sales order under items.

Add Comment
3 Answers
Best answer

Hello everyone. I’m a little late to the party, but I was quite disappointed to see such wacky responses here. There sure isn’t a lot of actual help for this being a NetSuite Professionals forum.

You can do this with SuiteQL. It is really straightforward.

SELECT *
FROM Transaction
INNER JOIN TransactionLine ON (TransactionLine.Transaction = Transaction.ID)
INNER JOIN Item ON (Item.ID = TransactionLine.Item)
WHERE Transaction.Type = 'ItemShip'
AND TransactionLine.CreatedFrom IN ({salesorder_ids})
GROUP BY Transaction.ID

This routine takes a set of SalesOrder internal ids and returns the ItemFulfillment associated with them. Simply replace {salesorder_ids} with (7129318,71290754) – or whatever your ids are. It can be one or more ids.

I also inner join TransactionLine and Item so I can have access to the item level detail for each element of that Transaction. This gives you everything you’d possibly need to work on for an ItemFulfillment operation.

I’m somewhat surprised there isn’t more consensus about this operation. In any event, there ya go. If anyone ever needs the ability to do this in the future, that is the way to do it.

Rookie Answered on April 15, 2021.

Thanks I really appreciate the response. I had similar thoughts as to how difficult it was to get useful information here, but I’m glad someone was able to give a clear, straightforward answer.

on April 15, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.