Developer forum

Forum » Integration » Problem importing sales prices from Business central

Problem importing sales prices from Business central

Johan Ulff
Reply

I have problems importing customer specific sales prices using Dynamicweb connector

I am using to following request where the AccessUserCustomerNumber is the actual customer number.

I only get the Unit price, not the price from Prices & Discounts, Sales Prices for the specific customer. What am I doing wrong? We are using version 1.2.0.10 of the Dynamicweb Plug-In Unit.

<GetEcomData AccessUserCustomerNumber="C00018">
  <tables>
    <Products type="filter" unitPrices="true">
      <Product>
        <ProductId>2130293</ProductId>
        <ProductVariantId></ProductVariantId>
        <ProductNumber></ProductNumber>
        <ProductIdentifier></ProductIdentifier>
        <CurrencyCode>SEK</CurrencyCode>
        <Quantity>1</Quantity>
      </Product>
    </Products>
  </tables>
</GetEcomData>

 


Replies

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Johan,
to get the product prices you need to run this request:
<GetEcomData><tables><ProductPrices type="all" salesType="Customer Price Group" salesCode="CPGB2C"/></tables></GetEcomData>
Possible parameters are:
salesType, salesCode, setLanguage, setCurrency, setUnitOfMeasure
SalesType can be of this values:
'Customer', 'Customer Price Group', 'All Customers', 'Campaign'

Kind regards, Dmitrij

 
Johan Ulff
Reply

Thanks! Are all possible parameters mentioned somewhere in the documentation for all possible requests? Could not find it.

/Johan

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Johan,
most of it is documented here:
Requests & Responses (dynamicweb.com)
Kind regards, Dmitrij

 
Johan Ulff
Reply

Ok, the documentation of the parameters is not very clear so there is room for improvement wink

I am trying with

<GetEcomData><tables><ProductPrices type="all" salesType="Customer Price Group" salesCode="S00006"/></tables></GetEcomData>

and S00006 is the price list code.

and

<GetEcomData><tables><ProductPrices type="all" salesType="Customer" salesCode="C00018"/></tables></GetEcomData>

and salesCode in this case is the Customer Id.

I am only getting the unit cost from the article card itself. What I really want is to get the lowest price available for a particular customer, when there are several price lists with the same article and different prices. Is this possible?

Regards Johan

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Johan,

the lowest price for the specific customer is retrieved from this request:
<GetEcomData ExternalUserId="CT002715" AccessUserCustomerNumber="C0000035">
  <tables>
    <Products type="filter">
      <Product>
        <ProductId>1900-S</ProductId>
        <ProductVariantId></ProductVariantId>
        <ProductNumber>1900-S</ProductNumber>
        <ProductIdentifier>1900-S..LANG1</ProductIdentifier>
        <CurrencyCode>GBP</CurrencyCode>
        <Quantity>1</Quantity>

      </Product>
    </Products>
  </tables>
</GetEcomData>
It was answered here: https://doc.dynamicweb.com/forum/integration/prices-from-live-integration-bc-cloud?PID=1605
Kind regards, Dmitrij

 
Johan Ulff
Reply

Still not working. It only takes the unit price for the article, not from the price list for the customer. I am not using the parameter ExternalUserId, but that parameter is optional 

<GetEcomData AccessUserCustomerNumber="C00018">
  <tables>
    <Products type="filter" unitPrices="true">
      <Product>
        <ProductId>2130293</ProductId>
        <CurrencyCode>SEK</CurrencyCode>
        <Quantity>1</Quantity>
      </Product>
    </Products>
  </tables>
</GetEcomData>

I think I need more help to solve this one. 

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

You need to check:
customer."Customer Price Group"
item."Base Unit of Measure"
Currency match the one from request and  Sales Prices table.
Also check start/end dates/other fields in the Sales Prices price matrix from BC that could cause the records to be skipped for this customer.

 
Johan Ulff
Reply

Still not working. For example, if I send the following request:

I get the response like this.

Which is fetched from unit price in BC:

...but it should fetch the unit price 31 from the sales price list "JX001" which is attached to customer C00018:

 

 

Still dont know what's wrong..

Regards Johan

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Are you using BC17 with a new Pricing feature enabled?

If yes, then you need to update your 1.2.0.9 extension to a newer version

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Aslo try to set the Item card Default Price to the value grater than the one from the custom prices, maybe it just takes the lowest one and use zero as it is the lowest

 
Johan Ulff
Reply

The new pricing feature is used, and we have now installed version 1.2.0.11 of the Dynamicweb D365 BC plugin unit from 1.2.0.10. I also changed the unit price to i higher value then the customer price list.

The response price is 35, not 31 as it should be from the price list. Still not working.

 

 
Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer
You need to install this one: https://doc.dynamicweb.com/Admin/Public/Download.aspx?File=Files%2FFiles%2FDownloads%2FIntegration%2FCode+Units%2FIntegration+v2+-+Dynamics+365+BC18+-+Dynamicweb+Plug-In+Unit+1.2.0.12+Runtime+Package.zip
Votes for this answer: 1
 
Johan Ulff
Reply

That seems to solve the issue. Thanks Dmitriy!

 

You must be logged in to post in the forum