Versions Compared

Key

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

What is the purpose of this article?

...

  1. Order sync and return sync happen depending on events.

  2. Whenever we get an update in DB ( either in case of order or in case of return), we sync that data and update their values in Algolia. ( either in case of order or in case of return) , we sync that data and update their values in Algolia.

  3. The problem we are facing is that we don't get the updates every day and DB does not get updated every day. Because of this, the last update remains as the latest status in Database.

For eg., Suppose the order scheduled to be RTS on 10th Jan, 2022 did not get picked up by the courier partner. As a result, there will be no update on DB about RTS getting delayed. On 11th Jan, 2022, order should be considered as " RTS delayed " with is a reason known. Meanwhile, in DB, update of 10th Jan or 9th Jan will be visible (i.e.,previous update) as RTS did not happen on expected date. So it's status couldn't be updated.

...

Code Block
{
   resource=shipment, 
   eventType=PUT,
   eventSubType=packed,
   accountSlug=raymond, 
   actor=SYSTEM, 
   version=v1, 
   request_data=[],
   response_data={
       customerOrderNumber=6727469972, 
       orderSiteID=, 
       vendorOrderNumber=6727469972, 
       externalShipmentID=6727469972-1679-12, 
       externalWarehouseID=ESBMUM_112, 
       externalChannelID=CH1679, 
       externalWmsChannelName=MYNTRA_RAYMOND_MUMBAI_MUM, 
       external_wms_channel_id=1649.0, 
       channelLabel=Myntra PPMP_N, integrationType=5, 
       defaultWarehouseCode=ESBMUM_112, 
       facilityLabel=Mumbai (ZMUM), 
       facilityType=unicommerce, 
       orderDate=2022-02-11 21:31:39, 
       portal_id=3.0, paymentType=cod, 
       expectedShipDate=2022-02-13 12:00:00, 
       order_id=4.2466552E7, channel_id=1679.0, 
       warehouse_id=72.0, channel_account_id=209.0, 
       account_id=126.0, 
       region=National, 
       isMetro=0, 
       isSpecialplace=0, 
       invoiceNumber=SRA212242544, 
       boxType=UNKNOWN,
       isPriorityShipment=0, 
       isGift=0, 
       invoice_url=https://storage.googleapis.com/eshopbox_wms_uploads/myntraLabel/20220212102451727152883.pdf, 
       invoiceDate=2022-02-12 00:00:00, 
       label_url=https://storage.googleapis.com/eshopbox_wms_uploads/myntraLabel/20220212102451548873136.pdf,
       labels=, 
       shippingInfo=[], 
       boxAdditionalRecommendation=[],
       dimension_length=350,
       dimension_width=210, 
       dimension_height=30, 
       weight=546, 
       trackingID=ML0834329651, 
       trackingDomain=, 
       packageID=6727469972,
       barcode=, taxAmount=0.0, 
       shipChargeAmount=0.0, 
       courierName=ML, 
       cp_id=0.0, 
       created_at=2022-02-11 21:31:49, 
       updated_at=2022-02-12 10:24:53,
       status=packed, 
       remarks=, 
       warehousePincode=421302, 
       thirdPartyShipping=true, 
       customerName=Samikshya Parida, 
       customerContactNumber=9999999999, 
       email=xyz@gmail.com, 
       status_updated_at=2022-02-12 10:24:53,
       status_log={
              created=2022-02-11 21:31:49, 
              packed=2022-02-12 10:24:53}, 
              status_log_count={created=1.0,
           packed=1.0}, status_log_id=76256538,         orderExternalCreatedAt= created=1.0, 
                      packed=1.0
              }, 
              status_log_id=76256538, 
              orderExternalCreatedAt=2022-02-11 21:31:46, 
              shippingAddress={
              customerName=Samikshya Parida, 
              addressLine1=Dr. Pankaj Parida, Parida, 
              Professor colony near Acharya Harihar Cancer center, 
              addressLine2=Medical College  (Cuttack), city=Cuttack, 
              state=OR, 
              postalCode=753007, 
              countryCode=, 
              countryName=India, 
              contactPhone=9999999999, 
              email=xyz@gmail.com
       }, 
       warehouseAddress={
              addressLine1=Survey no 20/1, Global complex, Godown no. A/6,Village-Kukse Borivali, 
              addressLine2=Near Shangrila Resort, Taluka Bhiwandi, Dist Thane, city=Thane, state=Maharashtra, postalCode=421302, gstin=27AAFCB0498R1ZZ
       }, 
       id=1.0418464E7, 
       isCOD=1, 
       track_payload=[], 
       packed_date=2022-02-12 10:24:53, 
       items=[
		       {
			     lineItemSequenceNumber=3.3735162E7, 
                 orderItemID=6727469972-22742422, itemID=8907921267104,
                 sku=BBAPLPU137458_XXL, 
                 asin=, 
                 productName=Park Avenue Solid Medium Red Regular Fit Regular Collar 3/4th Sleeve Shirts, 
                 quantity=1.0, 
                 customerPrice=599.0, 
                 lineItemTotal=599.0,
                 invoiceTotal=599.0, 
                 cashOnDeliveryCharges=0.0, 
                 discount=0.0, taxRate=0.0,
                 taxAmount=0.0,
                 inventoryItemCode=, 
                 giftMessage=, 
                 giftLabelContent=, 
                 lineItemOrderStatus=, 
                 orderItemIDs=[6727469972-22742422], 
                 productImageUrl=https://s3-eu-west-1.amazonaws.com/imagebucketeshopbox/Flipkart_153_Styles/PWSU01679-B8/1.jpg, 
                 shippingCharges=0.0, 
                 isVirtualKit=0,
                 onhold=0,
                 cancellationAdditionalReason=, 
                 cancellationReason=,
                 customerOrderItemID=
			   }
		]
	}, 
    previous_data=[],
    resource_type=shipment.update,
    account_slug=raymond, 
    custom=[]
}

...