Skip to content

@W-20874526 - Integrate Order History with OMS#3581

Merged
sf-deepali-bharmal merged 1 commit intodevelopfrom
W-20874526/ShowOMSDataOnOrderHistory
Jan 16, 2026
Merged

@W-20874526 - Integrate Order History with OMS#3581
sf-deepali-bharmal merged 1 commit intodevelopfrom
W-20874526/ShowOMSDataOnOrderHistory

Conversation

@sf-deepali-bharmal
Copy link
Contributor

Summary

This PR updates the Order History page to support displaying order data from Salesforce Order Management (SOM). When orders are ingested into SOM, the page now correctly displays OMS-specific data including order status and shipping address information.

Changes

order-history.jsx

  • Added expand: 'oms' parameter to useCustomerOrders hook to fetch OMS data
  • Updated order status display to fallback to omsData.status when ECOM status is not present
  • Updated shipping address name to use firstName + lastName with fallback to fullName (OMS uses fullName instead of separate name fields)

orders.test.js

  • Added createMockOrder and createMockOmsOrder test factory functions for consistent mock data
  • Added OMS/SOM Integration test suite for Order History with tests for:
    • ECOM order status display (order.status)
    • OMS order status display (omsData.status)
    • ECOM shipping address (firstName + lastName)
    • OMS shipping address (fullName)

Testing

  • All 32 tests passing

Related

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

  • This PR updates the Order History page to support displaying order data from Salesforce Order Management (SOM)

How to Test-Drive This PR

  • Integrate your ECOM site with SOM Org and place and order. Once your order is successfully ingested to SOM, load Order History page from PWA.

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 review from a team, alexvuong and ddiazccrz January 16, 2026 00:25
@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team as a code owner January 16, 2026 00:25
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jan 16, 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.

add changelog

update log
@sf-deepali-bharmal sf-deepali-bharmal force-pushed the W-20874526/ShowOMSDataOnOrderHistory branch from 806985f to fac30bf Compare January 16, 2026 00:28
order.shipments[0].shippingAddress.lastName
? `${order.shipments[0].shippingAddress.firstName} ${order.shipments[0].shippingAddress.lastName}`
: order.shipments[0].shippingAddress
.fullName
Copy link
Contributor

Choose a reason for hiding this comment

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

Can there be a case where fullname might not be populated?
If it always exists, it'd be cleaner to directly use it instead of a combination of firstName, lastName and further checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I am seeing FullName is always there. But I would like to not change the default behaviour late in the release.

@sf-deepali-bharmal sf-deepali-bharmal merged commit a3a923b into develop Jan 16, 2026
42 checks passed
@sf-deepali-bharmal sf-deepali-bharmal deleted the W-20874526/ShowOMSDataOnOrderHistory branch January 16, 2026 19:14
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.

5 participants