Hi DW
We have a request from a client that want to use different unit of measures when calculating live prices. But it seems like the request for getting live prices is always using the base unit (in this case STK) when calculating prices.
The client have the following setup of unit and prices in BC:
1 KASSE - 400 base units - 35.000 DKK - Base unit price 87,5 DKK
1 PAKKE - 144 base units - 12.000 DKK - Base unit price 83,33 DKK
1 PALLE - 5000 base units - 400.000 DKK -Base unit price 80,00 DKK
1 STK - 1 base units - 90,00 DKK - Base unit price 90,00 DKK
When we execute a request for live prices we get the following request/response:
Request:
<GetEcomData AccessUserCustomerNumber="56222000">
<tables>
<Products type="filter" unitPrices="true">
<Product>
<ProductId>6127201390</ProductId>
<ProductVariantId></ProductVariantId>
<ProductNumber>6127201390</ProductNumber>
<ProductIdentifier></ProductIdentifier>
<CurrencyCode>DKK</CurrencyCode>
<Quantity>400</Quantity>
</Product>
</Products>
</tables>
</GetEcomData>
Response:
<?xml version="1.0" encoding="utf-16"?>
<tables version="1.2.0.19_NAV19.0.29884.32731">
<table tableName="EcomProducts">
<item table="EcomProducts">
<column columnName="ProductId"><![CDATA[6127201390]]></column>
<column columnName="ProductVariantId"><![CDATA[]]></column>
<column columnName="ProductIdentifier"><![CDATA[]]></column>
<column columnName="ProductNumber"><![CDATA[6127201390]]></column>
<column columnName="ProductPrice"><![CDATA[90]]></column>
<column columnName="ProductStock"><![CDATA[0]]></column>
<column columnName="ProductCurrencyCode"><![CDATA[]]></column>
<column columnName="ProductDefaultUnitId"><![CDATA[Unit_STK]]></column>
</item>
</table>
<table tableName="EcomPrices">
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[6127201390]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[56222000]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_KASSE]]></column>
<column columnName="PriceQuantity"><![CDATA[400]]></column>
<column columnName="PriceAmount"><![CDATA[90]]></column>
</item>
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[6127201390]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[56222000]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_PAKKE]]></column>
<column columnName="PriceQuantity"><![CDATA[144]]></column>
<column columnName="PriceAmount"><![CDATA[90]]></column>
</item>
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[6127201390]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[56222000]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_PALLE]]></column>
<column columnName="PriceQuantity"><![CDATA[5,000]]></column>
<column columnName="PriceAmount"><![CDATA[90]]></column>
</item>
<item table="EcomPrices">
<column columnName="PriceProductId"><![CDATA[6127201390]]></column>
<column columnName="PriceUserCustomerNumber"><![CDATA[56222000]]></column>
<column columnName="PriceProductUnitId"><![CDATA[Unit_STK]]></column>
<column columnName="PriceQuantity"><![CDATA[1]]></column>
<column columnName="PriceAmount"><![CDATA[90]]></column>
</item>
</table>
</tables>
This will calculate the prices based on the base unit (STK) and this correlates with BC standard. So if you create the following sales lines in BC will create the following prices:
- 400 base units = 36.000 DKK = 90 DKK pr. base unit
- 1 kasse = 400 base units = 35.000 DKK = 87,5 DKK pr. base unit.
So we need a way to calculate live prices based on unit of measure instead of base unit. Do we have any way to do that: I have checked the documentation here and cannot seem to find any way to control the unit of measure when calculating the price: https://doc.dynamicweb.com/documentation-9/integration/integration-framework-2/requests-responses#sideNavTitle1-3
Client is running BC Cloud version 19 with code unit version 1.2.0.19.
Best regards
Chris Søgaard