Salesforce Screen Flow
Available on version: 1.22.0+
Package Tiers: Advanced.
​​​​
Evm Advanced Flow Message component allows you to call any message template from your Salesforce Screen Flow. These templates include alerts, modals, popups, banners, buttons, and other screen flow. Now you can easily display alerts when a field changes or when the Next/Finish button is clicked.
​
This feature is different than Salesforce Screen Flow Template, which we support to open a Salesforce screen Flow inside of a Modal Popup.
​
Index:
- ​​​How to show a message after the user change a field?
​
​​​​​
​​​How to show a message after the user change a field?
​​​
Scenario:
Given the user open a salesforce screen flow, with First Name, Last Name, and an Agreement Checkbox,
When the user clicks on Agreement Checkbox,
Then salesforce should show a modal popup to display information about the agreement.
​​
1. Create a Modal Message into EvoluteMessage Dashboard
1.1. Go to EvoluteMessage Dashboard
1.2. Click on Add Message
1.3. Select the Salesforce Modal Template
1.4. Give it a name, like Agreement Popup
1.5. Set the Target Page to be Screen Flow (right side menu) in Evm Message Builder
1.6. Disable the Start on Page Load(right side menu), it should be "Waiting for an Action".
1.6. Click on Publish
1.7. In your the left menu copy the evm-####, because you will need that to add into the flow.
​​
2. Setup your Screen Flow to open the Popup
2.1. Go to Setup > Flow > Create new Flow or open existing flow
​
2.2.2. Creating a new flow(skip this part if you have an existing one already, go to step 2.3)
2.2.1. Add 2 Texts, Then give the name First Name(txtFirstName), Last Name(txtLastName)
2.2.2. Add 1 Checkbox, then give the name Agreed(ApiName: ckAgreed)
​​​
2.3. Add/Drag and drop the Evm Advanced Flow Message into your Screen Flow​
2.3.1. Set these information:
Api Name: evmAgrementPopup
Message Content Code: evm-#### (which you copied on step 1.7)
Action Reload Message: You can remove the value there and set the {!ckAgreed}, which means if the user agreed, we would show the popup. You can also use Formula in this field, as long as it is a boolean in the return.
​
2.4. Click on Done
2.5. Save and run the flw debug mode, you should be able to see the message when you click on Agreed or you can add that flow into any page.
​​
This is a very simple way to display a message. You can also prefill data into the message from the Screen Flow and you can also trigger the message to display only if the user click on next. Check other scenarios below.​​
​
Video: Show an Alert Popup when a field changes on Salesforce Screen Flow - EvoluteMessage
​​
​​​How to show another flow screen inside of a popup from a Flow Screen when I click on Next/Finish Button?
​
Scenario:
Given the user open a salesforce screen flow, with First Name, Last Name, and an Agreement Checkbox,
When the user clicks on confirm without checking the Agreement Checkbox,
Then salesforce should show a modal popup to display asking the user to check the agreement checkbox which is inside of a popup.
​
1. Create a Salesforce Screen Flow which will be used to display inside of a Popup
1.1. Give the flow a name like "Agreement Confirmation Popup", I will be using this name to reference this flow.
1.2. Add a Display Text into the Flow saying that The Agreement is required in order to proceed
1.3. Then add a checkbox again for the user to agree
1.4. Then after the Screen Flow add an Assignment, the variable would a new Resource
1.4.1. Add new Resource of the Type Variable, with the name evmPopupAgrementResponse, type boolean, default value false, Available for output
1.4. The assignment should this the evmPopupAgrementResponse with the same value as the checkbox you added on the screen flow.
​
Okay, now you have a Flow that the user should see into a popup when they don't confirm the agreement. The next step will be adding this Flow into a Popup, then next will be call this popup from the button in a different flow.
​
2. Adding the Agreement Flow into a Modal Popup
2.1. Go to EvoluteMessage Dashboard
2.2. Click on Add Message
2.3. Select the Salesforce Screen Flow Template
2.4. Give it a name, like Agreement Confirm Popup
2.5. Disable Start on Page Load, Show Header and Show Button, on the right side menu.
2.6. Leave the Target Page to be Lightning Page (right side menu) in Evm Message Builder, because this popup will be living outside of our flow, it will be in the lightning page.
2.7. Double click on the Flow, and choose the Screen Flow that we created on 1. step
2.7.1 Disable the Send Current Page Id and click done
2.8 Publish the message
​
Okay, now we have our Evm Modal Popup called Agreement Confirm Popup which would open the Agreement Confirmation Popup.
The next step will be to create the Flow Finish Button which would call the Agreement Confirm Popup.
​
3. Create a the Flow Finish Button into EvoluteMessage Dashboard
3.1. Go to EvoluteMessage Dashboard
3.2. Click on Add Message
3.3. Select the Salesforce Button Template
3.4. Give it a name, like Agreement Button
3.5. Set the Target Page to be Screen Flow (right side menu) in Evm Message Builder
3.6. Double click on the Button and change the label to Confirm
3.7. In Click Action, choose the Open Message, and choose the Agreement Confirm Popup to be open
3.8. Check the "Call Next/Finish flow step on message closing event"
3.9. Click on Publish
3.10. In your the left menu copy the evm-####, because you will need that to add into the flow.
​​​​
Okay, now we have our Agreement Popup and our Finish Flow Button which calls that popup. We need to create the Main Flow for the Registration and add the Finish Flow button into that Flow.​
​
4. Create a Salesforce Screen Flow which will be our main registration flow
4.1. Give the flow a name like "Registration", I will be using this name to reference this flow.
4.2. Add 2 Texts, Then give the name First Name(txtFirstName), Last Name(txtLastName)
4.3. Add 1 Checkbox, then give the name Agreed(ApiName: ckAgreed)​​
4.4. Add/Drag and drop the Evm Advanced Flow Message into your Screen Flow​
4.4.1. Set these information:
Api Name: evmFinishButton
Message Content Code: evm-#### (which you copied on step 3.10, here would be the evm flow button you created)
Dynamic Settings:
Create a Formula that has this logic:
"evmOpenMessage[" + IF({!ckAgreed}, "false", "true") + "]"
The formula should return a string. In the end if the logic would be:
evmOpenMessage[true]: When the checkbox agreed is false, because the user didn't select that and I want the message to open.
evmOpenMessage[false]: When the checkbox agreed is true, because the user has agreed already and I don't need to show any popup. Which the button then would call the Finish Event on the current flow.
So the dynamic Settings value would be the formula that would return one of these two options above.
​
4.5. now let's hide the standard flow buttons, because we don't need that since we have the Evm Flow Button which will be displaying. So click on The Salesforce Footer and uncheck Show Footer.
​
4.6. Click on Done
​
Now let's get the response from the Agreement Confirm Popup which we have output into the evmPopupAgrementResponse.
​
4.7. Create a decision
4.7.1. set the decision name to Analyze Registration
4.7.2. The first outcome give a label as Show Thank you Page
4.7.2.1. Set the Outcome to be "Any Condition is met(OR)"
4.7.2.2. The first resource criteria will be: Registration Page > ckAgreed => Equal => True
4.7.2.3. The second criteria will be:
4.7.2.3.1. Click on add New Resource
Resource Type: Formula
API Name: popupAgreementChecked
Data Type: boolean
Formula: CONTAINS({!evmFinishButton.responseFields}, "evmPopupAgrementResponse||true")
As you can see above, we are getting the button component, then accessing the responseFields. This response fields will be set when the Agreement Confirm Popup closes, and the information that will be set in there, will be the one that the flow output which is the evmPopupAgrementResponse. If you output many variables, the responseFields will have a long string concatenating all the variables. You can set that into a display text fields into the flow for you to see what it is returning. Check this video:
4.7.2.3.2 Now set the popupAgreementChecked => Equal => true
​
In the end this Show Thank you Page out come would be true, if one of the agreement was checked, then we would trigger another process, in our case will be a Thank you Screen Flow.
​
If this outcome is not true, then the next path will be Page saying that the Registration was not completed.
Create the Two pages for each path and save and active your flow.
​
Attention! This process won't work with the Debug, because we have not added the popup into the Flow, to test you need to add the two components(Salesforce Flow and the Evm Modal Popup)
​
5. Testing
5.1. Go to your Lightning Page, example Account Record Page Detail
5.2. Open the Builder and Drag and Drop the Standard Salesforce Flow Component(Component Menu > Standard > Flow)
5.3. Select the Registration Flow
5.4. Now Drag and Drop the Evm Advanced Message on top of the the Flow Component
5.5. Select the Agreement Confirmation Popup
5.6. Save and load your page
5.7. First Test, fill the fields and check the checkbox and click on Confirm, then the page should go to thank you page without a popup.
5.8. Second Test, fill the fields and don't check the checkbox, and click on Confirm, then the page should open a popup, then check the checkbox, and confirm, then we should redirect to thank you page.
5.9. Third test, don't check the checkbox, and click on confirm, the popup should show, then don't check the checkbox, and click confirm, then the flow should redirect to the sorry page.
​
​Video: Show an Modal Popup when user clicks on finish button in Salesforce Flow - EvoluteMessage
​​​
If you want to know more about how the Evm Advanced Flow Message component works, check it here.
​​​
If you have any further question, please send an email to support@evolutemessage.com
​​
​​​​