In the dynamic world of Customer Relationship Management (CRM) we continue to lead the way by providing innovative solutions that cater to diverse business needs. One such enhancement comes in the form of prepopulating fields on the Commission object, allowing for tailored logic to meet the clients' unique requirements. This feature empowers admins to automate processes, making Salesforce even more adaptable to the ever-evolving demands of businesses.
The admin can specify custom logic that executes changes within a Flow. This capability is a game-changer, as it permits real-time updates of other fields on the Commission object without manual intervention.
Before we start with an example, here is some important information that you should know and follow:
- There can be only one Autolaunched flow in the organization that involves Commission custom logic. Also, the flow must be saved as the exact values:
- Flow Label: Commission Trigger
- Flow API Name: Commission_Trigger
- While customizing a flow, you must add a commission variable with the exact values:
- Resource Type: Variable
- API Name: commission
- Data Type: Record
- Object: Commission
- Select the checkboxes for Available for input/output
- To invoke the flow, you must create a Field Set for the Commission object (where it is necessary to add to the field set the field(s) that should trigger the flow ), and save the Field Set with the exact values:
- Field Set Label: Commission Trigger Fields
- Field Set Name: Commission_Trigger_Fields
- Where is this used? : Commission Trigger Flow
Now, let's imagine the scenario where the admin wants some fields to be prepopulated automatically depending on the Inside Broker on the Commission dialog:
- If the Inside Broker is Adam Rock - the Fee Percent field should be prepopulated with a value of 40%. Also, the Direct Expenses - 200$.
- If the Inside Broker is Kate Snow - the Fee Percent field should be prepopulated with a value of 50%. Also, the Direct Expenses - 400$.
First of all, let's navigate to the Commission object to create Field Set, which serves as a foundational element in defining which fields will be triggering the custom logic in the Flow:
- Navigate to the Commission object through the Setup, Object Manager.
- Select the Field Set and hit the New button.
- Fill in the required fields with the exact values:
- Field Set Label: Commission Trigger Fields
- Field Set Name: Commission_Trigger_Fields
- Where is this used? : Commission Trigger Flow
- Click the Save button.
- Once the Field Set Commission Trigger Fields is created, go ahead and hit the Edit button.
- Now drag and drop the field/fields that will trigger the flow:
- Click the Save button.
The second step includes the flow creation:
- Navigate to the Flows through the Setup.
- Click the New button and select the Autolaunched Flow ( No Trigger) :
- This Flow should include a commission variable that will be utilized in the custom logic execution. This variable acts as a key element in the automation process. So, let's create one with the exact values:
- Resource Type: Variable
- API Name: commission
- Data Type: Record
- Object: Commission
- Select the checkboxes for Available for input/output
- Click the Done button.
- Click the plus icon to add the Decision.
- Fill in the required fields ( e.g. “Inside Broker Division”). The API field will be autofilled.
- Fill the Label for the Outcome Details (e.g. “Inside Broker Adam Rock”). The API field will be autofilled.
- Select the Condition Requirements to Execute Outcome and add the condition. (e.g. Resource is our variable commission > User > User ID equals the value - User ID).
- Next to the Outcome Order, click the plus icon to add the conditions for the second broker. Repeat the same steps:
- Hit the Done button.
- Click the plus icon to add the logic for each decision.
- Fill in the required fields ( e.g. “Fee Percent”). The API field will be autofilled.
- Set Variable Values by adding the commission variable with an appropriate field/ operator and value.
- Repeat the same steps for the second user.
- Now our flow looks perfect:
- Hit the Save button and enter the exact attributes:
Flow Label: Commission Trigger
Flow API Name: Commission_Trigger
- Activate your flow by clicking the Activate button.
Time to test our custom logic!
Admins and developers can collaborate to create efficient workflows that adapt to the unique needs of their clients. By embracing this feature, businesses can save time, reduce errors, and stay ahead in the ever-competitive CRM landscape.
Please note: If an admin invokes a flow with two existing flow versions, where Flow version 1 is active, and Flow version 2 is inactive, the latest version will run. More details can be found here.