Having some trouble figuring out how to setup a Cu...
# general
a
Having some trouble figuring out how to setup a Custom Segment that sources it's value. We have Finished Good items & Component items, both of which could be an assembly or inventory item, we only use 1 form at the moment. A Component item is assigned to a leaf node on our Merchandise Hierarchy. For every 1 component, we could have tens of thousands of finished good options (size, colors, graphic, etc.) What I'm trying to do is, instead of assigning millions of finished good items to a leaf node on our Merchandise Hierarchy, I want to only assign the components to a leaf node, then create a custom segment on the Finished good that sources it's value from the component. Example: We sell a black Batman t-shirt which has a Bill of Materials component of "Large black t-shirt". We would assign that component to the leaf node "Shirts" on the merchandise hierarchy, but our end goal is to summarize our sales based on that Merchandise Hierarchy. Because we don't sell "Large black t-shirts", we only sell "Batman T-shirts", that means in order to figure out my "Shirts" sales, I would need to do one of the two, of which I'm trying to figure out a way to accomplish #2. 1. Assign "Batman T-shirt" to a leaf node on the hierarchy, along with every other possible combination of Design x Size x Color x SKU 2. Create a field on the finished good record, which sources the value from the component's Leaf Node. So in this case, the component is "Large Black T-shirt" which is assigned to "Shirts" leaf node, therefor the value here is "Shirts" For some reason I cannot figure out how to access the components on an item's BOM in the Custom Segment creation.
s
I would think you couldn't access the components given that it could be a one-to-many-to-many-to-many relationship. One item can have many BOMs, one BOM can have many revisions, and one revision can have many components. My gut reaction would be that you would have to script the update to the FG item based on the components
a
@Simon Whittle fair point
s
Use a saved search or n/query call, get the components from the primary BOM revision, pull the node, and write back. Not sure what you do if there are components in more than one node (I'm guessing there aren't)
a
I guess we can accomplish this with a saved search right?
s
I think you have to go suitescript but it would depend upon how linear and singular your assembly item builds are
a
Each finished good only has 1 BOM (not using advanced BOM's, so no revisions)
s
I suspect the saved search still can't drill far enough into the BOM to pull the components from the finished good. Even starting at the BOM I don't think you can get to the leaf node through the components
a
well, we also have a field we created called "Blank" which is intended to mirror the item on the bill of materials
so maybe we can have a field that validates the hierarchy node of the item that shows up in that field? The SQL version of what I'm saying is select i2.hierarchy_node from items i left join items i2 on i2.blank_id = i.item_id
s
I would think you still have to reference the BOM if "blank" is on the BOM. It would have to be something like "where bom.assemblyitem = item" and "bom.component.blank = item". From my experience the component only sits in the BOM table and there is no direct link between the assembly item and the components.
a
Right, but the field I'm referencing above kind of solves that. So the "Blank" item is on the BOM, but there's also a field we added to the body of the finished good called "Blank". In a perfect world that item should always = the item on the BOM, so maybe we can utilize that to eliminate the need to reference a bill of materials at all?
s
My point is that no matter how you tie the assembly item to the BOM the components are only attached to the BOM. So, yes, you can directly tie the FG item to a BOM using the blank field but you cannot tie the FG item to a component of the BOM using the same method
If you scripted this it would have to be: • give me BOM id where blank = item • give me component item id where bom id = bom id • give me leaf node where item = component item id
a
Sorry I'm not understanding how BOM is relevant still if we use a secondary field that also contains the name/id of the item we're looking for. In my example of a Batman t-shirt, yes the BOM contains a component called "Black L T-shirt", but we've also created a totally separate field on the body of finished goods where the user can also select "Black L T-shirt," or they could chose something totally different, so there's no link to the BOM other than the fact that the items are the same. Are we not able to then create a second arbitrary field called "Blank leaf node" that says lookup the hierarchy node of whatever item is in that first arbitrary field?
I appreciate the help! The BOM versions is a good point
s
If you're directly linking the fg item to the component then yes you can bypass the bom. Still you would probably have to script it given the leaf is still in the third data tier and I don't see that it's obtainable via a saved search