Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Page Properties

Jira Link

https://app.devrev.ai/shipsy/works/ISS-258326

Document owner

@KhushiVerma

Problem Statement

For Spencers, during the picking and packing process, items can be missing, and thus the final COD amount is updated through softdata calls. However, Loadshare bookings are made before these softdata updates are applied, which leads to discrepancies in COD reconciliation. The Edit API, which is already integrated into the default Loadshare version, allows updates after the initial booking and needs to be implemented in the hyperlocal version as well to resolve this issue.

...

Bullet Point Summary Scope

Integrate the Edit order update API in for the hyperlocal version of in Loadshare.

Requirements

Use Case 1 : <COD Amount Update Post-Booking>

...

  • Other consignment details (such as weight, dimensions) may also change post-booking. The Edit API should allow updates to these details as required.

  • Extend the Edit API to handle any relevant consignment data changes.

Use Case 3 : <Generic Edit API for hyperlocal>

  • Integrate the order update API for hyperlocal version in Loadshare.

  • Sanity check : To make sure to not affect meesho’s already integrated edit API.

URL : https://api.loadshare.net/hyperlocal/v2/order/edit

<Edit API uses PUT method>

HEADERS

Checksum

SHA256(`${token}|${customer-code}|${orderId}`)

Customer-Code

{customer-code}

Content-Type

‘application/json' 

Current request body for order edit API (Loadshare)

Code Block
{
  "serviceabilityRequestId": "60994d19-41e4-4d5d-b0c3-07d5f9e2a618",
  "orderId": "YELLOWSUB1281",
  "displayCode": "PMA:D",
  "shipmentDetails": {
    "deliveryMode": "EXPRESS",
    "isHubOrder": true,
    "shipmentValue": {
      "value": 150,
      "unit": "INR"
    },
    "shipmentType": "FOOD",
    "metadata": {
      "promiseSlaInEpoch": {
        "assignment": 0,
        "total": 0
      }
    },
    "tasks": [
      {
        "type": "PICK_UP",
        "address": {
          "outletName": "abc",
          "city": "Bangalore",
          "contact": 9899980845,
          "location": {
            "latitude": 28.9609526,
            "longitude": 77.7372383
          },
          "landmark": "ESI",
          "address": "12th Main, HAL 2nd Stage, ESI To Domlur, Service Road, Indiranagar, Bangalore - 560075",
          "directionsToReach": "Test Pickup direction for loadshare. Next to AVS school. "
        },
        "pay": {
          "value": 100,
          "unit": "INR"
        },
        "collect": {
          "value": 100,
          "unit": "INR"
        },
        "items": [
          {
            "id": "Qwerty123",
            "name": "milkshake",
            "quantity": 0,
            "price": {
              "value": 0,
              "unit": "INR"
            }
          }
        ],
        "isContactless": false,
        "instructions": [
          "pickupInstruction",
          "Near the church"
        ],
        "metadata": {
          "predictedShipmentReadyTimeInEpoch": 1699421748000,
          "shipmentReadyTimeInEpoch": 1699420957000,
          "passcode": 1231,
          "rto_passcode": 3241
        }
      },
      {
        "type": "DROP",
        "address": {
          "city": "Bangalore",
          "outletName": "abc",
          "contact": 9711496894,
          "location": {
            "latitude": 28.9609526,
            "longitude": 77.7372383
          },
          "landmark": "ESI",
          "address": "12th Main, HAL 2nd Stage, ESI To Domlur, Service Road, Indiranagar, Bangalore - 560075",
          "directionsToReach": "Test Drop direction for loadshare. Next to AVS school"
        },
        "pay": {
          "value": 0,
          "unit": "INR"
        },
        "collect": {
          "value": 0,
          "unit": "INR"
        },
        "items": [
          {
            "id": "string",
            "name": "string",
            "quantity": 0,
            "price": {
              "value": 0,
              "unit": "INR"
            }
          }
        ],
        "isContactless": true,
        "dropLocationTxt": "area in which shipment is to be delivered",
        "instructions": [
          "dropInstruction",
          [
            "Leave at the Door",
            "Don't ring bell"
          ]
        ],
        "metadata": {
          "predictedDistanceInMetre": 4000,
          "noOfShipments": 6,
          "predictedShipmentReadyTimeInEpoch": "1616069490000",
          "shipmentReadyTimeInEpoch": 0,
          "passcode": 1231,
          "noOfDeliveredShipments": 5,
          "noOfUndeliveredShipments": 1
        }
      }
    ]
  }
}

Order Update API to be integrated in the hyperlocal version.

Code Block
{
  "order_number": "OD2367",
  "order_date": "2022-03-31",
  "store_id": "STR7443",
  "instruction": "TOTAL BAGS: 1. \n Please collect 1 insulated bag.",
  "tip": 50,
  "eligible_payout": 50,
  "order_source": "zomato",
  "order_type_code": "TEST",
  "tag": "time",
  "delivery_time_slot_start": "2022-09-19 10:00:00",
  "delivery_time_slot_end": "2022-09-19 12:00:00",
  "order_type": "Order Type",
  "pickup_service_time": 300,
  "delivery_service_time": 300,
  "skip_pickup_validation": true,
  "invoice_number": "#ABC1",
  "invoice_url": "abc",
  "time_restricted_constraint_tags": [
    {
      "tag_id": "string",
      "expiry": "string"
    }
  ],
  "hu_details": [
    {
      "label": "1",
      "hu_number": "1"
    }
  ],
  "final_amount": 200,
  "payment": {
    "mode": "gpay",
    "value": 198
  },
  "storage_location": "abcd",
  "pieces_detail": [
    {
      "menu_code": "Menu Code",
      "menu_description": "Box",
      "quantity": 3,
      "order_line_total": 145.95,
      "size": 5,
      "unit_price": 20,
      "shipping_fees": 10,
      "discount": 20
    }
  ],
  "origin_details": {
    "latitude": 23.215762,
    "longitude": 77.402045,
    "name": "Prasann",
    "street_number": "549/11",
    "street_name": "Bada barha",
    "city_name": "string",
    "address_line_2": "string",
    "address_line_3": "string",
    "address_line_4": "string",
    "postal_code": "122003"
  },
  "destination_details": {
    "latitude": 23.215762,
    "longitude": 77.402045,
    "customer_name": "Prasann",
    "street_number": "549/11",
    "street_name": "Bada barha",
    "city_name": "string",
    "address_line_2": "string",
    "address_line_3": "string",
    "address_line_4": "string",
    "phone_number": "9999999999",
    "postal_code": "122003"
  }
}

Acceptance and Rejection Criteria [Extremely Critical]

...

Project goals and success metrics - The first set of KPIs you will be targetting

Goal

Metric

e.g. Label creation made easier

e.g. 0 engineering involvement to configure labels

Settings/Configurations in the Product

...

List of automated alerts that should be triggered during this development

Alert Type

When to Trigger

e.g. Booking Failure

e.g. 5 failures in the last 60 min beacause of serviceability

Scalability and Release Planning

...