# Top level kit pricing distribution algorithm and logic blocks

**URL:** https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232
**Category:** Sales
**Created:** [September 23, 2025, 5:50pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232 "2025-09-23T17:50:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ian.p](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/ian.p/32/427_2.png) [@ian.p](https://community.nextw.com/u/ian.p)
#### Post date: [September 23, 2025, 5:50pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/1 "2025-09-23T17:50:28Z")

</div>

When a kit has a top level price of $17.31 and its components are

- 1 EA `ComponentA` individually priced at $2/EA - Total unit price $2
- 1 EA `ComponentB` individually priced at $3/EA - Total unit price $3
- 3 EA `ComponentC` individually priced at $5/EA - Total unit price $15

How should I expect that $17.31 price will get distributed among the components, and is there a base logic block I can call to get back that distribution given the above inputs?

---

<div class="post-metadata">

### Author: ![ian.p](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/ian.p/32/427_2.png) [@ian.p](https://community.nextw.com/u/ian.p)
#### Post date: [September 24, 2025, 4:45pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/2 "2025-09-24T16:45:12Z")

</div>

I tested the above kit configuration/price and what I saw is the platform distributes the prices as follows, and everything looks good/adds up as far as I can tell:

- 1 EA `ComponentA` individually priced at $1.72/EA - Total unit price $1.72
- 1 EA `ComponentB` individually priced at $2.60/EA - Total unit price $2.60
- 3 EA `ComponentC` individually priced at $4.33/EA - Total unit price $12.99

Still interested in what logic block is doing these calculations and how it all works so I can leverage that logic outside of creating a Sales Order in the UI if possible.

---

<div class="post-metadata">

### Author: ![ross](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/ross/32/144_2.png) [@ross](https://community.nextw.com/u/ross)
#### Post date: [September 24, 2025, 4:59pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/3 "2025-09-24T16:59:39Z")

</div>

I took a quick look and it seems that `CalculateTotalAmountsForSalesOrderDetailKits`handles those calculations. That logic works completely differently than the calculation logic for the `Landed Costs` module, but it’s essentially the same premise: take some total amount and distribute it across many detail lines based on some allocation method.

It appears that there’s two methods supported in the kit pricing logic - data item KitPricingIO has values Roll Up and Top Down. Don’t know the inner workings, but it seems like based on those, calculations distribute differently per-detail and then the logic handles any rounding errors.

---

<div class="post-metadata">

### Author: ![dave.anderson2](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/dave.anderson2/32/331_2.png) [@dave.anderson2](https://community.nextw.com/u/dave.anderson2)
#### Post date: [October 14, 2025, 2:26am UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/4 "2025-10-14T02:26:49Z")

</div>

Thanks Ross. If the kit contains quantity 7 of a single item, and the top-level price is $10, there is no unit price that will add up to $10. Do you know if the logic splits the original one item with quantity 7 into into an item with quantity 6 with one unit price, and an item with quantity 1 with a different unit price when adding the kit to a Sales Order?

---

<div class="post-metadata">

### Author: ![ross](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/ross/32/144_2.png) [@ross](https://community.nextw.com/u/ross)
#### Post date: [October 14, 2025, 3:22pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/5 "2025-10-14T15:22:11Z")

</div>

Please take with a grain of salt - I’m not a subject matter expert for kits.

My expectation would be that all 7 of the same item are kept together unless there’s a reason that part of the inventory would be priced differently (for example, of the 7 units, 6 were sourced from one Lot and the other was sourced from a different Lot, which may have different prices). That kind of split is unlikely until attempting to hard commit, though.  
It likely isn’t a problem that $10 doesn’t evenly divide into 7, as the system can store a unit price with more precision ($1.4286 or $1.43) and then round as necessary. I believe that the sales order can capture any rounding discrepancy and fix it dynamically.

---

<div class="post-metadata">

### Author: ![ian.p](https://sea1.discourse-cdn.com/flex001/user_avatar/community.nextw.com/ian.p/32/427_2.png) [@ian.p](https://community.nextw.com/u/ian.p)
#### Post date: [October 14, 2025, 3:39pm UTC](https://community.nextw.com/t/top-level-kit-pricing-distribution-algorithm-and-logic-blocks/1232/6 "2025-10-14T15:39:45Z")

</div>

@dave.anderson2 confirmed on @ross’s diagnosis in a test I just did.

Your example gets handled by the system as 7 @ 1.43 for a Gross of 10.00 on a single line even though 7 \* 1.43 is technically 10.01.

 ![image](https://us1.discourse-cdn.com/flex001/uploads/nextworld/original/1X/2aad0bc899bf403fd31f859020171c767ad70d34.png)
