Coder Social home page Coder Social logo

Comments (13)

EkanshKr avatar EkanshKr commented on July 17, 2024

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.

mahoriR avatar mahoriR commented on July 17, 2024

@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.

mahoriR avatar mahoriR commented on July 17, 2024

@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 avatar nirmay commented on July 17, 2024

@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.

VidyaGF avatar VidyaGF commented on July 17, 2024

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.

nirmay avatar nirmay commented on July 17, 2024

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.

EkanshKr avatar EkanshKr commented on July 17, 2024

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.

VidyaGF avatar VidyaGF commented on July 17, 2024

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.

BLR-0118 avatar BLR-0118 commented on July 17, 2024

@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.

EkanshKr avatar EkanshKr commented on July 17, 2024

@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.

BLR-0118 avatar BLR-0118 commented on July 17, 2024

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.

EkanshKr avatar EkanshKr commented on July 17, 2024

@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.

BLR-0118 avatar BLR-0118 commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.