From 5b01be83453a2429bb9316fd9fe70606de0e3a03 Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Tue, 3 Dec 2024 19:00:42 +0530 Subject: [PATCH 01/32] Added a view to fetch the order level details of orders eligible for NS --- entity/OrderViewEntities.xml | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 entity/OrderViewEntities.xml diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml new file mode 100644 index 0000000..834a0d5 --- /dev/null +++ b/entity/OrderViewEntities.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 32a8a8b0afbb0aa8ed20d7e0cc0a1c13700af2fe Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Tue, 3 Dec 2024 19:36:46 +0530 Subject: [PATCH 02/32] Added the OPP in the view entity --- entity/OrderViewEntities.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 834a0d5..7246782 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -50,15 +50,21 @@ - + - + + + + + + + @@ -78,5 +84,6 @@ + \ No newline at end of file From d46e953ec3236ba4d36021a2142f094817be5cce Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Tue, 3 Dec 2024 20:27:03 +0530 Subject: [PATCH 03/32] Added a view to fetch the item level detail --- entity/OrderViewEntities.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 7246782..65fac9f 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -35,6 +35,9 @@ + + + @@ -44,6 +47,9 @@ + + + @@ -75,15 +81,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 823764f5433035c5102436262cf6978a995ec712 Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Wed, 4 Dec 2024 10:36:49 +0530 Subject: [PATCH 04/32] Added the service to generate the feed file --- .../co/hotwax/netsuite/CreateOrderService.xml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 service/co/hotwax/netsuite/CreateOrderService.xml diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml new file mode 100644 index 0000000..b2fd440 --- /dev/null +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -0,0 +1,109 @@ + + + + + + Parameter to fetch Order details for a specific orderId. + + + The System Message Type ID for generating the Brokered Order Items Feed. + + + The System Message Remote Id for generating the Brokered Order Items Feed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From ab824606f10e3cc28744be6add0b6f33038085ef Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Wed, 4 Dec 2024 16:15:15 +0530 Subject: [PATCH 05/32] Remove the join of OPP from EligibleOrdersForNetSuiteView and join of OADJ from the OrderItemsForNetSuiteView --- entity/OrderViewEntities.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 65fac9f..5de50a9 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -65,12 +65,6 @@ - - - - - - @@ -92,7 +86,6 @@ - @@ -107,15 +100,7 @@ - - - - - - - - \ No newline at end of file From 1bbd388fc0530dfd96e44f5325a1ac3c9f02531a Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Wed, 4 Dec 2024 19:25:39 +0530 Subject: [PATCH 06/32] UPdated the service logic to preapre the HC gift card total and duplicate item map for discount --- .../co/hotwax/netsuite/CreateOrderService.xml | 78 ++++++++++++++++--- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index b2fd440..e33525d 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -6,10 +6,10 @@ Parameter to fetch Order details for a specific orderId. - The System Message Type ID for generating the Brokered Order Items Feed. + The System Message Type ID for generating the Orders Feed for Netsuite. - The System Message Remote Id for generating the Brokered Order Items Feed. + The System Message Remote Id for generating the Orders Feed for Netsuite. @@ -29,7 +29,6 @@ try (ordersItr = netsuiteOrders_find.iterator()) { - @@ -63,23 +62,82 @@ + + + + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + Parameter to fetch Order details for a specific orderId. @@ -36,132 +75,27 @@ - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + + \ No newline at end of file From 7239301db2dbf9ae6eb4b6686b0cbae665c9b2aa Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Thu, 5 Dec 2024 15:21:53 +0530 Subject: [PATCH 10/32] updated the service: 1. service to prepare the OrderDataMap 2. service to fetch the eligible order ids from the view and itr for each order and prepare OrderDataMap And added system message type and system message type parameter --- data/DbResourceData.xml | 12 ++ data/SystemMessageData.xml | 13 ++ .../co/hotwax/netsuite/CreateOrderService.xml | 180 ++++++------------ 3 files changed, 82 insertions(+), 123 deletions(-) create mode 100644 data/DbResourceData.xml create mode 100644 data/SystemMessageData.xml diff --git a/data/DbResourceData.xml b/data/DbResourceData.xml new file mode 100644 index 0000000..1604d65 --- /dev/null +++ b/data/DbResourceData.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/data/SystemMessageData.xml b/data/SystemMessageData.xml new file mode 100644 index 0000000..cbc9efd --- /dev/null +++ b/data/SystemMessageData.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index e33525d..b708458 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -1,6 +1,45 @@ - + + + + Parameter to fetch Order details for a specific orderId. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parameter to fetch Order details for a specific orderId. @@ -36,132 +75,27 @@ - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + + \ No newline at end of file From 210d9a2003cd25dba63c4596d6888956ba40285a Mon Sep 17 00:00:00 2001 From: nutan shinde Date: Thu, 5 Dec 2024 15:49:24 +0530 Subject: [PATCH 11/32] Added a view to fetch the eligible order ids and remove the eligiblity check from the main view --- entity/OrderViewEntities.xml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index c5e426b..dcb1680 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -2,11 +2,9 @@ - + + - - - @@ -14,6 +12,24 @@ + + + + + + + + + + + + + + + + + + @@ -65,10 +81,6 @@ - - - - @@ -109,11 +121,11 @@ - + - + From 3b699cf2ccfde0d469a86fc7d6048ea4b1092afb Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:03:22 +0530 Subject: [PATCH 12/32] added the communicationeventandorder view. --- entity/OrderViewEntities.xml | 57 ++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index dcb1680..8576020 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -22,7 +22,7 @@ - + @@ -75,6 +75,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -84,12 +111,14 @@ + + @@ -98,7 +127,14 @@ - + + + + + + + + @@ -114,12 +150,19 @@ + + + + + + + @@ -131,4 +174,14 @@ + + + + + + + + + + \ No newline at end of file From 1212edf186003623a5709fb8bc0c105876ec0ba6 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:27:46 +0530 Subject: [PATCH 13/32] Added the groovy script and logic to convert the json into csv and send file on sftp location. --- data/DbResourceData.xml | 152 +++++++++- data/ServiceJobData.xml | 13 + .../co/hotwax/netsuite/CreateOrderService.xml | 284 ++++++++++++++++-- 3 files changed, 430 insertions(+), 19 deletions(-) create mode 100644 data/ServiceJobData.xml diff --git a/data/DbResourceData.xml b/data/DbResourceData.xml index 1604d65..327d0bc 100644 --- a/data/DbResourceData.xml +++ b/data/DbResourceData.xml @@ -1,10 +1,160 @@ - + + + if (attribute.attrName == "Gift Wrap Option") { + giftWrapOption = attribute.attrValue + isGiftWrap = "true" + } + if(attribute.attrName == "isShipBooklet") + isShipBooklet + } + } + orderMapDetail.put("giftWrapOption", giftWrapOption) + orderMapDetail.put("isGiftWrap", isGiftWrap) + + // Order Note + String orderNote = orderCommunicationEvent ? orderCommunicationEvent.getString("content") : "" + // Remove the \n character from the orderNote + orderNote = orderNote.replace("\n", " ") + orderMapDetail.put("orderNote", orderNote) + + String gorjanaSalesChannel = orderMapDetail.salesChannel + orderMapDetail.put("gorjanaSalesChannel", gorjanaSalesChannel) + + BigDecimal hcOrderTotal = BigDecimal.ZERO + + EntityList orderLevelAdjustment = ec.entity.find("co.hotwax.order.OrderItemAdjustmentAndAttribute") + .condition("orderId", orderMapDetail.orderId) + .condition("orderItemSeqId", "_NA_").list() + + if (orderLevelAdjustment) { + System.out.println("orderLevelAdjustment:" + orderLevelAdjustment) + BigDecimal orderLevelAdjustmentTotal = orderLevelAdjustment.collect { adj -> adj.getBigDecimal("amount") ?: BigDecimal.ZERO }.sum() + hcOrderTotal = hcOrderTotal.add(orderLevelAdjustmentTotal) + } + // Loop through each order item + orderMapDetail.orderItems.each { orderItem -> + + EntityValue ProductDetail = ec.entity.find("org.apache.ofbiz.product.product.Product") + .condition("productId", orderItem.productId ).one() + String packingCategory = "" + if("MARKETING_PKG_PICK" == ProductDetail.productTypeId){ + packingCategory = "4" + } + orderItem.put("packingCategory", packingCategory) + + + if ("POS Channel" != orderMapDetail.salesChannel){ + EntityValue defaultFacility = ec.entity.find("org.apache.ofbiz.product.facility.Facility") + .condition("facilityTypeId", "WAREHOUSE") + .condition("facilityId", "WH").one() + String location = defaultFacility ? defaultFacility.getString("externalId") : "" + orderItem.put("location", location) + orderItem.put("department", "2") + } + + // Calculate item total: unitPrice * quantity + BigDecimal unitPrice = (orderItem?.get("price") as BigDecimal) + BigDecimal quantity = (orderItem?.get("quantity") as BigDecimal) + BigDecimal itemTotal = unitPrice * quantity + hcOrderTotal = hcOrderTotal.add(itemTotal) + + EntityList orderItemLevelAdjustment = ec.entity.find("co.hotwax.order.OrderItemAdjustmentAndAttribute") + .condition("orderId", orderMapDetail.orderId) + .condition("orderItemSeqId", orderItem.orderItemSeqId).list() + + if(orderItemLevelAdjustment) { + BigDecimal itemAdjustmentTotal = orderItemLevelAdjustment.collect { adj -> adj.get("amount") ?: BigDecimal.ZERO }.sum() + hcOrderTotal = hcOrderTotal.add(itemAdjustmentTotal) + } + + String orderLineTypeId = "" + + if(orderItem.isDiscountRow){ + orderLineTypeId = "HC_DISCOUNT_${orderItem.orderItemSeqId}" + } + + orderItem.put("orderLineTypeId", orderLineTypeId) + // Query the OrderItemAttribute entity for Option Font and Option Text at the item level + EntityList orderItemAttributes = ec.entity.find("org.apache.ofbiz.order.order.OrderItemAttribute") + .condition("orderId", orderItem.orderId) + .condition("orderItemSeqId", orderItem.orderItemSeqId) + .useCache(true) + .list() + + // Initialize variables to hold the Option Font and Option Text values + String optionFont = "" + String optionText = "" + String giftWrapText = "" + String finalSale = "" + + if (orderItemAttributes) { + // Loop through the attributes and check for Option Font and Option Text + orderItemAttributes.each { attribute -> + if (attribute.attrName == "Font") { + optionFont = attribute.attrValue + } + if (attribute.attrName == "Text") { + optionText = attribute.attrValue + } + if (attribute.attrName == "Direction") { + direction = attribute.attrValue + } + if (attribute.attrName == "Gift Wrap") { + giftWrapText = attribute.attrValue + } + if(attribute.attrName == "Final Sale"){ + finalSale = attribute.attrValue + } + } + // If direction is available, append it to the Option Text + if (direction) { + optionText = "${optionText} Direction: ${direction}" + } + } + // Add Option Font and Option Text to the order item + orderItem.put("optionFont", optionFont) + orderItem.put("OptionText", optionText) + orderItem.put("GiftWraperText", giftWrapText) + orderItem.put("finalSale", finalSale) + } + + orderMapDetail.put("hcOrderTotal", hcOrderTotal) + // Return the updated orderMapDetail + orderData = orderMapDetail + return orderData + ]]> diff --git a/data/ServiceJobData.xml b/data/ServiceJobData.xml new file mode 100644 index 0000000..e02aa38 --- /dev/null +++ b/data/ServiceJobData.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index b708458..9dcabd0 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -23,8 +23,8 @@ - - + + @@ -38,6 +38,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -50,19 +217,46 @@ The System Message Remote Id for generating the Orders Feed for Netsuite. + + Parameter to fetch Order details after specific order date + + + Parameter to fetch Order details after specific order date + + + Parameter to fetch Order details for specific sales channel + - + + + + + + + + + + + - - + + + + + \ No newline at end of file From c26d7d2f31bcd9a2fbbbdd8552b353aed5986949 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:53:30 +0530 Subject: [PATCH 14/32] Added comments in the viewEntity. --- entity/OrderViewEntities.xml | 68 +++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 8576020..a80c249 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -2,8 +2,17 @@ + + @@ -25,6 +34,44 @@ + @@ -138,6 +185,23 @@ + @@ -165,6 +229,7 @@ + @@ -175,6 +240,7 @@ + From edea2031a496cb3ef182bd9d2528a79d23b3b240 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:58:15 +0530 Subject: [PATCH 15/32] Added the comments and TODO in the service. --- .../co/hotwax/netsuite/CreateOrderService.xml | 170 +++++++++++++++--- 1 file changed, 148 insertions(+), 22 deletions(-) diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index 9dcabd0..7d1e75f 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -1,6 +1,21 @@ + Parameter to fetch Order details for a specific orderId. @@ -71,7 +86,13 @@ processedOrderMap.remove("shippingAreaCode") processedOrderMap.remove("shippingContactNumber") - // Logic to use shipping address as billing address if billing details are missing + /* + Logic to use shipping address as billing address if billing details are missing + The purpose of this logic is to handle scenarios where the billing address is missing from the order data. + In such cases, we use the shipping address as a fallback to ensure that we still have a valid billing address + available to create the order in NetSuite. A country is a required field for NetSuite order creation, + */ + if (!orderMap.billingContactMechId && orderMap.shippingContactMachId) { log.info("Billing address is missing. Using shipping address as billing address."); processedOrderMap.put("billingAddress1", orderMap.shippingAddress1); @@ -83,6 +104,23 @@ } ]]> + + @@ -97,32 +135,42 @@ def manualRefSet = new HashSet() def refundedSet = new HashSet() + // Identify refunded gift card payments by checking the parent reference number for (giftCardPayment in GiftCardPaymentList) { if (giftCardPayment.parentRefNumber) { - refundedSet.add(giftCardPayment.parentRefNumber) + refundedSet.add(giftCardPayment.parentRefNumber) // Mark as refunded if a parentRefNumber exists } } + // Sum amounts of non-refunded gift cards, ensuring we don't double-count gift cards for (giftCardPayment in GiftCardPaymentList) { if (!refundedSet.contains(giftCardPayment.manualRefNumber) && !manualRefSet.contains(giftCardPayment.manualRefNumber)) { totalNonRefundedGiftCardAmount += giftCardPayment.amount - manualRefSet.add(giftCardPayment.manualRefNumber) + manualRefSet.add(giftCardPayment.manualRefNumber) // Avoid double-counting gift cards } } - ]]> - - - + + @@ -135,8 +183,23 @@ processedOrderItem.remove("itemStatus"); processedOrderItem.put("orderLineId", processedOrderItem.orderItemSeqId) processedOrderItem.put("priceLevel", "custom") - ]]> + @@ -149,14 +212,45 @@ processedOrderItem.remove("shipmentMethodTypeId") ]]> - + + + + - + @@ -184,8 +278,16 @@ - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -169,6 +322,7 @@ - For Digital Goods, the tax code is sent as "-Not Taxable-" to NetSuite.(in some cases vary based on the ) The current hardcoded "AVATAX" may not be suitable for all product types. - We can create the record in integration type mapping based on the product types. + - Or we can modify this in custom groovy file. --> @@ -182,24 +336,7 @@ processedOrderItem.put("closed", isClosed); processedOrderItem.remove("itemStatus"); processedOrderItem.put("orderLineId", processedOrderItem.orderItemSeqId) - processedOrderItem.put("priceLevel", "custom") ]]> - @@ -258,9 +395,30 @@ - + + + + + + + + + + + + + + + + + + + @@ -308,168 +466,4 @@ - - - - Parameter to fetch Order details for a specific orderId. - - - The System Message Type ID for generating the Orders Feed for Netsuite. - - - The System Message Remote Id for generating the Orders Feed for Netsuite. - - - Parameter to fetch Order details after specific order date - - - Parameter to fetch Order details after specific order date - - - - Parameter to fetch Order details for specific sales channel - - - Parameter to exclude the Orders from the specific sales channel - - - Parameter to fetch Order details for specific shipment method - - - Parameter to exclude the Orders from the specific shipment method - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 108e326e82590b79705939622ff119bc3299dd7a Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:05:38 +0530 Subject: [PATCH 19/32] Added upgrade data. --- data/ServiceJobData.xml | 4 ++-- data/UpgradeData_Upcoming.xml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 data/UpgradeData_Upcoming.xml diff --git a/data/ServiceJobData.xml b/data/ServiceJobData.xml index aa59351..4a03ff8 100644 --- a/data/ServiceJobData.xml +++ b/data/ServiceJobData.xml @@ -6,8 +6,8 @@ - - + + diff --git a/data/UpgradeData_Upcoming.xml b/data/UpgradeData_Upcoming.xml new file mode 100644 index 0000000..0101cf7 --- /dev/null +++ b/data/UpgradeData_Upcoming.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file From 68a40ea1d851d52e054e10ef27ac91581d2a9b74 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:22:13 +0530 Subject: [PATCH 20/32] Added the subselect in the EligibleOrdersForNetSuiteView to add a check on shipping method while fetching the eligible orderIds --- entity/OrderViewEntities.xml | 37 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index f78f539..55932e4 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -27,11 +27,16 @@ + + + + + - diff --git a/data/UpgradeData_Upcoming.xml b/data/UpgradeData_Upcoming.xml index 0101cf7..5cb3a82 100644 --- a/data/UpgradeData_Upcoming.xml +++ b/data/UpgradeData_Upcoming.xml @@ -11,7 +11,7 @@ parameterName="resourcePath" parameterValue="" systemMessageRemoteId=""/> - diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index 1222b36..a7b6c8e 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -18,11 +18,16 @@ Parameter to fetch Order details after specific order date - - Parameter to fetch Order details for specific shipment method + + + Parameter to fetch Order details for specific shipment method or a list of shipping method + like: POS_COMPLETED,STORE_PICKUP + - - Parameter to exclude the Orders from the specific shipment method + + Parameter to exclude the Orders from the specific shipment method or a list of shipping method + like: POS_COMPLETED,STORE_PICKUP + @@ -37,7 +42,6 @@ need to figure out how we can put the checks for include and exclude shipment method. --> @@ -435,10 +436,11 @@ - + + From 237bd923b2a67018b46ec5468897df2b67003976 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:38:38 +0530 Subject: [PATCH 23/32] added comment in subselect --- entity/OrderViewEntities.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 55932e4..1d68d7f 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -27,7 +27,6 @@ - @@ -189,7 +188,7 @@ - + + serviceName="co.hotwax.netsuite.CreateOrderService.generate#CreateOrderFeed" cronExpression="0 0/15 * * * ?" paused="Y"> diff --git a/data/UpgradeData_Upcoming.xml b/data/UpgradeData_Upcoming.xml index 5cb3a82..f0b919d 100644 --- a/data/UpgradeData_Upcoming.xml +++ b/data/UpgradeData_Upcoming.xml @@ -12,7 +12,7 @@ + serviceName="co.hotwax.netsuite.CreateOrderService.generate#CreateOrderFeed" cronExpression="0 0/15 * * * ?" paused="Y"> diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index b7333fa..38996f6 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -83,11 +83,11 @@ - - + + + + receivePath="${contentRoot}/CreateOrderFeed/createOrderFeed-${dateTime}.csv"/> + + + diff --git a/data/UpgradeData_Upcoming.xml b/data/UpgradeData_Upcoming.xml index f0b919d..6726a48 100644 --- a/data/UpgradeData_Upcoming.xml +++ b/data/UpgradeData_Upcoming.xml @@ -1,12 +1,24 @@ + + + + receivePath="${contentRoot}/CreateOrderFeed/createOrderFeed-${dateTime}.csv"/> + + + diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index 38996f6..5d1b530 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -33,9 +33,16 @@ + + + + + + - - + - - - - - diff --git a/upgrade/upgrade_upcomming/upgradeSteps.md b/upgrade/upgrade_upcomming/upgradeSteps.md index 1d2cdb4..ef85f8f 100644 --- a/upgrade/upgrade_upcomming/upgradeSteps.md +++ b/upgrade/upgrade_upcomming/upgradeSteps.md @@ -12,4 +12,5 @@ ### System message type 1. New system message type and system message type parameter is added. - NetSuiteOrderItemsFeed +- NetSuitePOSOrderItemsFeed 2. configure the send path in the system message type as per the required directory path. From 0b677aae86b616aab39d9b969250f22f5cce5b9a Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:50:26 +0530 Subject: [PATCH 26/32] added the enum code in the view --- entity/OrderViewEntities.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 1d68d7f..20bff1d 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -164,6 +164,7 @@ + From f71111e24f775f91d32e6908133bcc4c1ff11e2e Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:53:24 +0530 Subject: [PATCH 27/32] remove the sales channel enum code after processing. --- service/co/hotwax/netsuite/CreateOrderService.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/CreateOrderService.xml index 5d1b530..21cb82a 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/CreateOrderService.xml @@ -115,6 +115,7 @@ def order = context.get("result") def orderItems = order.remove("orderItems") def orderId = order.remove("orderName") + order.remove("salesChannelEnumCode") def flattenedOrders = [] orderItems.each { item -> item.put("orderId", orderId) From 7e56cf5629667fcad68deda9609b087c3fa48ffc Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Tue, 24 Dec 2024 11:12:14 +0530 Subject: [PATCH 28/32] Added a view entity (InvalidOrdersForNetsuite) to exculde the invalid orders from the EligibleOrdersForNetSuiteView view. --- entity/OrderViewEntities.xml | 24 +++++++++++++++++++ ...msViewWntities.xml => omsViewEntities.xml} | 0 2 files changed, 24 insertions(+) rename entity/{omsViewWntities.xml => omsViewEntities.xml} (100%) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 20bff1d..919c7d2 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -30,9 +30,13 @@ + + + + @@ -235,4 +239,24 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/entity/omsViewWntities.xml b/entity/omsViewEntities.xml similarity index 100% rename from entity/omsViewWntities.xml rename to entity/omsViewEntities.xml From cfb7d4786b77b02e4b7e61c51ebcb45bbeff41de Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Sat, 28 Dec 2024 20:53:09 +0530 Subject: [PATCH 29/32] Added the service def for productPromo here for now, As deleted from oms-usl-udm. --- entity/OrderViewEntities.xml | 4 ++-- entity/omsViewEntities.xml | 29 ++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/entity/OrderViewEntities.xml b/entity/OrderViewEntities.xml index 919c7d2..1f8aeb7 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/OrderViewEntities.xml @@ -178,7 +178,7 @@ - + @@ -188,7 +188,7 @@ - + diff --git a/entity/omsViewEntities.xml b/entity/omsViewEntities.xml index ed9da9c..c053679 100644 --- a/entity/omsViewEntities.xml +++ b/entity/omsViewEntities.xml @@ -2,6 +2,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10,7 +37,7 @@ - + From e44ade97184208dd1e71678e9a81aaf8643fe543 Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:17:15 +0530 Subject: [PATCH 30/32] Updated the file name --- ...ewEntities.xml => NesuiteViewEntities.xml} | 82 ++++++++++--------- entity/omsViewEntities.xml | 1 - 2 files changed, 42 insertions(+), 41 deletions(-) rename entity/{OrderViewEntities.xml => NesuiteViewEntities.xml} (84%) diff --git a/entity/OrderViewEntities.xml b/entity/NesuiteViewEntities.xml similarity index 84% rename from entity/OrderViewEntities.xml rename to entity/NesuiteViewEntities.xml index 1f8aeb7..842df1c 100644 --- a/entity/OrderViewEntities.xml +++ b/entity/NesuiteViewEntities.xml @@ -1,18 +1,16 @@ - - + - + @@ -21,7 +19,13 @@ - + + + + + + + @@ -38,18 +42,18 @@ + - - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -127,7 +131,7 @@ - + @@ -176,7 +180,7 @@ - + @@ -186,16 +190,15 @@ - - - - + + + + - - + @@ -239,7 +242,6 @@ - diff --git a/entity/omsViewEntities.xml b/entity/omsViewEntities.xml index c053679..eafe3ec 100644 --- a/entity/omsViewEntities.xml +++ b/entity/omsViewEntities.xml @@ -37,7 +37,6 @@ - From d17398ca786236ee1bacdc895f976f9ed782b21b Mon Sep 17 00:00:00 2001 From: Nutan Shinde <112821431+Shinde-nutan@users.noreply.github.com> Date: Thu, 9 Jan 2025 04:55:20 +0000 Subject: [PATCH 31/32] Updated the file name and job name --- data/ServiceJobData.xml | 4 +- data/SystemMessageData.xml | 15 ++++---- data/UpgradeData_Upcoming.xml | 37 +++++++++---------- ...eateOrderService.xml => OrderServices.xml} | 17 +++------ upgrade/upgrade_upcomming/upgradeSteps.md | 16 ++++---- 5 files changed, 41 insertions(+), 48 deletions(-) rename service/co/hotwax/netsuite/{CreateOrderService.xml => OrderServices.xml} (97%) diff --git a/data/ServiceJobData.xml b/data/ServiceJobData.xml index 6994364..856837e 100644 --- a/data/ServiceJobData.xml +++ b/data/ServiceJobData.xml @@ -1,8 +1,8 @@ - + diff --git a/data/SystemMessageData.xml b/data/SystemMessageData.xml index d8908e0..20e81cd 100644 --- a/data/SystemMessageData.xml +++ b/data/SystemMessageData.xml @@ -1,24 +1,23 @@ - + receivePath="${contentRoot}/CreateOrderFeed/cashsale/createOrderFeed-${dateTime}.csv"/> + receivePath="${contentRoot}/CreateOrderFeed/salesorder/createOrderFeed-${dateTime}.csv"/> - - - \ No newline at end of file + diff --git a/data/UpgradeData_Upcoming.xml b/data/UpgradeData_Upcoming.xml index 6726a48..1f6b320 100644 --- a/data/UpgradeData_Upcoming.xml +++ b/data/UpgradeData_Upcoming.xml @@ -1,36 +1,35 @@ + + + + + + + + + + - + receivePath="${contentRoot}/CreateOrderFeed/cashsale/createOrderFeed-${dateTime}.csv"/> + receivePath="${contentRoot}/CreateOrderFeed/salesorder/createOrderFeed-${dateTime}.csv"/> - - - - - - - - - - - - \ No newline at end of file diff --git a/service/co/hotwax/netsuite/CreateOrderService.xml b/service/co/hotwax/netsuite/OrderServices.xml similarity index 97% rename from service/co/hotwax/netsuite/CreateOrderService.xml rename to service/co/hotwax/netsuite/OrderServices.xml index 21cb82a..02009db 100644 --- a/service/co/hotwax/netsuite/CreateOrderService.xml +++ b/service/co/hotwax/netsuite/OrderServices.xml @@ -1,6 +1,5 @@ - @@ -45,9 +44,6 @@ productStoreId:productStoreId], false)"/> - - + remote ${systemMessageRemoteId} saved response in messages ${FeedSysMsgOut.systemMessageId}"/> -