Assigning multiple source collection to the Timeline
Last updated
Was this helpful?
Last updated
Was this helpful?
The is designed to help display information visually and in a well-structured format. In this particular use case, the Timeline component showcases activities from multiple sources, organized according to a timeline view.
Initiate the creation of your source collections: Before assigning several source collections to the Activity Timeline component, develop the collections you wish to utilize. Within the Flow Builder, employ the 'Get Records' action to generate your collection variables (e.g., Collection1, Collection2, Collection3) to fetch data from multiple sources."
In this step, you will add the SObject Collection to Activity Timeline Items
Avonni Action to your flow. This action allows you to convert your source collections into a format compatible with the Activity Timeline component.
Add an Action element: In the Flow Builder, click the + sign and select "Action"
Select the Avonni category: In the filter panel for the Action element, select Avonni.
Choose the SObject Collection to Activity Timeline Items Action
: In the Avonni category, select the 'SObject Collection to Activity Timeline Items
' action. This action will enable you to transform your source collections into a format compatible with the Activity Timeline component.
Configure collections: Create your collection within the properties panel of the 'SObject Collection to Activity Timeline Items
' action. You can create up to 10 collections.
Map the data: After selecting the Get records collection for each input field, specify the fields displayed in the Activity Timeline component. This includes fields like 'Date', 'Title', 'Subtitle', 'Icon', and others, depending on your specific use case. Be sure to map these fields from the source collection to the corresponding input fields in the action. This process ensures the data is correctly formatted for display within the Activity Timeline component.
In this step, you'll set up advanced settings for the 'SObject Collection to Activity Timeline Items
' action to manually assign variables and create a new variable resource.
Access Advanced settings: To access the advanced settings, click on the 'Advanced' link within the properties panel of the 'SObject Collection to Activity Timeline Items' action.
Enable manual variable assignment: Check the box next to "Manually assign variables." This option allows you to create a new variable resource and manually define its properties.
Create a new variable resource: Click on the 'New Resource' button and enter an API name for your variable. This name will be used to reference the variable throughout your Flow.
Set Data Type and Apex Class: In the 'Data Type' field, select 'Apex-Defined
.' Check the box next to "Allow multiple values
" to support multiple records for this variable. Then, in the 'Apex Class' field, select "avcmpbuilder__ActivityTimelineItem
" from the dropdown list.
Save your changes: Once you've completed the configuration, click the 'Done' button to save your settings.
Add a screen element with no header and footer
Drag the Avonni Timeline Component into our screen
Open the Activity Timeline component: Locate it within your Screen Flow and click on it to access its configuration settings.
Access the Data Source section: Navigate to the 'Data Source' section within the properties panel of the Activity Timeline component.
Select Variable: From the 'Data Source' options, choose 'Variable' to specify that the component should use the Apex-Defined variable you created earlier.
Save your changes: Click the 'Done' button to save your settings and finalize the configuration.
To further customize the sort order, you can use a "Collection Sort" element in your flow. This allows you to sort the items in the APEX collection variable based on your selected field. See the screenshot below for an example.
You have successfully added multiple source collections to the Activity Timeline component. These steps enabled the component to display data from various source collections, providing a comprehensive view of your Salesforce records in a visually appealing and user-friendly format.
In this step, you will create your collections using the 'SObject Collection to Activity Timeline Items
' action added in . For each collection, you will select the corresponding Get records collection created in and map the data accordingly.
Select Get records collection: For each collection, click the 'Add Collection' input field and select the appropriate Get records collection created in . This step ensures that each collection is associated with its corresponding source collection.
In this final step, you'll connect the Activity Timeline component to the Apex-Defined variable created in , enabling it to display data from multiple source collections.
Choose the Apex-Defined variable: In the dropdown list, select the Apex-Defined variable you created in . This will connect the Activity Timeline component to the variable containing the combined data from multiple source collections.