Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046055Retail ModulesRetail APIpublic2021-03-11 16:112021-03-16 12:08
AgatheBertin 
ranjith_qualiantech_com 
normalmajorhave not tried
closedinvalid 
5
 
 
marvintm
No
0046055: API Discounts - issues found
We found some things not working well with the discount API :

1 - The new promotions “Price Adjustment by Product” and “Fixed overall percentage” seems to not working fine : I think the new subtabs are not taken into account correctly

2 - The filter "Organization" is not working fine also. When I use a ticket on an organization different from the one included in the promotion, the discount is still applied

3 - We still have an issue with some promotions, you'll see, if in the postman collection you change the date and put one neared from today, the call fails.

4 - For the customers, we use the reference number in the business partner as the Norauto customer ID. As the search key is automatically generated by OB when we create a BP, it is actually no relevant for identify a customer for Norauto so we have here 2 solutions :
=> The better for me should be to be able to use the reference number in the API
if it's not possible, we'll have to change the customer integration in Norauto.


5 - For sure, we have the performance issue
1. Create a promotion "Price Adjustement by Product", Included Products = Only those defined and add a product to the subtab products.
Expectation : the promotion is applied when calling the API
Result : no promotion applied
==> to be checked for all new subtabs.


2. Create a promotion (not matter which type) with Included Organizations = Only Those defined and set 1 organization (A)
Do a call with an organization A , the promotion should be applied
Do a call with B, the promotion shouldn't be applied but is applied anyway


3. if you put a date in 2021 in the API call, it doesn't work we have to use a date in 2020 instade.


4. use a new field in the API call : referenceno
Postman collection up to date attached
No tags attached.
related to defect 0046086 closed ranjith_qualiantech_com Organisation filter is not properly applied when using the Discounts webservice 
related to defect 0046087 closed ranjith_qualiantech_com Date filter is not properly applied when using the Discounts webservice 
Issue History
2021-03-11 16:11AgatheBertinNew Issue
2021-03-11 16:11AgatheBertinAssigned To => Retail
2021-03-11 16:11AgatheBertinTriggers an Emergency Pack => No
2021-03-11 17:25wicherrNote Added: 0126632
2021-03-15 08:57ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-03-16 11:04hgbotNote Added: 0126722
2021-03-16 11:04hgbotNote Added: 0126723
2021-03-16 12:05marvintmRelationship addedrelated to 0046086
2021-03-16 12:05marvintmRelationship addedrelated to 0046087
2021-03-16 12:06marvintmReview Assigned To => marvintm
2021-03-16 12:06marvintmNote Added: 0126724
2021-03-16 12:06marvintmStatusnew => closed
2021-03-16 12:06marvintmResolutionopen => invalid
2021-03-16 12:08hgbotNote Added: 0126725
2021-03-16 12:08hgbotNote Added: 0126726

Notes
(0126632)
wicherr   
2021-03-11 17:25   
EDIT Steps to reproduce :

1/
a) Price adjustement by product
- Create a promotion "Price Adjustement by Product"
- Products filter = All excluding defined
- In "Product" (not "Products") : add a product with a specific price (field "discount price"
- No other filters
=> Call the discount API with the product in "Product" tab
=> the promotion will not apply despite it should


b) seen with "Fixed overall percentage" but all the promotions have the same behavior
Prerequis : You should have at least 1 BP with a loyalty card

- Create a promotion (better with "Fixed overall percentage" type)
- Loyalty program filter = Only those defined
- In "Loyalty program" tab : add the program and the category of the BP (see prerequis)
- No other filters needed
- Call the discount API with the business partner set in the promotion
=> The promotion will apply
- Call the discount API with another customer
=> The promotion will apply instead of not


2/
- Create a promotion (not matter which type) with Organization filter = "Only Those defined" and set 1 organization (A) in the tab
Do a call with the organization A , the promotion should be applied
Do a call with an organization B, the promotion shouldn't be applied but is applied anyway

3/
Behavior in "Norauto" (not sure it's in live build)
When we call the API with the current date, it fails. To work, the date in the body has to be set to beggining of 2020)


4/
Feature request : We should be able to call the API using the referenceNo of the business partner. The searchkey stay OB internal but the reference number references the BP external ID used by our customers (at least for Norauto).

A postman collection has been sent to Antonio with some API calls working on Norauto Test server.
(0126722)
hgbot   
2021-03-16 11:04   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/19 [^]
(0126723)
hgbot   
2021-03-16 11:04   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts/-/merge_requests/3 [^]
(0126724)
marvintm   
2021-03-16 12:06   
This issue is actually reporting different things, and some of them only apply to custom code. We are closing this issue, and we will be resolving the standard-related problems as part of the following two issues:

https://issues.openbravo.com/view.php?id=46086 [^]
https://issues.openbravo.com/view.php?id=46087 [^]
(0126725)
hgbot   
2021-03-16 12:08   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/19 [^]
(0126726)
hgbot   
2021-03-16 12:08   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts/-/merge_requests/3 [^]