ONDC-Official / v1.2.0-logs

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

uEngage - compliance check #28

Closed sandeepshahi closed 8 months ago

sandeepshahi commented 1 year ago

Flows must be shared as per the test case scenarios

/on_select

/on_select

/on_confirm

/on_status

Recently generated logs must be shared for verification

@shubhamuengage

sandeepshahi commented 10 months ago

Flow 1

/on_search

/search (incremental)

/on_search (incremental)

/select

/on_select

/on_init

/on_status

Flow 3

Flow 4

/on_update

Flow 5

@shubhamuengage

shubhamuengage commented 9 months ago

@bluecypher we have submitted the logs and raised pr for the same here

while testing these logs with the utility we encountered some errors which i was not able to understand

for eg."Key 'breakup.13.@ondc/org/item_id' mismatch: 2455697 !== 2455493" Key 'breakup.13.price.value' mismatch: 18.5 !== 4.45", would need you help to understand these

for rto and return flow the buyer app we tested with does not support it. and we are having visibility issues with on reference buyer app a mail have been sent for the same once visibility issue is sorted will submit logs for rto and return flow

BLR-0118 commented 9 months ago

Flow 1

  1. /on_search:
    • Context.timestamp same as /search;
    • remove "accept_bap_terms" until enabled;
    • can we use proper values for item.quantity.unitized.measure (enum for unit), as per examples below: a. item "33381491": unit - "millilitre", value - "330"; b. item "33381493": unit - "litre", value - "1"; c. item "33381494": unit - "millilitre", value - "500";
    • several items have base price of 0 but with mandatory customization options; in this case, you should set either a default selection price or upper/lower range, so that the merchant listing page shows a price, as explained below: a. e.g. item "2455702", custom group "2455702-2455704"; b. customizations in this group are 2455704 (default), 2455705, 2455706, 2455707, 2455708; c. in this case, why not use item.price.default_selection for "2455702" and set value to "185" (which is the price of default customization 2455704), as shown here; d. or you can compute the upper & lower ranges for this item (with customization) and set item.price.range;
BLR-0118 commented 9 months ago

Flow 1

  1. are you supporting incremental update of catalog?

Flow 2

  1. /on_select:

    • pls add fulfillment.type;
  2. /on_init:

    • remove provider_location;
  3. /on_select, /on_init, /on_confirm:

    • item.quantity.available.count & item.quantity.maximum.count not required in /on_init, /on_confirm;
    • values changed from "99" in /on_search to "30" in these APIs: any reason, since the meaning remains the same;
    • fulfillment TAT changed from "PT55M" in /on_select to "PT45M" in /on_confirm & back to "PT55M" in /on_status (picked up);
    • fulfillment.tracking was true in /on_confirm (means tracking available) but became false in /on_status (picked up);
  4. tracking is required for F&B:

    • pls share logs for /track & /on_track;
    • to optimize tracking processing by buyer apps, pls mark fulfillment.tags.tracking.gps_enabled to "yes" when tracking is enabled so buyer apps can start sending /track calls (shown here);

Flow 3

  1. /on_select (oos):
    • error.message should be as per the format here;

Flow 5

  1. /on_cancel:
    • "cancelled_by" value should be bpp_id;
    • "cancellation_reason_id" is invalid;
    • /on_cancel should be as per contract: new fulfillment created, all items in items[] should be assigned to this new fulfillment and quote_trail having details of costs to be refunded;
    • also add precancel_state to fulfillment that's being cancelled;
BLR-0118 commented 9 months ago

@shubhamuengage - pls fix these asap & only resubmit logs for flow 2 (tracking), flow 3 (out of stock), flow 4 & flow 5;

BLR-0118 commented 9 months ago

From logs submitted by Nobrokerhood:

Flow 1 - logs here

  1. /on_search (full):

    • Context.bap_id has "https://" prepended, this is incorrect;
    • remove "accept_bap_terms" until static terms are enabled;
  2. /on_search (incremental):

    • Context.bap_id has "https://" prepended, this is incorrect;
    • is incremental push supported for item / merchant updates?

Flow 2 - logs here

  1. /on_init:

    • remove provider_location;
    • item.quantity.available.count & item.quantity.maximum.count need not be sent after /on_select;
  2. /on_status (accepted):

    • "gps_enabled" set to "yes" here (does this mean tracking by gps coords is enabled from accepted state? this can't happen because agent isn't yet assigned);

Flow 3 - logs here

  1. /on_select_unavailable:
    • quote.breakup for item id 29596225 shows: a. unit price = 255; b. quantity = 1 (different from what's sent in /select, so assuming this is out of stock); c. total price = 547596361305 (not equal to: unit price * quantity);
    • error.message should be in the format here - see pt 7 in the link shared;

Flow 4 - logs here

  1. /on_cancel:
    • cancelled_by should be the bap_id as cancellation initiated by buyer app;
    • precancel_state isn't "Order-picked-up" but "Pending" (as order is cancelled after acceptance);
    • no value provided for "updated_at" in precancel_state;
    • new fulfillment "C1" is created but items in item array aren't assigned to this cancel fulfillment (check contract - it's supposed to be zero'd for the forward shipment fulfillment & new entry created for cancel fulfillment);
    • quote_trail should only be for cancel fulfillment & include quote line items that are being reduced from the order value (-ve if it's being reduced, +ve if it's being added) and the buyer app will interprete this to compute the refund for buyer;
    • quote_trail structure is invalid;
    • quote hasn't changed - does this mean nothing is being refunded? It can't be because order is cancelled immediately after acceptance;

Flow 5 - same issues as flow 4;

BLR-0118 commented 9 months ago

@shubhamuengage - pls fix & resubmit only for issues above, Nobrokerhood issues are here;

BLR-0118 commented 9 months ago
  1. /on_select (oos):

    • error.message should have the error code (e.g. 40002) within escaped quotes;
    • if item is not available (i.e. item_quantity is 0 in quote.breakup), the unit price can't become 0 (unless it was already 0);
  2. merchant_cancel:

    • "qupte_trail" key is invalid => should be "quote_trail";
    • items array should have the items reassigned to the cancel fulfillment & qty zero'd out for the original (forward shipment) fulfillment;
    • in case cancellation happens after order is picked up, the RTO flow (with few additional keys in cancel_request) should be used;
    • pls share the order structure at /confirm & /on_confirm to understand whether /on_cancel is correct;
BLR-0118 commented 9 months ago

@shubhamuengage - pls fix the above & resubmit;

BLR-0118 commented 8 months ago

@shubhamuengage - as discussed, following needs to be fixed:

  1. merchant cancel (/on_cancel):

    • order.items should have a separate entry for the item (qty 1), assigned to fulfillment id "c1";
  2. RTO (/on_cancel):

    • quote_trail shows refund of item price (70), proportionate tax amount should also be refunded;
    • if item price (70) is being refunded (as per quote_trail), corresponding item_quantity in quote.breakup should become 0 & total price for that item should become 0;
    • all other costs being refunded should show as total price of 0 in quote.breakup;
    • quote.price.value should add up to quote.breakup[].price.value;
BLR-0118 commented 8 months ago

clearing logs for v1.2.0 (RET11) subject to the above being fixed before deploying in Prod;