+ Start a Discussion
Nick CohenNick Cohen 

How to design a flow to query an opportunity split

Hi there,

I have been working to setup a workflow where an email notification is sent to all opportunity split owners when a user logs a call on an opportunity. 

As of now, I have a process setup to determine when a task is logged onto an opportunity, but need to figure out how to determine 1. what the opportunity is, 2. if that opportunity is a split and 3. who the opportunity split owners are.

I spoke with Salesforce Support and another user on the Trailblazer forum and am stuck with designing a flow that will query on the opportunity split object using the getreads element. I am relatively new to flows so still trying to figure out how this would be handled. Would anyone be able to help with a technical walkthrough of this?

Thanks so much

Hi Nick,

Instead of a workflow, please try using a process builder with flow. 
Here is a good example on how to use Process Builder + Flow on related records.

You have to pass the Opp ID from process builder to Flow and In flow you will be able to query the related records. 
More Information here : https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_designer_crossobject_reference.htm

Krishna Avva
Duckworth VelasquezDuckworth Velasquez
Flow is a powerful business automation tool that can manipulate data in Salesforce in a variety of ways. Such application can be created right from the org’s setup with just drag-drop/point-click. The ease of creating flows makes it the number one go-to tool when it comes to complex business requirements https://www.myprepaidcenter.one/
Sarah Smith 24Sarah Smith 24
You should try using a process builder instead of using workflow. Flow is a powerful tool that can automate and mainupulate data in different ways. The ease of creating flows makes it the number one go-to tool when it comes to complex business requirements https://myprepaidcenter.onl/
simone rainesimone raine
Screen Flows:
As the name suggests includes screen element to gather information from a user, this means that the flow type requires a user interaction. This type of flow can be accessed in a number of places: custom button; custom link; direct URL, Visualforce Page, or Salesforce app action.

Run in the background with no need of user interaction. It still can run everywhere that Screen Flows run,in addition, we can run it from process builder and Apex.
There are 3 main “building blocks” of the flow, as seen in the screenshot:
Elements represent actions that are executed in the flow;
Connectors define which path the flow takes; https://www.mykfc-experience.com/

Resources are the values that can be referenced anywhere in the flow
On the left side of the Flow Builder, we get 2 tabs: Elements, Manager;
Elements gives access to a number of elements that can be used to build the logic. The main elements are as follows:
Interaction: https://www.myprepaid-center.com/
Screen: Users can interact with the Flow only through this element. It lets the flow -collect information from the User and pass it to other elements for processing
Action: These are Apex Action like Send Email,Post to Chatter etc.
SubFlow: Call another flow from flow
 Decision: helps to determine the direction of the flow
Assignment: can set, change, add values of/to variables
Loop: iterates through the values of a collection variable
Record Create/Update/Get Record/Delete – the names speak for themselves.
Manager gives access to a number of Resources that can be used to build the Flow logic.
These are used to collect, store, and pass the data within or outside of the application. Based on the demand we can choose one of the resources below:
Changeable resources that can be updated within the flow, or from outside (passing value thru URL, Visualforce page). Used for passing values throughout the flow;
Record Variables:
Changeable resources where we can store a record of a specific object type, when stored in record variable all the fields of that record can be accessed through the same variable;