Loading

How to check if an Opportunity has an Opportunity Product Schedule using Flow

Data pubblicazione: Aug 18, 2026
Descrizione

This article provides a detailed guide on creating a record-triggered flow that activates upon the creation or update of an Opportunity. The flow evaluates the presence of related Opportunity Product Schedules. If none are found, it generated a task assigned to the Opportunity Owner to ensure timely follow-up or necessary action.

Risoluzione

Steps to Build the Flow

Set Up the Trigger and Query

Step 1: Create a new Record Triggered Flow on the Opportunity object, with the following values:

 

ObjectOpportunity
Configure TriggerA record is created or updated
Conditions RequirementsNone
Optimize the Flow forActions and Related Records

Record-Triggered Flow configuration showing Object, Trigger, and Optimize For settings

Step 2: Now add a Get Records Element. In the Get Records Element, substitute the following values:

Notes:

  • Provide any suitable Label
  • It's optional but it's a best practice to provide descriptions
LabelGet Opportunity Products
DescriptionProvide any suitable description
ObjectOpportunity Product
Condition RequirementsAll Conditions Are Met (AND)
Logic`HasSchedule Equals {!$GlobalConstant.True}`
How Many Records to StoreOnly the first record

Get Records element configured to filter Opportunity Product by HasSchedule equals true

Check the Result and Create the Task

Step 3: Add a Decision Element to check if there were any schedules found or not:

 

  • If the collection `{!Get_Opportunity_Products}` is Not NULL, it means that the schedules were found and we will End the Flow
  • If the `{!Get_Opportunity_Products}` is Null, it means that the schedules were not found and we will proceed to create a task for the Opportunity owner

Decision element checking whether Get_Opportunity_Products collection is null

Step 4: Under the Not Found branch of the Decision Element, add a New Task Action Element and fill in the task details:

LabelGive it appropriate name
Assign To ID{!$Record.OwnerId}
Related To ID{!$Record.Id}
StatusNot Started (Give it an appropriate status)
SubjectGive it an appropriate subject

New Task action element with Label, Assign To ID, Related To ID, Status, and Subject fields filled in

Activate the Flow

Step 5: Save and Activate the Flow.


Written by: Sumeet Negi | Forum Ambassador

Sumeet Negi is a Salesforce CPQ Developer and one of the Forum Ambassador in the Trailblazer Community. He is 6x Salesforce certified and has more than 5.5 years of experience on the Salesforce platform. He is passionate about helping trailblazers get the most out of Trailblazer Community.

Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials"). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a "best" answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

Numero articolo Knowledge

004630365

 
Caricamento
Salesforce Help | Article