Loading

Media Cloud: Flow Fails with 'sObjectInputReference' Error When Mapping Quote Line Items to Order Products

Publish Date: May 25, 2026
Description
This article addresses the Salesforce Media Cloud Flow validation error: "Because the object field has the value 'null', you also need to set the following fields: sObjectInputReference".

Symptoms

Users and administrators frequently encounter this issue when attempting the following actions:

  • Saving or activating a custom Flow that maps standard Quote Line Items (QuoteLineItem) or Ad Quote Line Items (AdQuoteLineItem) to Order Products (OrderItem) or Ad Order Items (AdOrderItem).

  • Overriding the standard Create Order quick action on the Quote (Media Plan) object with a custom action or Flow, which disrupts the out-of-the-box order creation process.

Cause

  1. Empty sObject Reference: The Flow Builder validator triggers this error on a Create Records (FlowRecordCreate) element when it is configured to use an sObject variable or separate fields, but the referenced object input variable (sObjectInputReference) is null or left blank at design time.

  2. Bypassed Core Mapping: Overriding the standard button bypasses the native, automated Media Cloud order generation architecture. In Media Cloud on Core, order creation and line-item transformations are managed natively via the MediaPlanTransactionContext context definition. This automatically handles the conversion of Quote Line Items to Order Products, as well as Ad Quote Line Items (AdQuoteLineItem) to Ad Order Items (AdOrderItem), rather than relying on manual Flow assignments.

Scope

  • Product: Salesforce Media Cloud (Advertising Sales Management on Core)

  • Editions: Enterprise, Performance, and Unlimited editions

  • Version: Summer '24 and later

Resolution
Follow these steps to resolve the immediate Flow validation error and restore standard line-item mapping.
 
Step 1: Fix the Empty sObject Input Reference in Flow Builder
  1. Navigate to Setup > Process Automation > Flows and open your failing Flow.

  2. Open the Create Records element targeting the line item object (e.g., OrderItem or AdOrderItem).

  3. Under How to Set the Record Fields, choose one of the following configurations:

    • Option A (Use all values from a record): Ensure the Record field points to a valid, single record variable of that object type (e.g., {!varNewOrderItem} or {!varNewAdOrderItem}). This satisfies the sObjectInputReference requirement.

    • Option B (Use separate resources, and literal values): Set the Object explicitly to Order Product or Ad Order Item and populate all minimum required fields.

  4. If looping through multiple records: Assign your values to a single-record variable inside the loop, use an Assignment element to add that record to a record collection variable, and place the Create Records element after the loop using the collection variable.

  5. Click Done and Save the Flow.

Step 2: Align with Native Media Cloud on Core Mapping
Instead of manually rebuilding complex Quote-to-Order line mappings in a custom Flow, route your custom action to leverage the standard, native core mapping engine.
  1. Navigate to Setup > Feature Settings > Industries > Revenue Settings.

  2. Under Set Up Flow for Creating Orders from Quotes, enter the API name of the standard core order creation flow (e.g., Create_Orders_From_Quote) and click Save.

  3. If you use an overridden action, invoke this registered core Order Creation Flow as a subflow after your custom UI steps execute. This ensures native mapping logic handles the transaction automatically for both standard and advertising line items.

  4. Verify the Context Definition is active:

    • Navigate to Setup > Context Definitions and open MediaPlanTransactionContext.

    • Confirm the status is Active and that QuoteEntitiesMapping is selected as the default mapping.

  5. Verify the pricing procedure setup:

    • Navigate to Setup > Pricing Procedures and open your active Advertising Sales Management pricing procedure.

    • Ensure the Context Definition field points to your active MediaPlanTransactionContext (or your extended version), then save and activate the latest version.

Step 3: Required Fields for Custom Direct Mapping (If Applicable)
If your business logic mandates a fully custom mapping flow without the native subflow, ensure you populate these core fields to keep records consistent:
  • For Order Product (OrderItem):
    • OrderId

    • Product2Id

    • Quantity

    • UnitPrice

    • ServiceDate

    • EndDate (Note: Only populate EndDate for subscription or recurring products. Specifying an EndDate for one-time products will trigger a system error).

  • For Ad Order Item (AdOrderItem):
    • Ensure you create the matching AdOrderItem record alongside the OrderItem.
    • Populate its required lookups to the parent Order (OrderId) and its corresponding Ad Quote Line Item (AdQuoteLineItemId).
Knowledge Article Number

005385147

 
Loading
Salesforce Help | Article