Skip to content

@W-20874529 - Integrate PWA Order Details with SOM/OMS#3573

Merged
sf-deepali-bharmal merged 4 commits intodevelopfrom
t/cc-sharks/W-20874529/IntegrateOrderDetailsWithSOM
Jan 15, 2026
Merged

@W-20874529 - Integrate PWA Order Details with SOM/OMS#3573
sf-deepali-bharmal merged 4 commits intodevelopfrom
t/cc-sharks/W-20874529/IntegrateOrderDetailsWithSOM

Conversation

@sf-deepali-bharmal
Copy link
Contributor

@sf-deepali-bharmal sf-deepali-bharmal commented Jan 13, 2026

Summary

Integrate Order Details page with Salesforce Order Management System (SOM) to display OMS order data when available.

Changes

Order API Enhancement

  • Added expand: 'oms' query parameter to the useOrder hook to fetch OMS data
  • API returns order data from OMS if the order is successfully ingested, otherwise returns data from ECOM

UI Improvements

  • Order Status: Shows order.status with fallback to omsData.status when available
  • Payment Section: Conditionally hidden when no payment data exists
  • Shipping Address Name: Shows firstName lastName if present, falls back to fullName

Bug Fixes

  • Added optional chaining for order.paymentInstruments?.[0] to prevent runtime errors
  • Added optional chaining for order.productItems?.reduce to handle missing data gracefully

Files Changed

  • packages/template-retail-react-app/app/pages/account/order-detail.jsx

Testing

  • Verified order details display correctly for orders with OMS data
  • Verified fallback to ECOM data when OMS data is not available
  • Verified graceful handling of missing payment/address data

Dependencies

  • Requires commerce-sdk-isomorphic update to support expand parameter on getOrder endpoint
  • Until official release, use local or unstable version of commerce-sdk-isomorphic

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

  • Check the PR description

How to Test-Drive This PR

  • Place order in an ECOM site which is connected to SOM, make sure order is ingested to OMS successfully. Now view Order Details from MyAccount page.

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 as a code owner January 13, 2026 23:34
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jan 13, 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-deepali-bharmal sf-deepali-bharmal force-pushed the t/cc-sharks/W-20874529/IntegrateOrderDetailsWithSOM branch from 456565f to 59b343d Compare January 14, 2026 00:38
@sf-deepali-bharmal sf-deepali-bharmal merged commit 1798f99 into develop Jan 15, 2026
42 checks passed
@sf-deepali-bharmal sf-deepali-bharmal deleted the t/cc-sharks/W-20874529/IntegrateOrderDetailsWithSOM branch January 15, 2026 22:25
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