How to Add a "Cancel and Close" Button
Introduction
Screen flows in Salesforce are powerful tools for guiding users through a series of steps or processes. However, there are scenarios where users might need an easy way to exit the flow without completing it. This tutorial is designed to address such situations. We’ll guide you through integrating a 'Cancel and Close' button into your screen flows using the Avonni Button component. This addition will provide a straightforward option for users to opt out of the flow at any point, enhancing the user experience and flexibility of your screen flows.
Step-by-Step Guide
1. Add the Avonni Button component to your flow dialog:
Begin by adding the Avonni Button component to your flow screen. This button will serve as the "Cancel and Close" option.
2. Configure the interaction on the button
To configure the button, navigate to the interaction settings and set the button's action to navigate to the next screen when clicked.
3. Add a decision element to your flow
Add a decision element to your flow to determine if the button was clicked. This element will help you identify if the user decided to cancel and close the flow dialog.
4. Configure the decision element
In the decision element, set the criteria to check whether the button was clicked. The flow should proceed to the next step if the button is clicked.
5. Add a screen element without header and footer
Create a new screen element in your flow without a header and footer. This screen will be displayed when clicking the "Cancel and Close" button.
6. Add the Delay interaction component to the screen
In the new screen, add the Avonni Delay interaction component. This component will finish the flow when clicking the "Cancel and Close" button.
7. Configure the flow navigation interaction
In the Delay interaction component, configure the flow navigation interaction to finish the flow when the delay is completed.
8. And voila! Your "Cancel and Close" button is ready
With these steps completed, your flow now includes a functional "Cancel and Close" button, allowing users to exit the flow dialog when needed quickly.
Conclusion
Following this tutorial, you successfully added a "Cancel and Close" button to your Salesforce screen flows using the Avonni Button component. This addition enhances the user experience and provides an intuitive way to exit the flow dialog when necessary.
Remember to test your flow thoroughly to ensure the button works as expected, and feel free to explore other Avonni components to improve your Salesforce further flows.
Last updated