Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Customize Order Management Flows

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain what a flow is.
  • Describe the two types of flows.
  • List and describe the Order Management flow templates.
  • List ways you can customize or configure flows.
  • Explain how to make Service flows available on the Order Summary Record page.

Set Up Flows for Order Management

Order Management works with Flow Builder, a tool that lets you create manual and automated functions in your org. Flows collect data and perform actions in your Salesforce org or an external system. There are two types of flows.

  • Screen: Automate a business process that collects data from people, such as a guided tutorial or wizard with screens.
  • Autolaunched: Launch a flow internally when a record changes or when a user clicks a button.

Use two types of flows with OrderManagement: Screen and autolaunched.

Take a look at the Flow Builder section in Automate Your Business Processes within Salesforce Help to familiarize yourself with this tool.

Order Management Flows

Order Management comes with a set of flow templates. Linda Rosenberg, the admin, can’t use them directly. Instead, she must copy them, customize them, and configure her system to use the copies. She can launch some of them manually, while the system automatically launches others. 

Flow

Flow Type

Launch type

Cancel Item

Screen

Manual

Create Order Summary

Autolaunched

System

Create Process Exception

Autolaunched

System

Discount

Screen

Manual

Even Exchange Flow (requires a Salesforce Order Management Growth license)

Screen

Manual

Order On Behalf Of (OOBO)

Screen

Manual

Reship Order (requires a Salesforce Order Management Growth license)

Screen

Manual

Return Item

Screen

Manual

Return Merchandise Authorizations (RMA) Create Credit Memo and Ensure Refunds Flow

Autolaunched

System

RMA Return Items

Screen

Manual

The system launches autolaunched flows under these circumstances.

  • Create Order Summary: When an Order record is created or updated, and its StatusCode is Activated.
  • Create Process Exception: When a Process Exception Event platform event is created.
  • RMA Create Credit Memo and Ensure Refunds: When a Return Order record with lifecycle type Managed is updated and its StatusCategory is Closed.

Flow Considerations

Flows can’t use localized labels. If Linda wants to include localized screen or message text in a flow, she must create a copy of the flow with hard-coded text in the desired language.

If Linda adds a custom field to an object that’s used in a flow, she must also customize the flow to handle it.

A change order is an Order record. If you add a required custom field to the Order object, make sure you update the service flows to set that field when the user creates a change order. If a flow tries to create an order and doesn’t set that field, it fails.

Customize and Configure Flow Templates

Once Linda copies a flow template, she can customize it. Here’s how to create a flow from a template.

  1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
  2. Copy and activate the flow that you want to customize.
  3. Click New Flow.

Linda can now customize the flow such as in these examples.

  • Use a different allocatedItemsChangeOrderType value with the Discount Item flow.
  • Use Salesforce Onnichannel inventory.
  • Configure reasons for a Cancel, Discount, Return, or Even Exchange.
  • Configure return merchandise authorization (RMA).

Customize the Discount Item Flow

By default, the Discount Item flow calls the Adjust Order Item Summary action with an allocatedItemsChangeOrderType value of InFulfillment. This process creates a separate change order for order items that are being fulfilled. Linda wants to use a different process, and is glad to know that it’s as easy as setting a different value.

If you plan to use unmanaged order summaries, customize the Create Order Summary flow logic to assign the order lifecycle type. The default flow always creates managed order summaries. See Order Management Lifecycle.

Use Salesforce Omnichannel Inventory

If you use Salesforce Omnichannel Inventory, you need to customize.

  • In the Even Exchange flow, set the applyOCI and useLocationGroups variables to true. The default value of these variables is false.
  • In the Reship Order flow, set the applyOCI variable to true. The default value of this variable is false.

Configure Reasons

The Cancel Item, Discount, Return Item, and Even Exchange flows require the user to select a reason for the action from a dropdown list. Reasons can include Wrong Item and Customer Changed Mind, for example. Here’s how to define a list of reasons, and add them to the picklist values for the Reason field on the Order Product Summary Change object.

  1. From Setup, in the Quick Find box, enter Object Manager, and then select Object Manager.
  2. Select the Order Product Summary Change object.
  3. Click Fields & Relationships.
  4. Select the reason.
    Add reasons for an order product summary change.
  5. Add your reasons to the Reason Picklist Values.
  6. Select a default value.

Configure Return Merchandise Authorization (RMA)

Here’s how to specify a default user and return reasons for return merchandise authorizations. All reasons for return values on the Return Order Line Item must have matching reason values on the Order Product Summary change.

  1. Specify a Default Workflow user. Certain actions in the RMA flow run as this user.
    • From Setup, in the Quick Find box, enter Process Automation Settings, and select Process Automation Settings.
      In the org, specify a Default Workflow user. Certain actions in the RMA flow run as this user.
    • In the Default Workflow User field, enter the name of a user with the System Administrator profile. You can click the search icon to open a user search window.
  1. Add your return reasons to the Return Order Line Item object.
    • From Setup, in the Quick Find box, enter Object Manager, and select Object Manager.
    • Select Return Order Line Item.
    • Select Fields & Relationships.
    • Select the Reason for Return.
    • Add your return reasons to the Reason for Return Picklist Values.
    • Select a default value.
    • Verify that all of these entries are also in the Reason picklist on the Order Product Summary change.

Make Service Flows Available on the Order Summary Record Page

Linda gives users access to her flows by adding them to the Actions & Recommendations component on the order summary FlexiPage. Here’s how she does it.

  1. From Setup, in the Quick Find box, enter Actions & Recommendations, and select Actions & Recommendations.
  2. Click New Deployment, then click Next.
  3. After you name the deployment, select Flows and quick actions.
  4. Deselect Recommendations and click Next.
    Add flows to the Actions & Recommendations component on the order summary FlexiPage.
  5. In the Available Objects list, find Order Summary, move it to the Selected Objects list, and click Next.
  6. Select the Default tab.
  7. In the All Actions list, find your cloned flows and drag them to the Top Pinned section.
  8. Select your flows and click Unmark Removable.
  9. Click Next and then Save.

Add Service Flows to the Order Summary Record Page

Linda must have an order summary record in her org if she wants to edit the default record page. Because order summaries require several related records, don’t try to manually create one. Simply create and activate an order, which triggers the Create Order Summary flow. Here’s how to add the service flows to the default layout.  

  1. Open an order summary record page.
  2. From the Setup menu, select Edit Page.
    Open an order summary record to edit the page layout.
  3. Select the Actions & Recommendations component in the preview layout.
  4. In the Actions & Recommendations Deployment field, select the deployment you created, and click Save.
  5. In the dialog that appears, click Activate, and then Save.
  6. Click Activation.
  7. Save the page layout as the org default.

Next Steps

In this unit, you explored Flow Builder, the flow templates available with Order Management, and how you can customize your flows. Next, learn how to configure certain checkout features.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback