Solar price and balance API


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


NettoPriceArticle object : 


We are setting these two fields.



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

  1. accessKey
    1. Static access Key provided by solar
  2. soldTo 
    1. If supplier agreement is configured to get price info by solar API then we use a static number (Provided by solar) as a soldTo
    2. If customer is also configured to get the price info by Solar API then using the CustomerNumber as a soldTo
      1. It would override the supplier agreement settings
      2. But it is necessary to configure the supplier agreement as well
  3. articleList
    1. Sending a list of (Direct delivery) products which needs to get the price / balance info
  4. branchID
    1. 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.

  1. 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
    1. We have an option to set the price mode at supplier agreement
      1. Can set set to Extend, ExternalNetPrice, ExternalListPrice
  2. On Customer we have an option to set the price mode to decided which price needs to be fetched from Solar API
    1. We have these three options, in the Sales information section of Customer master data
    2. Customer settings should override the Supplier agreement settings
    3. In this case customer number should be used as a soldTo in the API call


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

  1. Customer order API
  2. Return order API