Today's Accounts to Visit

Focus of This Tutorial: 'Today's Accounts to Visit' Screen Flow

This tutorial enhances the daily workflow of Sales Representatives by building a 'Today's Accounts to Visit' screen flow. This flow, developed using Avonni components within Salesforceโ€™s Flow Builder, organizes a list of accounts for sales visits based on the day's scheduled events in Salesforce.

Step-by-Step Guide to Building the 'Today's Accounts' Screen Flow:

Step 1: Creating the 'Get Today's Events' Records Collection:

  • Purpose: To gather today's relevant events for the current user, aiding in effective task management.

  • Implementation: This collection interacts with the Salesforce Event object, applying filters:

    • OwnerId Field equals {!$User.Id} to target the current userโ€™s events.

    • ActivityDate Field equals {!$Flow.CurrentDate} to concentrate on today's events.

Step 2: Adding the Custom Avonni Apex Action 'SObject Collection to Text Collection':

  • Function: This action simplifies data by transforming complex SObject records (like events) into a more manageable text collection, such as a list of account IDs. It enhances data accessibility for later steps in the flow.

  • Implementation: Named "Today's Account Ids", it translates event details into usable account IDs. Select the collection from Step 1 and choose the "Related to ID" field.

Step 3: Creating the 'Get Accounts' Records Collection:

  • Purpose: To retrieve a list of accounts using the IDs obtained from the previous step.

  • Functionality: Linked to the Account object, it filters accounts using the IN operator with the text collection variable from "Today's Account Ids".

Step 4: Adding a Screen Element to Display Today's Accounts:

  • Visual Display: This step involves configuring the Avonni Header and Avonni List components to create a user-friendly UI for Sales Reps.

  • Configuration:

    • Avonni Header: Set the title as "Today's Accounts to Visit" and check 'Is joined' to add a line on the Header.

    • Avonni List: Displays the accounts using the 'Get Accounts' collection data. Map the data to show account name (Label), billing city (Description), and include account avatars.

Enhancing Functionality with an Action Button: Add an action button to each item in the Avonni List. This button can trigger a flow for Sales Reps to mark an account as visited, removing it from the day's list to maintain focus.

Conclusion: This screen flow, utilizing Flow Builder and Avonni components, exemplifies Salesforce customization to boost Sales Representatives' productivity. Providing a clear view of daily account visits optimizes time management and ensures critical touchpoints are addressed.

Last updated