Developer forum

Forum » Integration » Business Central - overriding prices on orders

Business Central - overriding prices on orders

Niels Foldager
Reply

Hi Dynamicweb,

We are working on a new integration between Dynamicweb and Business Central. When we send an order, the prices of the product order lines do not match the amounts we have in Dynamicweb. When the order is created in Business Central, the customer price in this system is applied to the order.

I'm familiar with the "ErpControlsDiscount" option, which only has something to do with discounts, but is there a setting in Dynamicweb LiveIntegration that can enable override pricing in Business Central? Or is it a setting in Business Central? 

Best regards
Niels Foldager


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Niels,
no, there is no such setting. When the order is created in BC with its own prices then those order and order lines prices should be send back to Dynamicweb in the response XML and then Dynamicweb should use the prices received from the BC - that is done in the Live Integration. You can browse for the logs in the Files/System/LiveIntegration folder, but ensure you have enabled Log Requests and Response content in the Live integration settings.
Maybe as an option you can try to import those customer specific prices to Dynamicweb so they can match.
Kind regards, Dmitrij
 

 
Niels Foldager
Reply

Hi Dmitriy,

We are using the setting "Only on Order Complete" in the live-integration add-in and we don't use the response (except the external orderid). We already has customers prices from Business Central imported in Dynamicweb. But we have some products (fees) whose prices are calculated in Dynamicweb. These products exists in Business Central with a zero price. If we want to use impersonation with override prices enabled, then it also would be a problem if prices coming from Dynamicweb are not applied to the order in Business Central. Can this only be achieved by extending the Dynamicweb plugin/codeunit?

Best regards
Niels Foldager

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Niels,
still can not answer, since it is not clear what you want to achieve. If you want to override the BC logic/prices which it applies on its order creation then it is probably not possible.
Kind regards, Dmitrij

 
Niels Foldager
Reply

Hi Dmitrij,

Ok, thanks for your reply. I hope in the future it will be possible to override the prices of the orders when they are transferred to Business Central by using an option in the Dynamicweb Live-Integration add-in in the same way as the "ErpControlsDiscount" setting. Right now we are going to investigate if it can be solved by extending the Dynamicweb plugin/codeunit.

Best regards
Niels Foldager

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Niels,
then you need to look on those subscribers:
DynamciwebOrdersPublisher.OnBeforeCreateOrderRequest
DynamciwebOrdersPublisher.OnBeforeUpdateSalesHeader
DynamciwebOrdersPublisher.OnBeforeCreateSalesLine
and choose among those events. You should be able to modify the sended order xml or BC SalesHeader or BC SalesLine
Kind regards, Dmitrij

 

You must be logged in to post in the forum