Auto Task Fulfillment Step

Use auto tasks to process data automatically as part of your orchestration plan. An auto task fulfillment step requires a Salesforce Flow to perform the automation.

DRO comes with these out-of-the-box flows:

Re-propagate Order Product Fields to Fulfillment Order Line Item Fields
This flow template retrieves the order line items associated with the step and syncs their field values with the corresponding fulfillment order line item fields.
Back Propagate Fulfillment Order Product Attributes to Order Product Attributes
This flow template retrieves fulfillment order line item attributes to update the associated order line item attributes.

The auto task triggers the flow during the fulfillment plan execution and your custom flow is activated. A step-specific configuration value can be passed from the auto task step to drive custom logic in the flow.

Note
Note
  • Auto tasks support only Auto Launch Flow types. In the flow, set Autolaunched Flows with No Flow Trigger as the process type.
  • To re-propagate, update the Transform Order Product element to map the appropriate fields for transformation. To back propagate, update the Define Attribute Name element to specify the attribute that must propagate.

Here are the types of input variables that you can use in the flow templates:

stepId
The ID of the auto task.
recordId
The ID of the order line item or fulfillment order line item record that the Fulfillment Step Source relation record associates with the auto task.
recordIds
A collection of identifiers of the order item or fulfillment order line item records that the Fulfillment Step Source relation record associates with the auto task.
planSourceIdentifierId
The ID of the order record associated with the fulfillment plan.
stepConfigParameter
Value used to enable custom logic in the flow.

Here are the output variables used in the flow templates.

isSuccess
Indicates if the flow execution is successful.
fulfillmentStepErrorMessage
Contains the error details stored for the fulfillment step.Shows an execution error message with an error code that’s logged.
fulfillmentStepErrorCode
Identifies the error and is matched against the Fulfillment Fallout Rules decision table.

Configure a Fault Path for Automated Retry

To make a failed auto task eligible for automated retry, connect the invocable action's Fault connector to an Assignment element. In the Assignment element, set the existing output variables as follows:

  • Set isSuccess to false.
  • Set fulfillmentStepErrorCode to an error code that matches a Fulfillment Fallout Rule.
  • Set fulfillmentStepErrorMessage to {!$Flow.FaultMessage} or another message that describes the error.

Dynamic Revenue Orchestrator uses these flow output variables to determine the step result and select a retry rule. It doesn't inspect the exception handling in the Apex action.

For example, configure the flow as follows:

  1. Add an invocable Action element that calls the Apex class.
  2. Connect the Action element's Fault connector to an Assignment element.
  3. In the Assignment element, set isSuccess, fulfillmentStepErrorCode, and fulfillmentStepErrorMessage.
  4. Connect the Assignment element to the flow output.
Note
Note An Apex try/catch block or AuraHandledException alone doesn't enable automated retry. If the Apex action throws an unhandled exception and the flow has no Fault Path, the flow interview ends with an Error status. Dynamic Revenue Orchestrator sets the fulfillment step status to FATALLY_FAILED without retrying the step, even if a Fulfillment Fallout Rule is configured.

For the rule-matching requirements and retry policies, see Design and Manage Fulfillment Fallout.