ONDC-Official / v1.2.0-logs

Retail and Logistics Logs for 1.2.0
9 stars 248 forks source link

Plotch (Seller App - RET12) - Compliance check #130

Closed sahil-ondc closed 6 months ago

sahil-ondc commented 10 months ago

search_inc_refresh

on_search_full_catalog_refresh

on_select

init

on_confirm

common

@dileswar patnaik

dileswarp commented 9 months ago

@sharmasahil0331 Please review the PR https://github.com/ONDC-Official/v1.2.0-logs/pull/179, as per feedback changes done all above points.

dileswarp commented 9 months ago

As Per feedback Group B flow added Please review https://github.com/ONDC-Official/v1.2.0-logs/pull/196 @sharmasahil0331 @bluecypher

sahil-ondc commented 9 months ago

on_search_full_catalog_refresh

on_select

on_init

on_confirm

Suggestive changes

on_search_full_catalog_refresh

@dileswarp

dileswarp commented 9 months ago

As per above feedback changes has done. Please review and share the feedback . https://github.com/ONDC-Official/v1.2.0-logs/pull/300 @sahil-ondc @bluecypher .

one doubt: /message/catalog/bpp/providers/items/quantity/available/count must be equal to one of the allowed values (99,0) in this we have to show only available count as per inventory. Please advice

BLR-0118 commented 8 months ago

checked flows 1, 2, 3 with Plotch buyer app & issues noted here;

Flow 4 & 5 for cancel & RTO are incorrect - every cancel request creates a separate fulfillment of type "Cancel" or "RTO" and items assigned to forward shipment fulfillment are zero'd out & new entries created for items to be assigned to the Cancel / RTO fulfillment. Each such fulfillment will also have a quote trail to keep track of the reduction in order value (and hence refund) due to the cancellation / RTO. Check the details here

BLR-0118 commented 8 months ago

@dileswarp

dileswarp commented 8 months ago

@BLR-0118 As per above feedback shared the updated logs , please review and share the feedback https://github.com/ONDC-Official/v1.2.0-logs/pull/450

BLR-0118 commented 8 months ago

Flow 1

  1. /on_search:

    • item attributes should exist in this list;
    • following attr don't exist: brand_name (should be "brand"), net_quantity, back_style;
    • bpp/fulfillments.id doesn't match fulfillment.id (fulfillment_id "1" is defined in former, not latter);
    • item.id & parent_item_id shouldn't be same, as in this case - 1121525415, 1121525504;
    • variant name (categories.descriptor.name) should be meaningful text (e.g. "Size") instead of the id;
    • why are 2 variants defined for the same category (1121525415, 1121525504) with the exact same attributes & sequence?
  2. /incremental_catalog_refresh_search:

    • full catalog response timestamp is at 06:21 while incremental catalog pull is from 4AM to 6AM. Since the full catalog pull will have the response as of 06:21, what does the incremental pull duration mean?
    • do you support incremental updates thru push?
  3. incremental catalog responses:

    • provider updates not yet supported in incremental update;
    • are you using these http headers in response?
    • all incremental responses (item disable, provider disable / enable, etc.) have different transaction_ids: these are in response to which incremental catalog request?
    • for fashion, most common would be item going out of stock - request you to share incremental update with only this use-case;

Flow 2

  1. /on_select:

    • item.quantity.available.count & maximum.count have default values of "99" in /on_search (this is correct & means in-stock, no cap per order respectively);
    • here, it's changed to "52": what does this mean?
  2. /on_init:

    • remove cancellation_terms as it's not yet enabled;
    • payment collected by "BAP" (buyer app) means everything in payment object (other than settlement_details, finder fee type & amount) will be filled up here & whatever you've filled up here will be provided by buyer app in /confirm;
  3. /confirm, /on_confirm:

    • fulfillment."@ondc/org/TAT" was "P4D" in /on_select but is "PT60M" here & all /on_status APIs - how?
    • item.quantity.available.count & max count shouldn't be here;
    • fulfillment id is "F1" but quote.breakup.item_id for delivery is "1" here & all /on_status APIs - how?
    • remove everything in bpp_terms except tax_number;
    • keys in bap_terms are invalid (/confirm);
    • only include tax_number in bap_terms (/confirm);
    • since payment.status is PAID, payment.params.transaction_id should have the valid UTR for payment (/confirm);
  4. /on_status_packed (applies to other /on_status APIs):

    • fulfillment status is packed but delivery & pickup time (fulfillment.end.time.timestamp, start.time.timestamp) are provided - how?
    • pickup & delivery time can't be same;
    • remove authorization & instructions block;
    • fulfillment.id was "F1" until /on_confirm but changed to "86158919" here - how?
    • when order is picked up, the seller invoice (for buyer) should also be attached;
  5. Tracking APIs:

    • for intercity shipments, tracking is URL based, never using gps_coordinates;
    • if /on_track is called, it should return the URL;
    • to optimize processing, you should set the following in /on_status for the fulfillment as explained here: url_enabled to yes, url to tracking URL;

Flow 3

  1. /on_select: why is fulfillment state non serviceable?
  2. pls share the complete flow up to confirm of order as explained in test scenarios here;

Flow 4, 5

  1. /on_cancel:

    • fulfillment type is invalid should be "Cancel";
  2. Flow 5 should simulate RTO flow as explained here, using reason code that triggers RTO;

  3. request you to also add precancel_state for forward shipment fulfillment, in case of cancellations;

Flow 6 - pls also share log for this flow as it's required for fashion;

BLR-0118 commented 8 months ago

@dileswarp - you don't need to submit separate logs for buyer app & seller app, you can just share 1 set of logs for both;

dileswarp commented 8 months ago

Flow 1

  1. /on_search:
  • item attributes should exist in this list;
  • following attr don't exist: brand_name (should be "brand"), net_quantity, back_style; Done
  • bpp/fulfillments.id doesn't match fulfillment.id (fulfillment_id "1" is defined in former, not latter); Done
  • item.id & parent_item_id shouldn't be same, as in this case - 1121525415, 1121525504; As discussed no need to change
  • variant name (categories.descriptor.name) should be meaningful text (e.g. "Size") instead of the id; Done
  • why are 2 variants defined for the same category (1121525415, 1121525504) with the exact same attributes & sequence? : Done
  1. /incremental_catalog_refresh_search:
  • full catalog response timestamp is at 06:21 while incremental catalog pull is from 4AM to 6AM. Since the full catalog pull will have the response as of 06:21, what does the incremental pull duration mean? Done
  • do you support incremental updates thru push? Yes, Shared the search payload
  1. incremental catalog responses:
  • are you using these http headers in response? Yes
  • all incremental responses (item disable, provider disable / enable, etc.) have different transaction_ids: these are in response to which incremental catalog request?
  • for fashion, most common would be item going out of stock - request you to share incremental update with only this use-case; As discussed we shared the Out Of stock incremental paylaod

Flow 2

  1. /on_select:
  • item.quantity.available.count & maximum.count have default values of "99" in /on_search (this is correct & means in-stock, no cap per order respectively);
  • here, it's changed to "52": what does this mean? Done
  1. /on_init:
  • remove cancellation_terms as it's not yet enabled; Done
  • payment collected by "BAP" (buyer app) means everything in payment object (other than settlement_details, finder fee type & amount) will be filled up here & whatever you've filled up here will be provided by buyer app in /confirm; Done
  1. /confirm, /on_confirm:
  • fulfillment."@ondc/org/TAT" was "P4D" in /on_select but is "PT60M" here & all /on_status APIs - how? Done
  • item.quantity.available.count & max count shouldn't be here; Done
  • fulfillment id is "F1" but quote.breakup.item_id for delivery is "1" here & all /on_status APIs - how? Done
  • remove everything in bpp_terms except tax_number; Done
  • keys in bap_terms are invalid (/confirm); Done
  • only include tax_number in bap_terms (/confirm); Done
  • since payment.status is PAID, payment.params.transaction_id should have the valid UTR for payment (/confirm); Done
  1. /on_status_packed (applies to other /on_status APIs):
  • fulfillment status is packed but delivery & pickup time (fulfillment.end.time.timestamp, start.time.timestamp) are provided - how? Done
  • pickup & delivery time can't be same; Done
  • remove authorization & instructions block; Done
  • fulfillment.id was "F1" until /on_confirm but changed to "86158919" here - how? Done
  • when order is picked up, the seller invoice (for buyer) should also be attached; Done(added)
  1. Tracking APIs:
  • for intercity shipments, tracking is URL based, never using gps_coordinates; Done
  • if /on_track is called, it should return the URL; Done, Please review
  • to optimize processing, you should set the following in /on_status for the fulfillment as explained here: url_enabled to yes, url to tracking URL;

Flow 3

  1. /on_select: why is fulfillment state non serviceable? We shared the non serviceable and Out of stock payload please review
  2. pls share the complete flow up to confirm of order as explained in test scenarios here;

Flow 4, 5

  1. /on_cancel:
  • fulfillment type is invalid should be "Cancel"; Done
  1. Flow 5 should simulate RTO flow as explained [here] (https://docs.google.com/document/d/1brvcltG_DagZ3kGr1ZZQk4hG4tze3zvcxmGV4NMTzr8/edit#heading=h.p49oiq6osp4), using reason code that triggers RTO; Shared the RTO flow , Please review
  2. request you to also add precancel_state for forward shipment fulfillment, in case of cancellations;

Flow 6 - pls also share log for this flow as it's required for fashion; Added Please review

as per feedback updated the coded please review the PR https://github.com/ONDC-Official/v1.2.0-logs/pull/503

@BLR-0118 Sir , @bluecypher

BLR-0118 commented 8 months ago

Flow 1

  1. /on_search (full, incremental):
    • item attribute "colour" value should be hex code;
    • not clear what exactly is the incremental update sent in incremental_on_search.json?

Flow 2

  1. /on_init:

    • from where is bap_terms coming? this wasn't sent in /init;
  2. /on_confirm:

    • remove cancellation_terms (as this isn't yet enabled);
  3. /on_track:

    • to optimize, can you pls update "url_enabled", "url", "gps_enabled" (as applicable) in /on_status as doc here;
    • both gps & url are being updated in /on_track (picked up) (typically, for non-hyperlocal, only url tracking is used); any scenario where both may be used?

Flow 3

  1. /on_select (non serviceable):
    • why is fulfillment tracking "true" when not serviceable?
  2. why is transaction_id changing between /select (non serviceable) to /select (out of stock)?

Flow 4

  1. /on_cancel:
    • quote.breakup shows unit price of item changed to 0 but qty remaining 1; this is wrong (item price remains as is, qty becomes 0);
    • request to add precancel_state to fulfillment;

Flow 5

  1. /on_cancel:
    • invalid key channel_id;
    • quote trail is wrong (item should be -2000 as that's the cost being reduced from the order for refund to buyer);
    • also include only quote line items that have changed, as a result of this RTO, in quote trail;
    • all other issues for flow 4 also apply;

Flow 6

  1. /on_update (merchant cancelling 1 item):

    • cancel_request missing in F1-cancel;
    • F1-Cancel includes attrs such as location, TAT, etc. which aren't relevant (check here how it should be constructed);
    • pickup & delivery time provided for forward shipment fulfillment even though fulfillment state is Pending;
  2. /on_update: return initiated:

    • /on_update should have same message_id as /update;
    • why is quote breakup for item *5416 split into 2 with exact same details? return picked:
    • message_id can't be same as /on_update for return initiated;
    • updated quote shows total value for order as 0 when it should be 1000;
    • no log for return approved?
BLR-0118 commented 8 months ago

@dileswarp - pls fix the above & reshare logs for flow 4, 5, 6

dileswarp commented 8 months ago

@BLR-0118 Sir, as Suggested fixed the code and resubmitted the log for flow 4, 5 , 6 , please review https://github.com/ONDC-Official/v1.2.0-logs/pull/530

BLR-0118 commented 8 months ago

flow 4

  1. /on_confirm:

    • pls send provider_tax_number for the BNP to verify MSN/ISN;
  2. /on_cancel:

    • no precancel_state?
    • quote.breakup here shows tax / packing charge, etc. with 0 value but these weren't present in /on_confirm;
    • cancel_request should only be in the fulfillment being cancelled (i.e. F1, not F1-cancel);

flow 5

  1. same issues as above;
  2. /on_status: tracking optimization attrs (mentioned under flow 2 above) not showing here, even though you wrote that this is fixed;
  3. /on_update (merchant cancel):
    • from quote_trail, it seems 2 qty is being cancelled but from quote.breakup & items[], only 1 qty is being cancelled;
    • even if multiple qty of same item is being cancelled, you can put in single entry in quote_trail;
    • F1-cancel is a logical fulfillment, so what does TAT / tracking mean for this?
  4. /on_update (return):
    • fulfillment id should match the return request id sent;
  5. /on_update (return picked):
    • quote_trail missing from return fulfillment;
    • what's this order.documents attached - this should be attached when the forward shipment fulfillment is picked up from warehouse;
BLR-0118 commented 8 months ago

@dileswarp - pls fix above & resubmit; also, how to verify that issues mentioned for flows 1 to 3 are actually fixed since a fix would have shown up in these logs;

dileswarp commented 8 months ago

@BLR-0118 SIr, Please review the updated PR as per feedback https://github.com/ONDC-Official/v1.2.0-logs/pull/567

flow 4

/on_confirm:

pls send provider_tax_number for the BNP to verify MSN/ISN; txn_id: 1697abc7-a39a-4e6b-a2b5-81f4aa1da25a(For reference) Added: "tags": { "code": "bpp_terms", "list": [ { "code": "tax_number", "value": "27GGFEE8726Q1ZZ" }, { "code": "np_type", "value": "MSN" }, { "code": "provider_tax_number", "value": "CEHPJ3454L" } ] }

/on_cancel:

no precancel_state? txn_id: 1697abc7-a39a-4e6b-a2b5-81f4aa1da25a

"tags": [ { "code": "cancel_request", "list": [ { "code": "reason_id", "value": "001" }, { "code": "initiated_by", "value": "ondc.ondcstore.com" } ] }, { "code": "precancel_state", "list": [ { "code": "fulfillment_state", "value": "Pending" }, { "code": "updated_at", "value": "2024-01-17T13:34:39.000Z" } ] } ]

quote.breakup here shows tax / packing charge, etc. with 0 value but these weren't present in /on_confirm; Added the condition to show the fields which has value on post order steps

cancel_request should only be in the fulfillment being cancelled (i.e. F1, not F1-cancel); Done Sir

FLOW 5

/on_status: tracking optimization attrs (mentioned under flow 2 above) not showing here, even though you wrote that this is fixed; Txn_id: b7942297-1ade-4d63-8781-c8b0075513d3 "tags": [ { "code": "tracking", "list": [ { "code": "gps_enabled", "value": "no" }, { "code": "url_enabled", "value": "yes" }, { "code": "url", "value": "https://track.ondc.cloud/?track=b7942297-1ade-4d63-8781-c8b0075513d3" } ] } ]

/on_update (merchant cancel): Txn_id: b727c31e-21c5-4936-94cb-9008dcf0f834 from quote_trail, it seems 2 qty is being cancelled but from quote.breakup & items[], only 1 qty is being cancelled; Done Sir F1-cancel is a logical fulfillment, so what does TAT / tracking mean for this? Done(Removed the fields in Cancel)

/on_update (return): txn_id: b7942297-1ade-4d63-8781-c8b0075513d3 fulfillment id should match the return request id sent; As suggested Done

/on_update (return picked): quote_trail missing from return fulfillment; Done Sir

what's this order.documents attached - this should be attached when the forward shipment fulfillment is picked up from warehouse; Done Sir

BLR-0118 commented 7 months ago

Flow 6

  1. return with pickup flow is incorrect:
    • at the refund trigger point, the item (for return) is assigned to the return fulfillment & quote adjusted with proper quote trail;
    • in your case, this is happening at return_initiated itself;

can you pls resubmit flow 6 with the same order for both a & b:

also, for flow 3 (/on_select out-of-stock):

BLR-0118 commented 7 months ago

@dileswarp - pls fix & resubmit flow 6 (explained above) & confirm the fix for flow 3 (explained above);

dileswarp commented 7 months ago

@BLR-0118 Sir Fixed the above code, Please review and share the feedback https://github.com/ONDC-Official/v1.2.0-logs/pull/625 Flow 6 return with pickup flow is incorrect: Fixed at the refund trigger point, the item (for return) is assigned to the return fulfillment & quote adjusted with proper quote trail; in your case, this is happening at return_initiated itself;

can you pls resubmit flow 6 with the same order for both a & b:

create an order; from this order, merchant cancels 1 or more items; from the same order, buyer initiates return (with pickup);

As suggested logs has been submitted for merchant and return cases in same order. Please review

for flow 3 (/on_select out-of-stock):

put the key & value inside escaped double quotes as shown [here]: Shared the logs please review.(https://docs.google.com/document/d/1brvcltG_DagZ3kGr1ZZQk4hG4tze3zvcxmGV4NMTzr8/edit#heading=h.c6o4dr7q1ywl);

BLR-0118 commented 7 months ago

flow 6

  1. fulfillment.start.time.range (pickup slot) & fulfillment.end.time.range (delivery slot) needs to be used correctly; in /on_confirm, both are same and this isn't present in /on_update (merchant cancel & other usecases);
  2. reason code used for merchant part-cancel is "005" but this isn't valid for part cancel as per this list;
  3. quote_trail (for merchant cancel, return pickup) doesn't include the delivery charge which is being reduced from order value & being refunded;
BLR-0118 commented 7 months ago

@dileswarp

dileswarp commented 7 months ago

@BLR-0118 Sir, Please review our updated log https://github.com/ONDC-Official/v1.2.0-logs/pull/632

  1. fulfillment.start.time.range (pickup slot) & fulfillment.end.time.range (delivery slot) is optional in on_confirm : We have removed the field.
  2. reason code used for merchant part-cancel is "005" but this isn't valid for part cancel as per this list;: Updated as per List
  3. quote_trail (for merchant cancel, return pickup) doesn't include the delivery charge which is being reduced from order value & being refunded; Added the block {"code": "quote_trail", "list": [{"code": "title_type", "value": "delivery"}, {"code": "id", "value": "F1"}, {"code": "currency", "value": "INR"}, {"code": "value", "value": "-50.00"} ] }
BLR-0118 commented 7 months ago

@dileswarp - all logs have to be submitted for flows 6 a & c; you can't just pick & choose logs to submit

dileswarp commented 7 months ago

@BLR-0118 Sir, Please review the PR https://github.com/ONDC-Official/v1.2.0-logs/pull/729, all logs had submitted for flow 6 a & c.

BLR-0118 commented 7 months ago

flow 6

  1. /on_confirm:

    • following keys in payment needs to be provided by buyer NP (not seller NP): withholding_amount, settlement_window, settlement_basis;
  2. /on_cancel (merchant):

    • why is new title_type "misc" with 0 value added to quote?
  3. /on_status (packed):

    • delivery slot range is 4 days (5th to 8th Feb) & pickup slot range is 1 day (5th to 6th Feb);
    • since TAT is 4 days & assuming the pickup slot is correct, shouldn't delivery slot be 9th to 10th Feb?
  4. /on_status (picked up):

    • why is delivery time is updated here?
  5. /on_status (delivered):

    • delivery time updated (different from 4 above);
    • difference between delivery time & pickup time is 30 mins but TAT provided was 4 days;
  6. /on_track is solicited call but message_id for /on_track is different from /track;

  7. /return_approved:

    • remove channel_id;
    • return request is placed at 9:15 on 5th Feb (Context.timestamp) but pickup time slot is 5th Feb (8:21) to 6th Feb (8:21), i.e. the from is earlier than the return request time?
  8. /return_picked_up:

    • return pickup time is 8:26 on 5th Feb, which is earlier than the delivery time (/on_status_delivered) or return request time;
    • items array should have an entry showing qty for the forward shipment fulfillment is 0;
BLR-0118 commented 7 months ago

@dileswarp

dileswarp commented 7 months ago

@BLR-0118 Sir, Please review the updated PR as per above feedback https://github.com/ONDC-Official/v1.2.0-logs/pull/778

/on_confirm: following keys in payment needs to be provided by buyer NP (not seller NP): withholding_amount, settlement_window, settlement_basis; Done

/on_cancel (merchant): why is new title_type "misc" with 0 value added to quote? Done

/on_status (packed): delivery slot range is 4 days (5th to 8th Feb) & pickup slot range is 1 day (5th to 6th Feb); since TAT is 4 days & assuming the pickup slot is correct, shouldn't delivery slot be 9th to 10th Feb? Done

/on_status (picked up): why is delivery time is updated here? Done

/on_status (delivered): delivery time updated (different from 4 above); difference between delivery time & pickup time is 30 mins but TAT provided was 4 days; note: In order to submit log for verification, created and order was marked as delivered on sameday even though TAT was 4 day.

/on_track is solicited call but message_id for /on_track is different from /track; note: By mistake log for another transaction was submitted

/return_approved:

remove channel_id; return request is placed at 9:15 on 5th Feb (Context.timestamp) but pickup time slot is 5th Feb (8:21) to 6th Feb (8:21), i.e. the from is earlier than the return request time? Done

/return_picked_up: return pickup time is 8:26 on 5th Feb, which is earlier than the delivery time (/on_status_delivered) or return request time; Done items array should have an entry showing qty for the forward shipment fulfillment is 0; Done

sandeepshahi commented 7 months ago

Flow 6

/on_init

/on_update (merchant cancel)

/on_confirm

/on_status (packed)

/on_status (picked/delivered)

/on_update (Return Initiated)

/on_update (Return Picked)

@dileswarp

dileswarp commented 7 months ago

@bluecypher Please review and share the feedback for updated PR https://github.com/ONDC-Official/v1.2.0-logs/pull/853.

/on_init

tax_number of bap (/tags/bap_terms) can't be provided until received from BNP in /confirm : Done /on_update (merchant cancel)

refund related settlement details should only be appended when FYI info is provided by BNP in second /update call "settlement_status", "settlement_timestamp","settlement_reference" in "@ondc/org/settlement_details" only need to be provided when amount is settled and acknowledged through RSF framework; + invalid enum used in settlement_status; should be NOT-PAID instead of UN-PAID: Done estimated pickup start time can't be earlier than context timestamp: Done

cancelled item must be present in the quote with count & total price = 0; DOne /on_confirm

incorrect enum of settlement_basis provided by BNP in /confirm; Done /on_status (packed)

settlement timestamp of refund can't change in "@ondc/org/settlement_details"; should remain the same as provided by BNP : in /update call: Done

/on_status (picked/delivered) estimated time ranges should not be removed : Added again

/on_update (Return Initiated)

value of item_quantity should be in string format for Return fulfillment: Done settlement timestamp of refund can't change in "@ondc/org/settlement_details"; should remain the same as provided by BNP in /update call: Done

/on_update (Return Picked)

refund details should only be provided when the amount is settled by BNP and info is provided to SNP in second /update call + new settlement object should be appended instead of modifying the existing trail: Done duplicate object of initiated_by in /tags/return_request: Done

BLR-0118 commented 7 months ago

Consistency issues

  1. fulfillment tracking (available or not) was true in /on_select, false in /on_init & then true in /on_confirm; why did it become false in /on_init?
  2. fulfillment provider name was "ONDC Hyper Mart" in /on_select & "Tejas" in /on_confirm: why?
  3. order.payment has differences between /confirm, /on_confirm, /on_update (merchant cancel):
    • withholding amount was "0.00" in /confirm (correct since collector populates), but empty in /on_update & again "0.00" in /on_status;
    • uri wasn't populated by buyer app but is being added by seller NP in /on_update; how can seller NP (not collecting payment) populate this?
  4. message_id of /update (merchant settled) can't be same as /on_update (merchant cancel); same with /on_update (return picked) & settlement;
  5. /on_status (packed):
    • url_enabled & url are provided here itself but order hasn't shipped yet; means?
  6. fulfillment routing.type (P2H2P) to be provided & all inter-city statuses to be populated;
  7. for return, pls also share log for following scenarios: return rejected, return failed;
BLR-0118 commented 7 months ago

@dileswarp

dileswarp commented 6 months ago

Hello @BLR-0118 Sir, As per feedback changes done and added logs for return rejected, return failed and P2H2P Status logs, https://github.com/ONDC-Official/v1.2.0-logs/pull/891

BLR-0118 commented 6 months ago

Flow 6

  1. /on_status (picked):
    • pls also add routing.type = P2H2P when populating the tracking details (or earlier), so buyer apps can differentiate between hyperlocal & intercity fulfillment states;
  2. pls make sure to use correct return pickup failure reason codes from here;
  3. pls make sure to use correct return rejection reason codes from here;
BLR-0118 commented 6 months ago

@dileswarp - clearing v1.2.0 logs for RET12, pls make sure the above issues are taken care of;

dileswarp commented 6 months ago

Yes Sir , Thanks a lot