How to Add a "Cancel and Close" Button
Last updated
Last updated
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.
Begin by adding the Avonni Button component to your flow screen. This button will serve as the "Cancel and Close" option.
To configure the button, navigate to the interaction settings and set the button's action to navigate to the next screen when clicked.
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.
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.
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.
In the new screen, add the Avonni Delay interaction component. This component will finish the flow when clicking the "Cancel and Close" button.
In the Delay interaction component, configure the flow navigation interaction to finish the flow when the delay is completed.
With these steps completed, your flow now includes a functional "Cancel and Close" button, allowing users to exit the flow dialog when needed quickly.
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.