LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • 👋Welcome
  • Getting Started
    • Product Tour
    • Quickstart Guide
    • Learn the Basics
    • Installation & Licenses management
    • Flow vs. Dynamic Components
    • Integrating with Experience Cloud
  • Tutorials
    • Videos
    • Projects Tutorials
    • Components Tutorials
      • Alert
        • Create a custom branding alert
        • Create an error alert dismissible
      • Avatar
        • Create an avatar with actions
        • Create an avatar with details
      • Avatar Group
        • Display a list of contacts related to an account
        • Display a list of sharing users related to the record
      • Barcode
        • Generating and Displaying Barcodes for Product Codes
      • Biometrics
        • 101 Tutorial
      • Button
        • Customizing Flow Navigation Buttons
        • How to Add a "Cancel and Close" Button
        • How to Open Flows from Buttons
      • Button Groups
        • Identifying Clicked Buttons
      • Button Menu
        • How to change dynamically Avonni Button Menu Icons
      • Calendar
        • Calendar 101 Tutorial
        • How to Connect Multiple Data Sources to the Avonni Calendar
        • How to Customize Time Spans
        • How to Customize the Right-Click Menu
        • How to Add an Edit Action to Events
        • How to Add a New Event Button to the Avonni Calendar Header
        • How to Create Events by Dragging in the Avonni Calendar
        • How to Reschedule Events with Drag and Drop
        • How to Color-Code Calendar Entries in the Avonni Calendar
        • Using a variable Data Source
        • Using a Query Data Source
      • Carousel
        • Build a Related Products Carousel
      • Combobox
        • Implement Dependent Picklists in Comboboxes
        • How to Dynamically Enable/Disable Dependent Picklists
        • Using Multi-Select Comboboxes with Reactive Formulas
      • CSV Parser
        • 101 Tutorial
      • Data Table
        • Adding Filters
        • How to add Images onthe Data Table
        • Creating Row Actions
        • Displaying a Record as a QR Code
        • Displaying Record Name field as a link
        • Learn the Basics
        • Making a field editable
        • Setting Up Data Export
        • Tips and Tricks
          • Activate infinite scrolling
          • Creating an action from a button or a link
          • Customizing the Badge Color using a formula
          • How to Grayscale Header Actions Dynamically in Avonni Data Table
          • How to Conditionally Color Cells
          • Enabling auto-refresh on the Data Table when pressing a button
          • Handling formula text field
          • How to set column visibity
          • Passing multiple record IDs to another flow
          • Data Table Editor
      • Date Picker
        • Display a date picker with Marked Dates from a Get Records
      • Date Time Picker
        • How to create Collection Variables for StartDateTime and EndDateTime
        • How to Block Out Times
      • Delay Interaction
        • Creating a Confetti Celebration on the Final Screen
        • Launch a flow dialog without a screen
      • Dual Listbox
        • Display contacts with custom icons
        • Accounts list group by industry
      • Expandable Section
        • How to add components into an expandable section
      • Header
        • Building Engaging Card Headers
        • Crafting a Profile Header
        • Adding Action Buttons to Headers
        • Adding a Background Image to Your Header
      • Input Pen
        • Add the custom Toolbar
        • How to Store Input Pen Drawings as Attachments in Salesforce
      • Kanban
        • 📹Introduction
      • List
        • Create a grid list with images
        • Create a sortable list
        • How to Reorder Items and Update Records
        • Vertical List with Actions
      • Navigation
      • Map
        • Customize the Map Marker
        • Visualizing Account Information on a Map
      • Metric
        • 📹Introduction
      • Microphone
        • Save the Microphone recording file as an attached on a record
      • Progress Indicator
        • Creating a Universal Dynamic Progress Step Collection
        • How to Change the Appearance of Your Progress Indicator using a variable
        • Error Handling
      • QR Code
        • Generate a QR Code from a record field
      • Record Detail
        • Using the Record Detail with Reactive Screens
      • Scoped Notification
        • Display message based on a value
      • Text Area
        • TextArea issue with max length when clicking on the next button
      • Tree
        • Build a Tree View with Dynamic Record Details
      • Timeline
        • Assigning multiple source collection to the Timeline
        • Customizing Date Format in the Timeline Component using Luxon
        • Create a horizontal activity timeline
        • Display Tasks
        • Perform actions on selected tasks
      • Vertical Visual Picker
        • Adding sub-items
        • Display a list of online contacts
    • Interactions
      • Enabling auto-refresh for queries after the Flow Dialog ends
      • Creating a Confetti Celebration on the final screen
      • How to create an interaction to navigate to an object
      • How to create an interaction to a record page
      • How to create an interaction to open another flow
      • How to pass an Input Variable from One Flow to Another
      • How to setup an Open Flow Panel interaction
    • Reactive Query Tutorials
      • How to make Data Tables Reactive
      • Build a reactive Data Table Using Dependent Picklists
      • Building a Dynamic Metrics Dashboard with the Data Table
      • How to build a reactive 'Quarterly Opportunity Tracker' component
      • How to Create a Combobox-Filtered Data Table
      • Create a Dynamically Linked Account-Contact View
      • Troubleshooting
    • Tips and Tricks
      • Copy / Paste a component settings
      • Create a link to the record using the href attribute
      • Create a variable and use it in a component property
      • Data Table
      • Hide Standard Header and Footer in a flow
      • How to pass your current RecordID in your screen flow
    • Platform Events
      • Configuration tutorial
  • Flow Components
    • Explore All Components
    • Alert
    • Audio Player
    • Avatar
    • Avatar Group
    • Barcode
    • Barcode Scanner
    • Biometrics
    • Blockquote
    • Button
    • Button Group
    • Button Icon
    • Button Menu
    • Calendar
    • Carousel
    • Chart
    • Chip Container
    • Combobox
    • Color Picker
    • CSV Parser
    • Date Picker
    • Data Table
    • Date Time Picker
    • Delay Interaction
    • Document Scanner
    • Dual Listbox
    • Expandable Section
    • Formatted Address
    • Formatted Name
    • Formatted Value
    • Header
    • Hero Banner
    • Icon Picker
    • Image
    • Input Choice Set
    • Input Choice Set Grid
    • Input Counter
    • Input Date Range
    • Input Pen
    • Illustration
    • Interaction service
    • Kanban
    • List
    • Map
    • Metric
    • Microphone
    • Navigation
    • NFC Scanner
    • Pill Container
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Progress Popover
    • QR Code
    • Rating
    • Record Detail
    • Scoped Notification
    • Separator
    • Slider
    • Tabs
    • Text Area
    • Timeline
    • Tree
    • User Location
    • Vertical Visual Picker
    • Visual Picker
    • Visual Picker Link
    • Video Player
    • Welcome Mat
  • Component Builder
    • Overview
    • Properties Pane
    • Interactions Pane
      • Copy Records
      • Download
      • Export To
      • Fire Confetti
      • Flow Navigation
      • Navigate
      • Show Toast
      • Open Alert Modal
      • Open Confirm
      • Open Flow Dialog
      • Open Flow Panel
      • Update Records
      • Refresh Query
      • Refresh All Queries
      • Open Quick Action
    • Style Pane
    • Component Templates
    • Layout and Customization
      • Alignment controls
      • Copy / Paste component settings
      • Margin / Padding
      • Pull To Boundary
      • Undo / Redo
  • Data Sources
    • Understanding Data Sources
    • Manual
    • Variable
    • Query
    • Query VS Variable
    • Picklist
  • Actions
    • Overview
    • Data Manipulation and Transformation
      • Convert Lead
      • Create file
      • Split Text to Text Collection
      • SObject Collection Math
      • SObject Collection Join
      • Get Record from SObject Collection
      • SObject Collection to Activity Timeline Items
      • SObject Collection to Calendar Marked Date Collection
      • SObject Collection to Scheduler Events
      • SObject Collection to Text Collection
    • Data Conversion and Formatting
      • Text Collection Get Value
      • Get Value from String Collection
      • Number Collection Get Value
      • Join Text Collection
      • Format Text in SObject Collection
      • Format Text Collection
      • Text Collection to Combobox Options
      • Text Collection to Dual Listbox Options
      • Text Collection to Progress Indicator Steps
    • UI & Navigation
      • New Avatar Action Collection
      • New Button Menu Item Collection
      • New Carousel Item Collection
      • New Combobox Option Collection
      • New Dual Listbox Option Collection
      • New Header Action Collection
      • New Header Avatar Action Collection
      • New List Action Collection
      • New Navigation Item Collection
      • New Progress Indicator Step Collection
      • New Progress Popover Step Collection
      • New Slider Custom Label Collection
  • Help
    • Performance Guide
    • How do I contact support?
    • How do I report Bugs?
    • Troubleshooting
    • Release Process
  • Miscellaneous
    • Live use cases examples
    • Release Notes
    • Salesforce Flow Limit
    • Security
Powered by GitBook
LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service
On this page
  • Overview
  • Here's what you'll build
  • Guided Steps
  • Step 1: Add a Header
  • Step 2: Add a User Selection Dropdown
  • Step 3: Create a Dynamic Filter
  • Step 4: Display Key Metrics
  • Step 5: Visualize Data on a Map
  • Step 6: Display User-Specific Data in a Table
  • Step 7: Control Component Visibility
  • Conclusion

Was this helpful?

  1. Tutorials
  2. Projects

User Activity Report

Last updated 5 months ago

Was this helpful?

Overview

This tutorial guides you through building a dynamic and engaging user activity dashboard in Salesforce using Avonni components. You'll learn how to create a report that provides a comprehensive view of user activity, with real-time updates based on user selection.

Here's what you'll build

Combining these interactive components will create a powerful dashboard that offers valuable insights into user performance, account distribution, and overall activity trends. This hands-on tutorial will equip you with the skills to build similar dynamic reports for various use cases within your Salesforce org.


Guided Steps

Step 1: Add a Header

Start by adding an Avonni Header component to your page. This will give your report a clean and consistent look.

In the Avonni Header settings:

  • Enter a title for your report (e.g., "User Activity Report").

  • Check the "Is Joined" box to remove the bottom border of the header for a seamless look.

  • Check "Pull to boundary" to extend the header to the edges of the page.

  • (Optional) Add an avatar or action button to the header.

Step 2: Add a User Selection Dropdown

  • Drag and drop an Avonni Combobox component onto your page. This will allow users to select a user from a list.

  • In the Combobox settings:

    • Label: Enter "Select a user". This is the text that will appear above the dropdown.

    • Data Source:

      • Choose "Query". This lets you retrieve user data directly.

      • Select the "User" object.

      • Map the Label: In the "Label" field, select "Full Name" from the User object. This ensures the dropdown displays user's full names.

  • How this works: This dropdown will display a list of all users. When a user is selected, it will trigger updates in other components to show that user's data (we'll set that up in the next steps).

Step 3: Create a Dynamic Filter

Now, you'll create a unique formula that acts like a filter. This filter will automatically update the report components based on the user selected in the dropdown.

  • Add a Formula Text Variable:

    • Create a new "Formula Text" variable to your page's variables. Let's name it userFilter.

    • Enter the Formula: This formula tells the report only to show data related to the selected user's ID:

      "OwnerId = '" & {!comboboxUser.selectedOption.Id} & "'" 
      • Explanation:

        • OwnerId =: This is the start of our filter condition. We're checking for records where the "OwnerId" field...

        • '..."' : The single quotes around the ID ensure it's treated as text in the query.

        • &: This symbol combines different parts of the formula.

        • {!comboboxUser.selectedOption.Id}: This dynamically fetches the ID of the user selected in the comboboxUser component.

Simplified Formula (using Text Template):

  • For easier management, you can create a "Text Template" variable.

  • In this template, enter: OwnerId = {!comboboxUser.selectedOption.Id}

  • Then, in your userFilter formula variable, reference the text template variable.

How this works: This filter acts like a "WHERE" clause in a database query. It ensures that all the components we add next will only display data that belongs to the selected user.

Step 4: Display Key Metrics

In this step, you'll add visual metrics to your report to highlight important information about the selected user. You'll use Avonni's Metrics component and a Section element to organize the layout.

A. Add a Section for Layout

  • Drag and drop a Section component onto your page.

  • In the Section settings, divide it into three columns. This will allow you to display three metrics side-by-side neatly.

B. Add the First Metric

  • Now, drag and drop an Avonni Metric component into the first column of your Section.

  • In the Metrics settings:

    • Label: Enter "Open Opportunities".

    • Data Source:

      • Choose "Query".

      • Select the "Opportunity" object.

      • Field: Select "Amount".

      • Aggregate: Choose "Sum" to display the total open opportunities.

    • Formatting:

      • Avatar: (Optional) Add an icon that represents open opportunities.

How this Works

The metric will display the total sum of open opportunities that belong to the user selected in the combobox. As the user selection changes, this metric will dynamically update to reflect the data for the new user.

Step 5: Visualize Data on a Map

Now, you'll add an interactive map to your report to visualize account locations related to the selected user. This will use the Avonni Map component.

  • Add and Configure the Map

    • Drag and drop a Map component onto your page.

    • In the Map settings:

      • Data Type: Select "Google Maps".

      • Mode: Choose "Multiple Markers" to display multiple locations on the map.

      • Data Source:

        • Set to "Query".

        • Select the "Account" object.

      • Data Mappings:

        • Map the required fields to display your account locations correctly. This will typically involve mapping latitude and longitude fields from your Account object to the corresponding fields in the Map component. (Refer to your Salesforce field names for accurate mapping.)

      • Marker Customization (Optional):

        • Explore the Map component's settings to customize the appearance of your map markers, including their type, shape, color, opacity, and weight.

How this Works

The map will dynamically display markers for accounts associated with the selected user. The map will update as the user selection changes to show the relevant account locations. This visually represents the user's activity and areas of influence.

Step 6: Display User-Specific Data in a Table

The final component for your User Activity report is the Avonni Data Table. This table will display a list of records for the user selected in the combobox. In this example, we'll show a list of accounts associated with the user.

  • Configure the Data Table

    1. Add the Component: Drag and drop an Avonni Data Table component onto your page.

    2. Set the Data Source:

      • Choose "Query" to fetch data from your Salesforce org.

      • Select the "Account" object.

    3. Apply the Filter:

    4. Choose Columns:

      • In the "Data Mappings" section, select the Account fields you want to display as columns in your table. For this example, we'll use:

        • Name

        • Industry

        • Website

        • Annual Revenue

Customize Your Table

Feel free to adapt the content displayed in the Data Table. You can choose different objects, fields, and filters to suit your reporting needs. This example is simply an illustration to demonstrate how to integrate the Data Table into your interactive report.

How it Works

The Data Table will dynamically update each time you select a different user in the combobox. It will fetch and display the corresponding accounts related to that user, providing a detailed view of their associated data.

Step 7: Control Component Visibility

To make your report interactive, you must control when each component appears. In this user activity report, we want a specific flow:

  1. Initial View: When the report first loads, only the combobox for selecting a user should be visible.

  2. User Selection: Once a user is selected, the metrics, map, and data table should appear, displaying information relevant to that user.

Flow Builder's "Set Component Visibility" feature comes in here.

  • Configure Visibility Rules

    1. Select a Component: In your Flow Builder canvas, select the component you want to control (e.g., the Metrics component, the Map component, or the Data Table).

    2. Access Visibility Settings: Find and expand the "Set Component Visibility" section in the right-hand panel.

    3. Define the Rule:

      • Click "Add Rule."

      • Set the "Resource" to your combobox component (e.g., comboboxUser).

      • Set the "Field" to "Value".

      • Set the "Operator" to "IS NULL".

      • Set the "Value" to "False".

This rule means: "Show this component only when the 'Value' of the combobox is NOT null (i.e., when a user has been selected)."

Apply to All Components

Repeat these steps for each component you want to hide initially (Metrics, Map, and Data Table). This ensures they only become visible after selecting a user in the combobox.

How this Works

By using these visibility rules, you create a dynamic and user-friendly experience. The report starts with a clean, uncluttered view, presenting the user with an explicit action: select a user. Once the selection is made, the report dynamically reveals the relevant information, providing a focused and engaging experience.

Conclusion

Congratulations! You've now built a dynamic and interactive user activity dashboard in Salesforce using Avonni components. By combining the power of the Combobox, Metrics, Map, and Data Table components, you've created a real-time report that provides a comprehensive view of user performance and related information.

This tutorial has equipped you with the fundamental skills to build similar interactive reports for various needs within your Salesforce org. Feel free to experiment with different data sources, filters, and visualizations to create dashboards tailored to your specific requirements.

Interactive User Selection: A dropdown menu () lets you easily select a specific user from your Salesforce org.

Dynamic Metrics: Key performance indicators (KPIs) about the selected user, such as the total value of open opportunities or the number of closed deals, will be displayed using components. These metrics will update instantly whenever a new user is selected.

Visualized Account Locations: An interactive map () will pinpoint the locations of accounts associated with the selected user, providing a geographical representation of their activities.

Detailed Data Table: A comprehensive data table () will display detailed information related to the selected user, such as a list of accounts they manage, contact information, or recent activities. This table will also dynamically update based on the user selection.

Filter: Map this query to the userFilter formula text variable you created in Step 3. This ensures the metric only shows opportunities related to the selected user.

Format: Set the "Primary Metric Format Style" to "Currency" since you display a monetary value.

Filter: Map this query to the userFilter formula text variable from . This ensures the map only shows accounts related to the selected user.

In the "Query Filter" section, map the filter to the userFilter text variable you created in . This ensures the table only displays accounts related to the selected user.

Avonni Combobox
Avonni Metrics
Avonni Map
Avonni Data Table
Step 3
Step 3