---
schema_version: "1"
id: ae690fc110f119f3501ce9e54dd69b1afb0aeeb69c22cd3b0cf0940a367ec7e5
title: Get Forecast Opportunities Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_actions_forecast_opportunities.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_forecast_opportunities.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b021fb14222cad90ccb86ac9022440de14d5f867c8d68fc847d75f5270fad626
description: Get forecast opportunities for a user that matches the specified criteria. To be used in the Forecast Guidance flow as part of the Get Forecast Guidance standard agent action.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Get Forecast Opportunities Action

Get forecast opportunities for a user that matches the specified criteria. To be used in the Forecast Guidance flow as part of the Get Forecast Guidance standard agent action. 

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

In Flow Builder, add an Action element to your flow. In the New Action window, search for Get Forecast Opportunities, and then select **Get Forecast Opportunities**.

## Set Input Values

Use values from earlier in the flow to set the inputs for the action. 

 
| field | description |
| --- | --- |
| **User ID** | The ID of the user to provide forecasting guidance context for.  |
| **Forecasting Type ID** | The ID of the forecasting type to include in returned forecasting opportunities. |
| **Period ID** | The ID of the time period that opportunities must fall within to be included in the returned forecasting opportunities. |
| **Forecast Category** | The forecast category of opportunities to include in returned forecasting opportunities. Valid values when a user has single forecast category rollups are Pipeline, Best Case, Commit, and Closed. Valid values when a user has cumulative forecasts are Open Pipeline, Best Case Forecast, Commit Forecast, and Closed Only. Valid value when Most Likely is enabled is Most Likely. |
| **Forecasting Opportunity Count** | The maximum number of forecasting opportunities to return. Valid values are from 1 to 500. |

## Store Output Values

 
| field | description |
| --- | --- |
| **Forecast Opportunity IDs** | A collection of IDs of opportunity records that match the specified criteria for the user. |

## Usage

The Get Forecast Opportunities action retrieves opportunity ID records for a user based on specified criteria. It's designed mainly to be used within the Forecast Guidance flow as part of the Get Forecast Guidance standard agent action.

## Limitations

This action is limited to usage within a flow. It can't be invoked through other methods such as Apex, REST API, Agentforce, Prompt Studio, or Einstein Bots. While actions can typically be invoked through various frameworks like InvocableActionService, this specific action is restricted solely to flows.

#### See Also

- [Copilot Action: Get Forecast Guidance](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_ref_get_forecast_guidance.htm&language=en_US)