Kit components not populating QuoteDtl when pushing from REST

Hey All,

I’m having trouble getting the components of a sales kit to populate the QuoteDtl table when pushing the part to a quote via REST.

When I push the same sales kit to an order using the same technique (using REST), the kit components are automatically added to the OrderDtl table

When opening the quote (that has a sales kit as a line item) in the Quote Entry dashboard, I’m only able to get the sales kit to show as one, by adding a new line. Right when I add a new line to the quote, the sales kit receives an arrow and shows it’s components

As shown in the three images above, I’m able to get the sales kit components into the QuoteDtl table from adding a new line; I can delete the new line after. I’m also able to simply click the ‘Kit Details’ checkbox and save the quote to get the components to show.

With that, I enabled tracing, and logged the action of adding the new line. I was able to use the Epicor Trace Parser to find what was being used to update the QuoteDtl table with the sales kit’s components



With this, I’m not sure where to go from here in order to get the quote to follow the same behavior as the order in terms of showing/adding sales kit components onto the dtl table by simply passing the kits’ partnum to the quote via REST.

Any suggestion would be much appreciated!

I found something similar a while back. this is because Kits are handled special by the UI (if i remember correctly) and it calls an additional BO which explodes the kit. In addition to that, this additional UI will DELETE any kit items if you change the parent kit part number, and then re-add the new kit children.
So… you may need to run a trace to find out the BO that is run when you add a kit parent to an order.

Are you calling that get kit components? That’s the magic that generates them

1 Like

Hey Tim,

I have yet run a trace on the order ui. I was really hoping it was something as simple as an update to the REST api that my environment needs, given that the kit components are being added to the OrderDtl table right when the kit is added to the order through a REST POST (…/api/v1/Erp.BO.QuoteSvc/QuoteDtls). I would expect the similar REST call for QuoteDtl to act the same when passing a sales kit.

Hey Jose,

I’m doing this all from outside of Epicor’s UI, via a C# .Net Core web app. I do see in the trace logs (posted in initially), when I do any action that requires the UI to trigger a save, is when I believe the kit components are then loaded into the QuoteDtl table, and shown in the UI, which is where that get kit components is called

I’m trying to keep the site’s page controller as clean as possible, so if I can avoid having to write extra logic just to get the sales kits components using

and then

Would simply calling the /GetKitComponents() method invoke Epicor to add the kit components?

You should follow the trace to a T…
The Kit components are loaded when you call the GetKitsComponent() but I highly recommend you follow the trace… Seriously FOLLOW THE TRACE!!! 99.999999999% of the calls are not there just for fun they do things some small some large but most of the significant. (3)

1 Like

Thanks Jose!

I figured out how to clear the trace logs right before doing the action I wanted to trace, in my case adding the new line - which helped a ton!

As you called it, the magic is in the GetKitComponents() method call. For some reason, I wasn’t able to pinpoint which method was pulling in the actual dataset for the components. It was probably my error, since I was trying to use the Diff tab, and compare to previous method calls.

Instead I should have just looked at the GetKitComponents method and replicated exactly how the fields are passed here:

Simply passing my POST request body following how the fields were passed in that trace to the GetKitComponents() method fired the rest of the magic!

I was initially passing ‘true’ for the regenerateKit field, which could have been my downfall!

Thanks for the help, and an amazing little tool: Epicor Trace Parser <3

1 Like