How do I determine if a line item on a Sales Order is a component of a kit?

When I fetch a SalesOrderDetail in a logic block, what attribute or information would allow me to determine whether or not that line item is a kit component?

Hi Ian! Great question. The LineRelationshipType field on the SalesOrderDetail will tell you if the kit is a ‘PARENT’ or a ‘CHILD.’ Components are children.

If you are using a bundle (a nested kit), keep in mind that the kits within the kit are children to the main kit. In order to exclude these lines and only find the components of all kits, you will need to check if LineRelationshipType = CHILD and nwIsExpandable = FALSE.

Let me know if you have any questions!