Workflow Action - Find Opportunity
Overview
The Find Opportunity action in Stack allows you to search for an existing opportunity linked to the contact that triggered your workflow, based on specific criteria. You can choose to find either the Earliest (first created) or the Latest (most recently created) matching opportunity for that contact. Once identified, this opportunity becomes the reference for all subsequent opportunity-based actions in your workflow. If no match is found, the workflow branches to an alternate path, enabling you to handle that scenario differently, such as creating a new opportunity.
Important: If there is no contact in the workflow, like in the case of an inbound webhook that lacks contact information, you must configure the Find Opportunity filters to map certain fields to the webhook parameters. Otherwise, the action will not be able to locate an opportunity.
Action Name
Find Opportunity
Action Description
The Find Opportunity action searches for an existing opportunity linked to the contact who entered the workflow, matching the filters you specify. All filters are combined using AND logic, meaning all specified conditions must be met to return a match. If multiple opportunities satisfy these conditions, only one will be returned—either the earliest or the latest, as configured. If no match is found, the workflow continues along a separate "Opportunity Not Found" branch.
Action Details
| Value Name | Description | Mandatory |
|---|---|---|
| Action Name | A custom label to help you identify this step in your workflow. | Yes |
| Opportunity to be Found | Determines whether to retrieve the Earliest (first created) or Latest (most recently created) opportunity that meets the filter criteria. | Yes |
| Filters | One or more conditions to narrow down the search.
| Yes |
| Multiple Matches | If multiple records match, only one opportunity is returned—either the earliest or latest, depending on your choice. | — |
| Branching Behavior | If an opportunity is found, the workflow follows the Opportunity Found path. If no match is found, it follows the Opportunity Not Found path. | — |
Example
Scenario: A new lead submits a form, and you want to check if an existing opportunity already exists for that lead. If it does, you update the opportunity; if not, you create a new one.
- Trigger: A contact submits a form on your website.
- Action: Find Opportunity
- Action Name: "Locate Existing Opportunity"
- Opportunity to be Found: Latest Opportunity
- Filters (all conditions must be met):
- Opportunity Name → Contains → "Contact_Email_Address"
- Status → Is → "Open"
- Branching:
- Opportunity Found: Proceed with an Update Opportunity action to modify fields such as Status or add notes.
- Opportunity Not Found: Proceed with a Create Opportunity action to add a new record to your pipeline.
This approach ensures you’re always referencing the correct existing opportunity if one is available, and only creating a new one when necessary. If no contact is present (e.g., from an inbound webhook without contact info), ensure your filters map relevant fields to the webhook data.