---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "Product Action Flow Reference"
description: "Inputs, outputs, transaction effects and troubleshooting for Product Action in Salesforce Flow."
contentType: "reference"
audience: "admin,developer"
---

# Product Action

Add selected Products to an Opportunity using its Price Book.
The namespaced Apex action name is `rooms__ProductAction`.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | No API callout is made. |
| Record writes | Inserts Opportunity Product records in the calling Flow transaction. |
| Background work | No queued work is started. |
| Platform event | The action does not directly publish a platform event. |
| Email | The action does not send email. |

The Opportunity must have a Price Book. Every selected Product must have a matching entry in that Price Book. By default, each created line uses the entry's Unit Price and a Quantity of `1`. A configured Field Map can override mapped line fields.

A successful repeat can add another set of lines. Inspect existing Opportunity Products before retrying after an uncertain result.

## Inputs

Required describes the Flow input setting. Additional conditions are stated in the guidance.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `opportunityId` | Opportunity ID | No | The Opportunity that receives the lines. Required for a usable request. |
| `selectedProducts` | Products to be Added | No | Nonempty collection of Product records. Each must have a matching Price Book entry. |
| `fieldMap` | Field Map (CSV OptionField=OpportunityProductField | No | Optional comma-separated `OpportunityProductField=ProductField` assignments. The destination line field is on the left. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the action reported success. Check this value before continuing. |
| `message` | Error Message | Result details or an error. Read this value with Success. |
| `opportunityProducts` | Opportunity Products | The inserted Opportunity Product records. Confirm actual saved lines before a retry. |

## Configure the Flow

1. Select the Opportunity and confirm its Price Book.
2. Supply a nonempty collection of Product records.
3. Leave Field Map blank unless the intended custom mapping is verified.
4. Check Success and Error Message and retain the returned Opportunity Products.

Confirm the Flow user's action access and the required access to the referenced records.
Review the configured Salesforce API connection user's access when the action makes a callout.
Connect the action's Fault path.

## Troubleshooting

**No products were added.** Check the Opportunity, selected Products and matching Price Book entries.

**Field Map fails.** Use `OpportunityProductField=ProductField` pairs. The left field belongs to the new Opportunity Product. The right field belongs to the selected Product. Confirm field types and values with one safe record.

**A later callout reports uncommitted work.** This action inserts records. Review the callout transaction boundary.

Confirm that the action and its fields exist in the installed package.
See the [Flow action index](/content/build/flows/index.md) for related actions and transaction guidance.
