Background
We have an integration with solar API for getting the price and balance info of direct delivery products.
Solar API function
Public Function PriceInformation(ByVal accessKey As String, ByVal soldTo As String, ByVal articleList() As NettoPriceArticle, ByVal branchID As Integer) As NettoPriceArticle()
Dim results() As Object = Me.Invoke("PriceInformation", New Object() {accessKey, soldTo, articleList, branchID})
Return CType(results(0),NettoPriceArticle())
End Function
We are using above PriceInformation function for getting the price and Balance info. We are only getting info of those products having stock status one of them (OnStock_CW Or OnStock_CW_Alternative Or OnStock_SGA) and ignoring the rest of the products in both cases (price and balance).
Input parameters of API call
- accessKey
- Static access Key provided by solar
- soldTo
- If supplier agreement is configured to get price info by solar API then we use a static number (Provided by solar) as a soldTo
- If customer is also configured to get the price info by Solar API then using the CustomerNumber as a soldTo
- It would override the supplier agreement settings
- But it is necessary to configure the supplier agreement as well
- articleList
- Sending a list of (Direct delivery) products which needs to get the price / balance info
- branchID
- Setting it to hard code value "0"
Usage and configuration in backend
We have implemented this new feature based on the Jira issue "https://jira.extend.se/browse/CS-26925" where we are getting the Netto price and list price of the direct delivery products.
This needs to be configured like this.
- Supplier agreement must needs to be configured to communicate with Solar API, Lead time provider must be set to "Solar" as shown in the image below
- We have an option to set the price mode at supplier agreement
- Can set set to Extend, ExternalNetPrice, ExternalListPrice
- On Customer we have an option to set the price mode to decided which price needs to be fetched from Solar API
- We have these three options, in the Sales information section of Customer master data
- Customer settings should override the Supplier agreement settings
- In this case customer number should be used as a soldTo in the API call
- We have these three options, in the Sales information section of Customer master data
When these prices could be fetched
While order booking from UI in backend if the product is Direct delivery and system is will configured based on info above the product price should be fetched via Solar API based on the settings like either Netto, List or both prices should be fetched.
This price would be displayed in the UI as shown below
These prices should be saved in the order when the order will be booked.
How to view these prices later
These prices can be fetched from extend via API's
- Customer order API
- Return order API