You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are encountering an issue in the generate#CreateOrderFeed service where orders containing mixed shipment methods are being included in both "include" and "exclude" feeds during the generation of order feeds for NetSuite.
Context:
The service uses the EligibleOrdersForNetSuiteView to fetch eligible orders based on conditions such as:
orderId
fromOrderDate and thruOrderDate
includeShipmentMethod (e.g., POS_COMPLETED)
excludeShipmentMethod (e.g., POS_COMPLETED)
Orders are scheduled for processing in two scenarios:
Include Feed: Includes orders with POS_COMPLETED shipment methods.
Exclude Feed: Excludes orders with POS_COMPLETED shipment methods.
Problem:
For orders with mixed shipment methods (e.g., one order item has POS_COMPLETED, and another has STANDARD), the order satisfies the conditions for both scenarios:
It gets included in the Include Feed because it has an item with the POS_COMPLETED shipment method.
It gets included in the Exclude Feed because it also contains an item with a different shipment method.
This leads to making this order eligible in both feeds.
Root Cause:
The current logic in the EligibleOrdersForNetSuiteView operates at the OrderHeader level and does not differentiate orders based on their item-level shipment methods.
The conditions applied (IN or NOT IN for shipment methods) are evaluated at the order level, causing mixed shipment method orders to match both include and exclude criteria.
The text was updated successfully, but these errors were encountered:
For this situation of mixed cart orders, where an order can have POS Completed items and Standard items we'd want that order to only be included in the Sales Order feed, not in the Cash Sale feed. To achieve this, I think in the EligibleOrdersForNetSuiteView entity we should include the count of distinct shipping methods. If there are more than 1 then the order is not eligible for POS completed feed.
We are encountering an issue in the
generate#CreateOrderFeed
service where orders containing mixed shipment methods are being included in both "include" and "exclude" feeds during the generation of order feeds for NetSuite.Context:
EligibleOrdersForNetSuiteView
to fetch eligible orders based on conditions such as:orderId
fromOrderDate
andthruOrderDate
includeShipmentMethod
(e.g.,POS_COMPLETED
)excludeShipmentMethod
(e.g.,POS_COMPLETED
)POS_COMPLETED
shipment methods.POS_COMPLETED
shipment methods.Problem:
For orders with mixed shipment methods (e.g., one order item has
POS_COMPLETED
, and another hasSTANDARD
), the order satisfies the conditions for both scenarios:POS_COMPLETED
shipment method.This leads to making this order eligible in both feeds.
Root Cause:
EligibleOrdersForNetSuiteView
operates at theOrderHeader
level and does not differentiate orders based on their item-level shipment methods.IN
orNOT IN
for shipment methods) are evaluated at the order level, causing mixed shipment method orders to match both include and exclude criteria.The text was updated successfully, but these errors were encountered: