Skip to content

Commit

Permalink
Some minor updates to createSalesOrder designs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mridulpathak committed Dec 30, 2024
1 parent 0229f80 commit 019ecd9
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions project-ideas/order-ledger/createSalesOrderV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ This service will take in the order JSON in OMSNewOrdersFeed and set up a comple
* Set adjustmentAttributes = remove orderAdjustmentAttributes from the entry
* If adjustmentAttributes set entry.OrderAdjustmentAttribute = adjustmentAttributes
* Add entry to orderContext.OrderAdjustment list
7. Initialize shipGroups list
7. Initialize orderContext.OrderItemShipGroup list
* Iterate through orderJson.orderItemShipGroups as orderItemShipGroup
* Initialize shipGroup map
* shipGroup.shipmentMethodTypeId = orderItemShipGroup.shipmentMethodTypeId
Expand All @@ -211,23 +211,25 @@ This service will take in the order JSON in OMSNewOrdersFeed and set up a comple
* shipGroup.maySplit = orderItemShipGroup.maySplit
* shipGroup.contactMechId = shipToAddressContactMechId
* shipGroup.telecomContactMechId = shipToPhoneContactMechId
* Initialize OrderItem list
* Iterate orderItemShipGroup as orderItem
* Initialize item map
* item.externalId = orderItem.externalId
* item.orderItemTypeId = orderItem.orderItemTypeId
* item.statusId = orderItem.statusId
* item.isPromo = orderItem.isPromo
* item.quantity = orderItem.quantity
* item.unitPrice = orderItem.unitPrice
* item.itemDescription = orderItem.itemDescription
* productId = productId where Product.internalName = orderItem.productSku
* If productId, set item.productId = productId
* Else call create#Product with [internalName:productSku] (New Transaction)
* set item.productId = createProductOutput.productId
* If orderItem.orderItemAttributes set item.OrderItemAttribute = orderItem.orderItemAttributes
* If orderItem.orderAdjustments initialize item.OrderAdjustment list
* Iterate through orderItem.orderAdjustments
* Initialize shipGroup.OrderItem list
* Iterate orderItemShipGroup.orderItems as orderItem
* Initialize item map
* item.externalId = orderItem.externalId
* item.orderItemTypeId = orderItem.orderItemTypeId
* item.statusId = orderItem.statusId
* item.isPromo = orderItem.isPromo
* item.quantity = orderItem.quantity
* item.unitPrice = orderItem.unitPrice
* item.itemDescription = orderItem.itemDescription
* productId = productId where Product.internalName = orderItem.productSku
* If productId, set item.productId = productId
* Else call create#Product with [internalName:productSku] (New Transaction)
* set item.productId = createProductOutput.productId
* If orderItem.orderItemAttributes set item.OrderItemAttribute = orderItem.orderItemAttributes
* If orderItem.orderAdjustments initialize item.OrderAdjustment list
* Iterate through orderItem.orderAdjustments
* Set adjustmentAttributes = remove orderAdjustmentAttributes from the entry
* If adjustmentAttributes set entry.OrderAdjustmentAttribute = adjustmentAttributes
* Add entry to item.OrderAdjustment list
* Add entry to item.OrderAdjustment list
* Add item map to shipGroup.OrderItem list
* Add shipGroup map to orderContext.OrderItemShipGroup list

0 comments on commit 019ecd9

Please sign in to comment.