Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magicpin - LSP - compliance check #2705

Open
abhinavv245 opened this issue Oct 29, 2024 · 8 comments
Open

Magicpin - LSP - compliance check #2705

abhinavv245 opened this issue Oct 29, 2024 · 8 comments

Comments

@abhinavv245
Copy link
Collaborator

Multiple issues identified, please run the [log verification tool]https://github.com/ONDC-Official/reference-implementations/tree/main/utilities/logistics-b2b/log-verification-utility() to self test and rectify the issues.

Order Flow

{
"Flow Error": {
"0": "Incorrect Flow as per context/timestamps - (on_status,search,on_search,init,on_init,confirm,on_confirm,track,on_track)"
},
"Schema": {
"schemaErr0": "/search/0/message/intent/fulfillment/end/location/gps cannot be equal to start/location/gps '"28.6046734,77.2928949"'",
"schemaErr1": "/on_search/0/message/catalog/bpp1providers/0/descriptor must have required property 'short_desc'",
"schemaErr2": "/on_search/0/message/catalog/bpp
1providers/0/items/0 must have required property 'parent_item_id'",
"schemaErr3": "/on_search/0/message/catalog/bpp1providers/0/items/0/descriptor must have required property 'long_desc'",
"schemaErr4": "/on_search/0/message/catalog/bpp
1providers/0/items/1/descriptor must have required property 'long_desc'",
"schemaErr5": "/on_init/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr6": "/on_init/0/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr7": "/on_init/0/message/order/payment/collected_by must be equal to constant (BAP)",
"schemaErr8": "/on_init/0/message/order/payment must match "then" schema",
"schemaErr9": "/confirm/0/context/ttl must be equal to constant (PT30S)",
"schemaErr10": "/confirm/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr11": "/on_confirm/0/message/order must have required property 'created_at'",
"schemaErr12": "/on_confirm/0/message/order must have required property 'updated_at'",
"schemaErr13": "/on_confirm/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr14": "/on_status/0/context/transaction_id Transaction ID should be same across the transaction: "21342363_1729751897334_txn"",
"schemaErr15": "/on_status/0/message/order must have required property 'payment'",
"schemaErr16": "/on_status/0/message/order must have required property 'billing'",
"schemaErr17": "/on_status/0/message/order must match "else" schema",
"schemaErr18": "/on_status/0/message/order/id must be equal to constant (21342363_1729152206000)",
"schemaErr19": "/on_status/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr20": "/on_status/0/message/order/fulfillments/0 must have required property 'tracking'",
"schemaErr21": "/on_status/0/message/order/fulfillments/0 must match "then" schema",
"schemaErr22": "/on_status/0/message/order/fulfillments/0/start/location/address/building cannot be equal to locality",
"schemaErr23": "/on_status/0/message/order/fulfillments/0/start/contact must have required property 'phone'",
"schemaErr24": "/on_status/0/message/order/fulfillments/0/start/contact must have required property 'email'",
"schemaErr25": "/on_status/0/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr26": "/on_status/0/message/order/created_at mismatches in /confirm and /on_status",
"schemaErr27": "/on_status/1/context/transaction_id Transaction ID should be same across the transaction: "21342363_1729751897334_txn"",
"schemaErr28": "/on_status/1/message/order must have required property 'payment'",
"schemaErr29": "/on_status/1/message/order must have required property 'billing'",
"schemaErr30": "/on_status/1/message/order must match "else" schema",
"schemaErr31": "/on_status/1/message/order/id must be equal to constant (21342363_1729152206000)",
"schemaErr32": "/on_status/1/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr33": "/on_status/1/message/order/fulfillments/0 must have required property 'tracking'",
"schemaErr34": "/on_status/1/message/order/fulfillments/0 must match "then" schema",
"schemaErr35": "/on_status/1/message/order/fulfillments/0/start/contact must have required property 'email'",
"schemaErr36": "/on_status/1/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr37": "/on_status/1/message/order/created_at mismatches in /confirm and /on_status",
"schemaErr38": "/on_status/2/message/order must have required property 'payment'",
"schemaErr39": "/on_status/2/message/order must have required property 'billing'",
"schemaErr40": "/on_status/2/message/order must match "else" schema",
"schemaErr41": "/on_status/2/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr42": "/on_status/2/message/order/fulfillments/0 must have required property 'tracking'",
"schemaErr43": "/on_status/2/message/order/fulfillments/0 must match "then" schema",
"schemaErr44": "/on_status/2/message/order/fulfillments/0/start/contact must have required property 'email'",
"schemaErr45": "/on_status/2/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr46": "/on_status/3/message/order must have required property 'payment'",
"schemaErr47": "/on_status/3/message/order must have required property 'billing'",
"schemaErr48": "/on_status/3/message/order must match "else" schema",
"schemaErr49": "/on_status/3/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr50": "/on_status/3/message/order/fulfillments/0 must have required property 'tracking'",
"schemaErr51": "/on_status/3/message/order/fulfillments/0 must match "then" schema",
"schemaErr52": "/on_status/3/message/order/fulfillments/0/start/contact must have required property 'email'",
"schemaErr53": "/on_status/3/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr54": "/track/0/context/ttl must be equal to constant (PT30S)"
},
"Message": {
"on_status_0": {
"trckErr": "tracking should be enabled (true) for hyperlocal (Immediate Delivery)"
},
"on_status_1": {
"trckErr": "tracking should be enabled (true) for hyperlocal (Immediate Delivery)"
},
"on_status_2": {
"trckErr": "tracking should be enabled (true) for hyperlocal (Immediate Delivery)",
"pickupTimeErr": "Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - Order-picked-up"
},
"on_status_3": {
"trckErr": "tracking should be enabled (true) for hyperlocal (Immediate Delivery)",
"pickupTimeErr": "Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - Order-delivered",
"deliveryTimeErr": "Delivery timestamp (fulfillments/end/time/timestamp) is required for fulfillment state - Order-delivered"
},
"on_init_0": {
"taxErr": "fulfillment charges will have separate quote line item for taxes"
}
}
}

Cancel Flow

{
"Schema": {
"schemaErr0": "/search/0/message/intent/fulfillment/end/location/gps cannot be equal to start/location/gps '"28.6046734,77.2928949"'",
"schemaErr1": "/on_search/0/message/catalog/bpp1providers/0/descriptor must have required property 'short_desc'",
"schemaErr2": "/on_search/0/message/catalog/bpp
1providers/0/items/0 must have required property 'parent_item_id'",
"schemaErr3": "/on_search/0/message/catalog/bpp1providers/0/items/0/descriptor must have required property 'long_desc'",
"schemaErr4": "/on_search/0/message/catalog/bpp
1providers/0/items/1/descriptor must have required property 'long_desc'",
"schemaErr5": "/on_init/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr6": "/on_init/0/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr7": "/on_init/0/message/order/payment/collected_by must be equal to constant (BAP)",
"schemaErr8": "/on_init/0/message/order/payment must match "then" schema",
"schemaErr9": "/confirm/0/context/ttl must be equal to constant (PT30S)",
"schemaErr10": "/confirm/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr11": "/on_confirm/0/message/order must have required property 'created_at'",
"schemaErr12": "/on_confirm/0/message/order must have required property 'updated_at'",
"schemaErr13": "/on_confirm/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr14": "/cancel/0/context/ttl must be equal to constant (PT30S)",
"schemaErr15": "/cancel/0/message/cancellation_reason_id must be equal to one of the allowed values (007,996)",
"schemaErr16": "/on_cancel/0/context/message_id Message ID should be same as /cancel: "a9ac5d01-ffb6-4c0b-ade5-46a876884a32_solicited"",
"schemaErr17": "/on_cancel/0/message/order/cancellation/reason/id does not match the cancellation reason id in /cancel",
"schemaErr18": "/on_cancel/0/message/order/quote/breakup/0 must have required property '@ondc/org/item_id'",
"schemaErr19": "/on_cancel/0/message/order/fulfillments/0/start/contact must have required property 'email'",
"schemaErr20": "/on_cancel/0/message/order/fulfillments/0/end/contact must have required property 'email'",
"schemaErr21": "/on_cancel/0/message/order/created_at mismatches in /confirm and /on_cancel"
},
"Message": {
"on_init_0": {
"taxErr": "fulfillment charges will have separate quote line item for taxes"
}
}

Note: Also provide logs for RTO Flow, Deferred RTS (/in update call)

@harshmohta1611

@harshmohta1611
Copy link
Contributor

harshmohta1611 commented Oct 29, 2024

@abhinavv245 can you please verify the logs again. Have added all the flows and made corrections in the preexisting flows
PR : #2710

@abhinavv245
Copy link
Collaborator Author

Order Flow

{
"Schema": {
"schemaErr0": "/on_status/0/message/order/payment/status must be equal to constant (NOT-PAID)",
"schemaErr10": "/track/0/context must have required property 'ttl'"
},
"Message": {
"on_init_0": {
"taxErr": "fulfillment charges will have separate quote line item for taxes"
},
"confirm_0": {
"avgPckupErr": "Average Pickup Time (fulfillments/start/time/duration) mismatches from the one provided in /on_search",
"instructionsErr": "fulfillments/start/instructions are required when ready_to_ship = 'yes'",
"bppTermsErr": "Which terms LBNP is providing as LSP did not provide bpp_terms in on_init?"
},
"on_confirm_0": {
"avgPckupErr": "Average Pickup Time PT15M (fulfillments/start/time/duration) mismatches from the one provided in /on_search (PT4M)"
}
}
}

RTO Flow

{
"Schema": {
"schemaErr0": "/on_search/0/message/catalog/bpp1providers/0/fulfillments/0 must NOT have additional properties (tracking)",
"schemaErr1": "/on_search/0/message/catalog/bpp
1providers/0/fulfillments/1 must NOT have additional properties (tracking)",
"schemaErr2": "/confirm/0/message/order/fulfillments/0 must NOT have additional properties (tracking)",
"schemaErr3": "/on_status/0/message/order/fulfillments/0/vehicle must have required property 'registration'",
"schemaErr4": "/on_status/0/message/order/payment/status must be equal to constant (NOT-PAID)",
"schemaErr14": "/on_cancel/0/message/order/fulfillments/0 must have required property 'end'",
"schemaErr15": "/on_cancel/0/message/order/fulfillments/0/start must have required property 'location'",
"schemaErr16": "/on_cancel/0/message/order/fulfillments/0 must match "else" schema",
"schemaErr17": "/on_cancel/0/message/order/fulfillments/1/state/descriptor/code must be equal to one of the allowed values (Cancelled,RTO-Initiated)"
},
"Message": {
"on_status_4": {
"flflmntstErr": "In case of RTO, fulfillment with type 'Delivery/Prepaid' needs to in 'Cancelled' state",
"pickupTimeErr": "Pickup timestamp (fulfillments/start/time/timestamp) cannot be provided for fulfillment state - Pending",
"rtoDlvryTimeErr": "fulfillments/end/time/timestamp is missing for RTO fulfillment with state - RTO-Disposed"
},
"on_cancel_0": {
"flflmntstErr": "In case of RTO, fulfillment with type 'Delivery' needs to be 'Cancelled'",
"rtoIdErr": "RTO id - 'F1-RTO' of fulfillment type 'RTO' does not match with the one provided in on_search 'F2' in /fulfillments",
"missingFlmntTags-1-err": "'precancel_state' tag/s required in /fulfillments/tags"
}

Cancel Flow

  • cancel call is missing from LBNP (for TAT breach)

{
"Schema": {
"schemaErr0": "/on_cancel/0/message/order/created_at mismatches in /confirm and /on_cancel"
}
}

@harshmohta1611

@harshmohta1611
Copy link
Contributor

@abhinavv245 have submitted the logs again PR : #2721.
Also, We were not able to replicate the TAT breach cancellation from LBNP with Pramaan Buyer app. Can we get support from any other Logistics buyer NP for that flow.

@harshmohta1611
Copy link
Contributor

Submitted the logs again.
PR : #2721

@harshmohta1611
Copy link
Contributor

@abhinavv245 can you please verify the latest logs shared
PR : #2721

@abhinavv245
Copy link
Collaborator Author

Order Flow

/on_search

  • please remove static terms for now as they are not enabled yet (bpp/descriptor/tags)
  • tracking attribute is not required in fulfillments (also tracking for F1 is later marked true, should be in sync throughout, it refers whether tracking is provided for this fulfillment or not)

/confirm

  • start/instructions/additional_desc is not required as the checklist is only provided for return orders

/on_confirm

  • pickup and delivery time slots should be corelated to avg pickup time (4 mins) and TAT(8 minutes) provided w.r.t context/timestamp

/on_status

  • payment/time is not required as payment type is 'POST-FULFILLMENT'

RTO Flow

  • similar issues as above

/on_cancel

  • Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - Cancelled
  • As RTO is going to be disposed, why are RTO charges still applied in quote/breakup
  • In RTO Fulfillment, start and end location is required

Deferred RTS Flow

  • similar issues as above

/on_update

  • pickup and delivery time slots should be corelated to avg pickup time(4 mins) and TAT(8 minutes) provided w.r.t context/timestamp

TAT Breach (buyer cancellation)

  • similar issues as above

/on_cancel

  • linked_order/items/0/category_id is not valid (Fu0026B)
  • quote should be updated (is LSP charging the whole amount?) (Also in LSP cancellation)

@harshmohta1611

@harshmohta1611
Copy link
Contributor

harshmohta1611 commented Nov 6, 2024

@abhinavv245 Submitted the logs with the required changes
PR : #2739

@abhinavv245
Copy link
Collaborator Author

Logs cleared for v1.2.

@harshmohta1611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants