Loading
Prepare for Email to Become the Default Login ExperienceRead More
Automate Your Business Processes with Salesforce Flow
Create Fulfillment Orders Action

Create Fulfillment Orders Action

In Salesforce Order Management, create fulfillment orders and fulfillment order products for multiple order delivery group summaries, each of which defines a recipient and delivery method. You specify the order product summaries to fulfill and the fulfillment locations to handle them. If you specify multiple fulfillment locations for one order delivery group summary, a fulfillment order is created for each one.

Required Editions

Available in: Lightning Experience
View supported editions.
This feature requires the Salesforce Order Management add-on. To purchase, contact your Salesforce account executive.

In Flow Builder, add an Action element to your flow. Select the Order Management category, and search for Create Fulfillment Orders.

Set Input Values

Use values from earlier in the flow to set the inputs.

Input Parameter Description
Fulfillment Orders Input

This input is an Apex-defined variable of class ConnectApi.MultipleFulfillmentOrderInputRepresentation.

The variable has one field: fulfillmentOrders. This field is a list of Apex-defined variables of class ConnectApi.FulfillmentOrderInputRepresentation. Each variable has three fields:

  • fulfillmentGroups — A list of Apex-defined variables of class ConnectApi.FulfillmentGroupInputRepresentation. A fulfillment order is created for each fulfillment group. A group represents a set of order product summaries to fulfill from a single location using the same fulfillment type. Each fulfillment group variable has these fields:
    • fulfilledFromLocationId — Reference to the fulfillment location.
    • fulfillmentType — The fulfillment type. Specify one of the values that you defined for the Type field picklist on the Fulfillment Order object.
    • orderItemSummaries — A list of Apex-defined variables of class ConnectApi.OrderItemSummaryInputRepresentation. Each variable has these fields:
      • orderItemSummaryId — Reference to an order product summary.
      • quantity — The quantity of the order product summary to allocate to the fulfillment order.
    • referenceId — Reference to the fulfillment group input. Use this value to troubleshoot a failure.
  • orderDeliveryGroupSummaryId — Reference to the order delivery group summary associated with the order product summaries.
  • orderSummaryId — Reference to the order summary associated with the order product summaries.

Store Output Values

Output Parameter Description
Fulfillment Orders Output

This value is an Apex-defined variable of class ConnectApi.MultipleFulfillmentOrderOutputRepresentation.

The variable has one field: fulfillmentOrders. This field is a list of Apex-defined variables of class ConnectApi.FulfillmentGroupOutputRepresentation. Each variable has these fields:

  • fulfilledFromLocationId — Reference to the fulfillment location. This value is included so that you can resubmit the creation if it fails.
  • fulfillmentOrderId — Reference to the created fulfillment order.
  • fulfillmentType — The fulfillment type. This value is included if the creation failed, so you can resubmit it.
  • orderDeliveryGroupSummaryId — Reference to the order delivery group summary associated with the order product summaries. This value is included if the creation failed, so you can resubmit it.
  • orderItemSummaries — A list of Apex-defined variables of class ConnectApi.OrderItemSummaryInputRepresentation. This value is included if the creation failed, so you can resubmit it. Each variable has these fields:
    • orderItemSummaryId — Reference to an order product summary.
    • quantity — The quantity of the order product summary to allocate to the fulfillment order.
  • orderSummaryId — Reference to the order summary associated with the order product summaries. This value is included if the creation failed, so you can resubmit it.
  • referenceId — Reference to the fulfillment group input. Use this value to troubleshoot a failure.

To set up the Fulfillment Orders Input:

  1. For each order delivery group:
    1. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or more ConnectApi.OrderItemSummaryInputRepresentation variables.
    2. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to the orderItemSummaries fields on one or more ConnectApi.FulfillmentGroupInputRepresentation variables, one for each fulfillment group.
    3. Use Assignment elements to set the fulfilledFromLocationId, fulfillmentType, and referenceId field values on the ConnectApi.FulfillmentGroupInputRepresentation variables.
    4. Use Assignment elements to add the ConnectApi.FulfillmentGroupInputRepresentation variables to the fulfillmentGroups field on a ConnectApi.FulfillmentOrderInputRepresentation variable.
    5. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on the ConnectApi.FulfillmentOrderInputRepresentation variable.
  2. Use Assignment elements to add the ConnectApi.FulfillmentOrderInputRepresentation variables to the fulfillmentOrders field on a ConnectApi.MultipleFulfillmentOrderInputRepresentation variable.
  3. Use the ConnectApi.MultipleFulfillmentOrderInputRepresentation variable in the action input.
 
Loading
Salesforce Help | Article