---
title: Scan Product from Opportunity
slug: scan/scan-product-from-opportunity
description: Scan products directly from an Opportunity in Salesforce with Unaric Scan.
image: https://archbee-image-uploads.s3.amazonaws.com/10Nod6Ww95R3dPr0k0TCJ/XGSgW8Iq6KjQJeJIbRIxP_unaric-scan.png
icon: 🛒
docTags: 
createdAt: 2024-08-23T02:03:45.757Z
---

The Scan Product from Opportunity feature allows users to quickly add products to an Opportunity by scanning barcodes or QR codes using their mobile device. The provided flow template can be customized to meet specific organizational needs. Administrators can create a copy of the flow and modify it as required.

## Key features

- Scan barcodes or QR codes to identify products
- Automatically match scanned codes to Product SKUs
- Add scanned products directly to Opportunity Product records
- Prompt for quantity and sales price after each scan
- Uses Opportunity's price book or defaults to Standard Price Book

## Setup options

There are two ways to publish this flow: by Quick Action (Button Bar) or Lightning Page Flow. The Quick Action will appear in the Button bar and the Flow will appear wherever you choose to place it on the page.

### Quick Action setup

1. On Salesforce, navigate to **Setup > Object Manager > Opportunity > Page Layouts.**
2. Select the desired page layout.
3. In the Salesforce **Mobile and Lightning Experience** **Actions** section, look for the **Mobile & Lightning Actions** category.
4. If you see a message about overriding predefined actions, click the **Override the predefined actions** link.
5. Add the **Scan Product** Mobile & Lightning Action to the layout.
6. Save the **Page Layout**.
7. Upgrade to **Dynamic Actions** to allow hiding the **Scan Product** action on Desktop, as it does not function there.
8. Once upgraded to **Dynamic Actions**:
   1. Go to the Lightning Page editor for your page.
   2. Select the Highlights Panel.
   3. Click the Scan Product Action.
   4. Under "Set Action Visibility", set the visibility filter to *Device - Form Factor - Equal - Phone*.
9. Save and activate your page.
10. Assign Form Factor to Phone only.

### Lightning Page Flow Setup

The flow automatically inherits the Opportunity from the record the user is on when they start the flow. In this way, users don't need to manually select or input the Opportunity, since it's pulled directly from their current context. The flow attempts to find a price book for the Opportunity. If none exists, the Standard Price Book will be used.&#x20;

1. In the **Lightning App Builder**, locate the form factor selector dropdown menu at the top of the page and change it to *Phone*.
2. From the components panel on the left, drag the "Flow" component to your desired location on the page
3. In the Flow component properties panel on the right, follow this configuration:

   ::Image[]{src="https://api.archbee.com/api/optimize/8U46cdD4FHoKekEMZZobD-B4x_oY9ojOwPFsmb3QzqK-20240823-224440.png" size="60" width="760" height="677" position="center" darkWidth="760" darkHeight="677" showCaption="false"}

   1. Under **Flow**, click the dropdown and choose *Scan Product from Opportunity.*
   2. Look for the **Pass record ID&#x20;**&#x69;n this variable checkbox and enable it. If prompted, select the appropriate variable to pass the Opportunity ID.
4. After finishing setting up the tab, click the **Save&#x20;**&#x62;utton in the top right corner.
5. In the **Save** dialog menu, click **Activate.**
6. In the activation screen:
   1. Choose "Assign as App Page"
   2. Select the app(s) where you want this page to appear
   3. Under **Form Factor**, select *Phone* only
7. Click **Save** to finish activation.

:::hint{type="info"}
If you create your own flow, you also need to create your own Quick Action button, as you cannot re-assign the flow called by the managed Quick Action.
:::

## Usage

1. On the Salesforce mobile app, open an Opportunity record.
2. Initiate the Scan Product flow (via Quick Action or Flow component).
3. Scan the product's barcode or QR code.
4. Enter quantity and confirm sales price.
5. Repeat for additional products. Products will be added to the Opportunity as Opportunity Product records.

## Additional notes

- The flow uses the user's default currency when currency management is enabled.
- The **Product SKU** field (API: *StockKeepingUnit*) is used to match scanned codes to Products.
- Quantity and Sales Price inputs are mandatory after each scan.

