/
RETURN APPROVAL FLOW

What is the purpose of this article?

This article contains step-wise logic and flow of Return Approval flow by client in workspace.

What are the steps to achieve this task ?

  • WORKSPACE :
    step 1 : when a client wants to approve return
    1.1. by interactive method
    1.2. by bulk method (applied filters)
    1.3. by import
    step 2 : client will enter his/her approval reason.
    step 3 : When client clicks on Approve return button, the frontend will send the request

    1HTTP Method: POST 2API PATH: “https://{{workspace}}.{{envBasedDomain}}/api/v1/returns/approval/{{module}}“ 3 4REQUEST BODY : 5{ 6 "orderType": "COD", 7 "promiseDeliveryDate": "", 8 "orderId": "46418190", 9 "dropData": "{\"dropContactPhoneNo\":\"7042443113\",\"dropAddress2\":\"Village Babra Bakirpur, Pataudi Road Near Adani Logistic Park, ICD Patli, Gurgaon, Haryana(122503)\",\"dropAddress1\":\"MJ Logistics Private Limited, Seabird Marine Services Pvt Ltd\",\"dropCustomerName\":\"Eshopbox Patli Gurgaon\",\"dropInPinCode\":\"122503\",\"dropState\":\"Haryana\",\"dropCity\":\"Gurgaon\",\"dropCountry\":\"India\"}", 10 "discount": "0.0", 11 "customerOrderNumber": "AGGN00025", 12 "reversePickupReason": "", 13 "productName": "1049297", 14 "mode": "", 15 "isCOD": "1", 16 "billingCustomerName": "Sunisha Paul", 17 "customerReturnNo": "R20651673519442860", 18 "channelSlug": "welspun", 19 "returnShipmentId": "1579771", 20 "refundBankAccountDetails": "", 21 "previousOrderItemId": "28071503", 22 "sku": "97U5D3H176Q", 23 "productImageUrl": "https://i.postimg.cc/9MWF89Pp/1049297.jpg", 24 "shippingCharges": "28.86", 25 "invoiceTotal": "528.86", 26 "itemId": "97U5D3H176Q", 27 "accountId": "725", 28 "taxRate": "0.0", 29 "warehouseId": "650", 30 "isExchange": "1", 31 "taxAmount": "0.0", 32 "pickUpData": "{\"pickUpEmail\":\"sunisha.paul@gmail.com\",\"pickUpCustomerName\":\"Sunisha Paul\",\"pickUpPinCountryName\":\"IN\",\"pickUpContactPhone\":\"9744673837\",\"pickUpAddressLine2\":\"\",\"pickUpAddressLine1\":\"Q 082, DLF New Town Heights, Opp. TV Centre, Seaport Airport Road, Kakkanad, Kochi\",\"pickUpPinCode\":\"682037\",\"pickUpCountryCode\":\"IN\",\"pickUpCity\":\"Cochin\",\"pickUpState\":\"KL\"}", 33 "productAdditionalInfo": "", 34 "promiseShipDate": "2022-09-26 07:15:50.0", 35 "externalChannelId": "CH2065", 36 "newProductAdditionalInfo": "", 37 "lineItemTotal": "500.0", 38 "gstin": "06AAFCB0498R2Z2", 39 "returnReason": "", 40 "accountSlug": "welspun", 41 "channelId": "2065", 42 "email": "sunisha.paul@gmail.com", 43 "quantity": "1", 44 "orderItemId": "AGGN00025-28071503", 45 "refundReason": "Change of Mind", 46 "mobile": "9744673837", 47 "customerPrice": "500.0", 48 "orderTotal": "898.0", 49 "cancellationPolicyCode": "", 50 "reversePickUpCreatedDate": "", 51 "originalOrderItemId": "0", 52 "exchangeSize": "1058792", 53 "lineItemSequenceNumber": "9804897", 54 "asin": "", 55 "productUrl": "" 56}

    After this pickup API will be called.

  • CUSTOMER PORTAL :
    step 1 : when pickup API is called fetch product details from product API to calculate dimensions and weight then call recommendation API.
    step 2 : once courier partner has been picked from recommendation API called clickpost manifest API to create return on clickpost.
    step 3 : on success save accepted status in return shipment status log along with tracking id and other relevant details (eg : cpid..).
    step 4 : publish an event of return accepted for activities.


SEQUENCE DIAGRAM FOR RETURN APPROVAL BY CLIENT ON WORKSPACE :