Comments (13)
This should work.
We should keep the quote.breakup too in the message.order. For example - There are 4 products in the /init call and for 1 product we may get quantity mismatch and for another one we may get price update error. It's better to cover these two scenarios in one /on_init request (quantity unavailable and price update can happen for the same product too).
As we have “@ondc/org/item-qty” in the quote.breakup object now, so BPPs can send the price according to available quantity and can mention the qty in this field too.
@BLR-0118 @nirmay any challenges if we add quote in this?
from ondc-protocol-specs.
@nirmay This is good.
So if i have to generalize this -
In case of this error - on_init the response will have the actual available quantities (less then or equal to what is asked In init).
So if requestor asks for 2 items , 3 quantity each , we could respond with -
[{ "id": "73661421", "quantity": { "count": 1 } },{ "id": "73661421", "quantity": { "count": 3 } },]
and an error for insufficient quantity.
This is right ?
from ondc-protocol-specs.
@EkanshKr While the order object can have multiple changes (prices, quantities) but error object today doesn't have a way to convey multiple errors. That would be a problem right.
@BLR-0118
from ondc-protocol-specs.
@nirmay This is good.
So if i have to generalize this -
In case of this error - on_init the response will have the actual available quantities (less then or equal to what is asked In init). So if requestor asks for 2 items , 3 quantity each , we could respond with - [{ "id": "73661421", "quantity": { "count": 1 } },{ "id": "73661421", "quantity": { "count": 3 } },] and an error for insufficient quantity.
This is right ?
In my proposal, the items array should include only those items that fail the inventory quantity check.
if buyer orders 10 items and 2 of them fail the check then only those are returned in the on_init response inside the items array.
from ondc-protocol-specs.
Does this cover if we have two error IDs , quantity error and price error , we will need to display multiple error messages for 2 different items in the same checkout page.
from ondc-protocol-specs.
Does this cover if we have two error IDs , quantity error and price error , we will need to display multiple error messages for 2 different items in the same checkout page.
good point, suggest you file a separate bug to address that.
from ondc-protocol-specs.
I am not sure but currently i don't think that we get any price update error object. Buyer app checks the price at their end and the price what we received in breakup object of /on_init response. do we need different error code for price update?
By Adding breakup object also in the case of quantity error , buyer app can check the price update and quantity in one /on_init response.
@nirmay @VidyaGF @mahoriR
from ondc-protocol-specs.
I was talking more of making the error object generic so that we can handle multiple errors and item-wise , so that anytime in future, different types of errors can be reported. Buyer app can read list of errors and make provision to display it appropriately to the user.
from ondc-protocol-specs.
@nirmay @mahoriR - agree that we can use this approach only to indicate inventory quantity check failing;
@EkanshKr - price update by seller - is that an error?
Suggest we go ahead with the original reason for which this issue was filed i.e. inventory quantity check failing. Not sure how we can handle multiple errors in the same error object?
from ondc-protocol-specs.
@nirmay @BLR-0118 @VidyaGF @mahoriR
sharing the on_init response for this issue as discussed with Supriyo and Mayuresh -
https://docs.google.com/document/d/19dHfFegVwWIYdnVvE8uUXPZsTl9MjOLjsUv8TAXU5Yw/edit?usp=sharing
from ondc-protocol-specs.
this should work. Can everyone enable this @nirmay @mahoriR @VidyaGF
Also, @EkanshKr - Paytm will have a generic error handler to show these types of messages?
from ondc-protocol-specs.
@BLR-0118 Yes Supriyo , we have generic error handler to show these messages and we are showing the other error messages like "delivery agent not available" , "price has been updated" through that handler only.
from ondc-protocol-specs.
If > 1 items in error, send an error code such as "mismatch between what is selected and what is available" and for Paytm / other buyer apps to highlight items where there is an issue. If this works, I can define the error code.
@EkanshKr @mahoriR @nirmay @VidyaGF @akil4n
from ondc-protocol-specs.
Related Issues (20)
- Data Encryption Model for Subscription
- Metro Ticket Integration | TTL understanding
- Metro Integration | Max Cap of quantity of ticket
- Need error code when store is off at the merchant. HOT 2
- Deferred on_confirm response HOT 1
- Allow buyer to provide special request options for F&B orders
- Add eway bill invoice no to on_confirm in logistics contract
- Regarding : Agent and Vehicle details HOT 1
- Error Code Required for Logistics Cancel - ShipRocket Team
- Add error code for merchant currently not taking orders HOT 1
- Flow for minimum cost for delivery HOT 1
- Need to finalize the values for status in items array in /update and /on_update in new retail contract HOT 2
- Incorrect Settlement Window Description in ONDC Protocol Retail
- New cancellation codes to be created HOT 5
- Requesting Bad Request Error Code for Logistics
- Change enums for Order, Logistics state HOT 1
- error code for throttled requests HOT 3
- new error code for the case of "SLA breach for not shipped" HOT 9
- Select and Init handling - What's the right way? HOT 3
- ONDC Buyer app Registeration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ondc-protocol-specs.