Loading

How to Add a Package of Products to a Salesforce Opportunity Using Record-Triggered Flow

Publiceringsdatum: Feb 6, 2026
Beskrivning

In Salesforce, you can automatically add multiple products to an Opportunity when a master product is selected. This is useful when selling product bundles or packages where a primary product includes several accessories or components. Instead of manually adding each item, you can use a Record-Triggered Flow to automate this process.

Business Use Case: Usually, Salesforce products are not available as bundled items by default, so they cannot be added to an Opportunity automatically if a master product is added. You would have to add products individually. To add multiple products to a Salesforce Opportunity automatically upon adding a single Master Opportunity Product, you can accomplish this with a Record-Triggered Flow.

Example: If you are selling a camera to your customer, you would need to include accessories such as a lens, lens cover, cleaning equipment, camera bag, memory card, battery, battery charger, etc. The steps below show you how to configure a Record-Triggered Flow to add all of these accessory Opportunity Products automatically the moment you add the camera (the master product with a specific Product Code) to a Salesforce Opportunity.

Lösning

Below are the steps to create a Flow to add multiple products to an opportunity upon adding an individual Master Opportunity Product.

Consider you have a Master Opportunity product, for example, "Camera Bundle - Master," with a unique Product Code.

Step 1: Create a New Flow

  1. In Salesforce Setup, use the Quick Find box to search for and select Flows.

  2. Click New Flow.

  3. Choose Record-Triggered Flow and click Create. This is the recommended automation tool for this type of process.

Step 2: Configure the Flow Trigger

  1. Under the Start element, select the Opportunity Product object.

  2. Configure the Trigger:

    • Configure Trigger: Select A record is created.

    • Set Entry Conditions:

      • Condition Requirements: Select All Conditions Are Met (AND).

      • Field: ProductCode

      • Operator: Equals

      • Value: The unique product code for Camera Bundle-Master

  3. Leave the Optimize the Flow for setting as Actions and Related Records.

  4. Click Done.

Step 3: Create Records for Accessories

  1. Click the + icon below the Start element to add an action.

  2. Select the Create Records element.

  3. Label the action, for example, Create Lens Record.

  4. How Many Records to Create: Select One.

  5. How to Set the Record Fields: Select Use separate resources and literal values.

  6. Object: Select Opportunity Product.

  7. Set Field Values for the Opportunity Product:

    • Field: OpportunityId, Value: {!$Record.OpportunityId} (This automatically references the Opportunity from the triggered record.)

    • Field: Quantity, Value: The number for each item (e.g., 1)

    • Field: SalesPrice, Value: The price entry of the product you want to add (e.g., 100 or 0 if no price)

    • Field: PricebookEntryId, Value: The Price Book Entry ID of the accessory (You can find this ID in the URL of the Price Book Entry record or by using a Get Records element.)

  8. Click Done.

  9. Repeat: Repeat these steps by adding a new Create Records element for each additional accessory (e.g., Camera Bag, Memory Card, Battery, etc.).

Step 4: Save and Activate the Flow

  1. Click Save in the top right corner.

  2. Flow Label: Give the flow a clear name, such as Add Camera Bundle Accessories.

  3. Flow API Name: The API name will auto-populate.

  4. Click Save.

  5. Click Activate to make the flow active.

NOTE: When you add the master product (Camera Bundle in the example above) to an Opportunity, this flow will automatically add its related accessories to the opportunity, thus creating multiple Opportunity Products. This approach simplifies the process and ensures a consistent package is added every time.

Knowledge-artikelnummer

000387480

 
Laddar
Salesforce Help | Article