Skip to content

@W-21188588 Default to ECOM Shipping when OMS does not return shipping#3639

Merged
sf-deepali-bharmal merged 5 commits intodevelopfrom
W-21188588/defaultToEcomShipment
Feb 5, 2026
Merged

@W-21188588 Default to ECOM Shipping when OMS does not return shipping#3639
sf-deepali-bharmal merged 5 commits intodevelopfrom
W-21188588/defaultToEcomShipment

Conversation

@sf-deepali-bharmal
Copy link
Contributor

@sf-deepali-bharmal sf-deepali-bharmal commented Feb 5, 2026

Description

Summary

When an order has OMS data but no OMS shipments (e.g. omsData.shipments is empty), the order details page now defaults to the ECOM shipment display instead of the OMS-only view.
Shoppers see the normal delivery block with Shipping Method and Shipping Address from ECOM for both single- and multi-shipment orders.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • app/pages/account/order-detail.jsx
  • hasOmsShipment: New check that OMS has at least one shipment
  • showShipmentsFromOmsOnly: isOmsOrder && hasOmsShipment && isMultiShipmentOrder.
  • The OMS-only block (shipment methods only, no addresses) is shown only when the order has OMS data, OMS has shipments, and it's a multi-shipment order.

How to Test-Drive This PR

  • Create a multi shipment order, ingest order to oms and oms not returning shipment

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team February 5, 2026 17:33
@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team as a code owner February 5, 2026 17:33
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Feb 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

sf-xingquan-jin
sf-xingquan-jin previously approved these changes Feb 5, 2026
ddiazccrz
ddiazccrz previously approved these changes Feb 5, 2026
sf-cboscenco
sf-cboscenco previously approved these changes Feb 5, 2026
sf-madhuri-uppu
sf-madhuri-uppu previously approved these changes Feb 5, 2026
() => (order?.omsData?.shipments?.length ?? 0) > 0,
[order?.omsData?.shipments?.length]
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the optional chaining at one place? Something like:

const shipmentCount = order?.omsData?.shipments?.length ?? 0;
const hasOmsShipment = useMemo(() => shipmentCount > 0, [shipmentCount]);

[order?.omsData?.shipments?.length, order?.shipments?.length]
)

const showShipmentsFromOmsOnly = isOmsOrder && hasOmsShipment && isMultiShipmentOrder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this variable could be showMultiShipmentsFromOmsOnly

@sf-deepali-bharmal sf-deepali-bharmal force-pushed the W-21188588/defaultToEcomShipment branch from e51b66e to 9f206e1 Compare February 5, 2026 20:13
@sf-deepali-bharmal sf-deepali-bharmal merged commit 2c809bb into develop Feb 5, 2026
42 checks passed
@sf-deepali-bharmal sf-deepali-bharmal deleted the W-21188588/defaultToEcomShipment branch February 5, 2026 21:27
unandyala pushed a commit that referenced this pull request Feb 10, 2026
#3639)

* Default to ECOM Shipping when OMS does not return shipping

* Add changelog

* lint fix

* nit optional check

* variable rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants