Configure navigation between order history and order details

Prev Next

This article is for Salesforce admins, implementation partners, and solution consultants who need to configure how buyers move from the storefront order history page into order details and back again.

Understand the two navigation directions

This setup has two separate navigation decisions:

  • Forward navigation from the order history page into order details
  • Back navigation from the order details experience back to order history

Configure these directions independently.

Forward navigation is controlled on the order history component. Back navigation is controlled on the order details component. The settings do not automatically mirror each other.

Choose a forward-navigation model

Use named-page navigation as the default storefront pattern. It keeps buyers in an Experience Builder page flow and remains the safest option for backward compatibility.

Use record-detail navigation only when your implementation intentionally routes buyers into a Web_Order__c record experience. This is an advanced option because the destination must provide record context for the current order.

Forward-navigation model Best fit What you must provide How order details is resolved
Page Standard storefront implementations A named Experience Builder order details page The order details experience loads the order from the number URL parameter
Record Detail Advanced implementations that open a Salesforce record experience A Web_Order__c record page or equivalent record-driven page architecture The order details experience can load the order from the current page recordId

Before you begin

Before you configure navigation, confirm the following:

  • Your storefront already has an order history page with the General - Order Overview (LWC) component.
  • You know whether buyers should open a named storefront page or a record-detail experience.
  • If you plan to use named-page navigation, you know the Experience Builder page name for the order details page.
  • If you plan to use record-detail navigation, your implementation already exposes a Web_Order__c record page or equivalent record-aware page architecture for storefront users.
  • You know where the order details back link should send buyers: a storefront page or a Salesforce list view.

Configure named-page navigation from order history

Use this model when buyers should stay in a storefront page flow.

  1. Open your storefront in Experience Builder.
  2. Open the page that contains the order history component.
  3. Select General - Order Overview (LWC).
  4. Set Order Link Type to Page.
  5. Set Order Page Name to the Experience Builder page name for your order details page.
  6. Save and publish the site.

How Order Page Name works

Order Page Name is used only when Order Link Type is set to Page.

If you leave Order Page Name blank, the component falls back to Commerce_Order_Details. This is useful for storefronts that still use the standard order details page name.

What the order details page must support

When buyers open order details through named-page navigation, the order details experience expects the order number in the page URL.

In practice, this means:

  • The order history page sends buyers to a named Experience Builder page.
  • The destination page receives the order identifier in the number URL parameter.
  • The order details experience loads the order using that number value.

This is the recommended pattern for most storefronts because it keeps the buyer experience inside storefront-managed navigation.

Configure record-detail navigation from order history

Use this model only when your implementation intentionally routes buyers into a record-driven experience.

  1. Open your storefront in Experience Builder.
  2. Open the page that contains the order history component.
  3. Select General - Order Overview (LWC).
  4. Set Order Link Type to Record Detail.
  5. Leave Order Page Name empty or ignore it.
  6. Save and publish the site.

How record-detail navigation works

When Order Link Type is set to Record Detail:

  • The order history component opens the selected Web_Order__c record.
  • Order Page Name is ignored.
  • The destination must provide the current record context.

For this model to work reliably, buyers must land on a Web_Order__c record page or on an equivalent page architecture that provides the current order recordId.

This matters because the order details experience can load an order in two ways:

  • From the number URL parameter on a named page
  • From the current page recordId when the page is opened as a record page

If your record-detail destination does not provide the current recordId, the order details experience cannot resolve the order from record context.

Configure the order-details back link

Back navigation is configured on the order details experience, not on the order history page.

In Experience Builder, the order details wrapper component appears as Order - Detail. Use its back-link properties to decide where the buyer goes after viewing an order.

Setting What it controls When it applies
Back To Order History Link Type Chooses whether the back link opens a storefront page or a Salesforce list view Always
Back To Order History Link Defines the named page used by the back link Only when Back To Order History Link Type is Page

Back-link option 1: Storefront named page

Use this option when buyers should return to a storefront order history page.

  1. Open the page that contains the Order - Detail component.
  2. Set Back To Order History Link Type to Page.
  3. Set Back To Order History Link to the Experience Builder page name that should open when buyers click the back link.
  4. Save and publish the site.

If you leave Back To Order History Link blank, the component falls back to Commerce_Order_History.

Back-link option 2: Salesforce list view

Use this option when buyers should return to a standard Salesforce object list instead of a storefront page.

  1. Open the page that contains the Order - Detail component.
  2. Set Back To Order History Link Type to List.
  3. Save and publish the site.

With this option:

  • The back link opens the standard Web_Order__c list view.
  • Back To Order History Link is not used.

Recommended configuration patterns

Use these patterns as a starting point:

Goal Recommended forward navigation Recommended back navigation
Standard storefront buyer journey Page Page
Hybrid implementation that opens a record-driven order page but returns buyers to the storefront Record Detail Page
Record-driven support or operational experience Record Detail List

For most storefronts, Page to Page is the safest configuration because it preserves a storefront-oriented navigation model on both legs of the journey.

Test the full round trip

Test the complete navigation flow after you publish the site.

Test path for named-page navigation

  1. Open the storefront order history page as a buyer.
  2. Apply one or more filters so you can distinguish the current view.
  3. Click an order number.
  4. Confirm the named order details page opens.
  5. Confirm the correct order loads from the number URL parameter.
  6. Click the back link on the order details page.
  7. Confirm the buyer returns to the named page configured in Back To Order History Link.

Do not assume the built-in back link restores the previous filtered view automatically. The back link returns the buyer to the configured destination, but it does not automatically preserve the earlier order-history filters.

Test path for record-detail navigation

  1. Open the storefront order history page as a buyer.
  2. Click an order number.
  3. Confirm the buyer lands on the intended Web_Order__c record page or equivalent record-driven page.
  4. Confirm the order details experience loads the correct order from the current page recordId when no number URL parameter is present.
  5. Click the back link on the order details page.
  6. Confirm the buyer returns to the destination configured by Back To Order History Link Type.

Troubleshooting tips

If navigation does not behave as expected, check these areas first:

  • If buyers open the wrong storefront page, verify Order Link Type and Order Page Name on the order history component.
  • If buyers always open Commerce_Order_Details, check whether Order Page Name was left blank.
  • If a record-driven order details page does not load an order, verify that the destination page provides the current recordId.
  • If the back link opens the wrong destination, verify both Back To Order History Link Type and Back To Order History Link on the Order - Detail component.
  • If buyers return to order history without their earlier filters, remember that the built-in back link does not automatically restore the previous filtered state.