Modify the cancel API based on the new approach that can handle new domains with configuration changes or minimal code-level changes.
Goals
[ ] Development of cancel API with the new approach and make a call back for on_cancel.
Expected Outcome
Cancel API as per the new approach that works seamlessly with all the existing domains and should be able to accommodate new domains. It should be working correctly and cancel the order booked earlier.
Acceptance Criteria
[ ] Cancel API working with all current domains.
[ ] The requested order must be canceled.
[ ] On making a cancel call, it should call back on_cancel with the correct response to the request.
Implementation Details
Add logic on the cancel endpoint to fetch data using the query engine.
Add logic for mutation on the database to cancel an order.
Create JSONata file for transforming the query response to BECKN format.
Transform the query response to BECKN format using transformer and JSONata.
Updating the discussion and expectations on Cancel Flow
1.Meta API to be implemented in future kept as backlog
BAP will send either cancellation reason id or cancellation reason along with media in descriptor object
If Cancellation reason id is available save it to ReturnCancellation table and update the order status in order table to "CANCELLED". Update Order fulfillment table with fulfillment status code as "order cancelled" and state value as "order cancelled by user"
4.If we have descriptor object, save them as json object(name,code,short dec,long desc) in reason column of ReturnCancellation table. Simulatneously add the media/image in to media tableand relate to r ReturnCancellation table and update the order status in order table to "CANCELLED".
4a.Update Order fulfillment table with fulfillment status code as "order cancelled" and state value as "order cancelled by user"
Description
Modify the cancel API based on the new approach that can handle new domains with configuration changes or minimal code-level changes.
Goals
Expected Outcome
Cancel API as per the new approach that works seamlessly with all the existing domains and should be able to accommodate new domains. It should be working correctly and cancel the order booked earlier.
Acceptance Criteria
Implementation Details
Add logic on the cancel endpoint to fetch data using the query engine. Add logic for mutation on the database to cancel an order. Create JSONata file for transforming the query response to BECKN format. Transform the query response to BECKN format using transformer and JSONata.
Mockups / Wireframes
NA
Product Name
Beckn
Project Name
strapi-plugin
Organization Name:
FIDE
Domain
NA
Tech Skills Needed:
Strapi Node
Complexity
Medium
Category
Feature
Sub Category
API