An LWC component to display engagement activities (based on a custom object, not the standard SFDC activities) on an object record page (es. Leads, Accounts...)
View Demo
·
Report Bug
·
Request Feature
A basic lightning web component useful for displaying engagement activities (e.g. "Lead visited the website", "Account signed the contract") in a timeline ui. Some notable points:
- It follows best practices of LDS: https://www.lightningdesignsystem.com/components/activity-timeline/
- For the sake of simplicity and flexibility it doesn't use standard SFDC activities. Instead, it use a custom object (GB_Timeline_Activity__c). See Object folder
- The activities created can be bound to every SF object (Standard and custom). Notable examples: Leads, Accounts, Contacts...
- It supports add, edit and delete of such activities
- It open interesting use cases. You may easily create flows that create such activities on other events (e.g. when a sales is completed, when a case is escalated...), in order to easily visualized in a timeline in the target object record page (e.g. the account or contact involved)
- NEW: You can now simulate the streaming of new activities coming
This component is packaged as a Salesforce DX project. /force-app/main/default/lwc contains the logic (HTML and JS), while /force-app/main/default/objects/ contain the custom object definition. /force-app/main/default/permissionsets contains the permissions for the activity custom object (GB_Timeline_Activity__c).
Since this component is a Salesforce DX project, if you have a local SFDX cli installation, you can simply download and install using sfdx force:source:deploy
Otherwise, you can try to install it on a dev org using this (unofficial) tool:
NB: This component contains both the Admin profile and permission set for granting the visibility on the custom object and its fields. However, depending on your installation method, you may need to manually assign the permissions. If you have any strange visibility issue (e.g. when clicking on "Add new activity" you don't see all the fields), simply assign the "GB Timeline Activity Permset" permission set to your user, from the SF setup menu
Once installed, you can simply click on the Edit Page for the record page of choice (e.g. Lead, Account, Contact...), and you will find "Every activity timeline" component under the "Custom" section of the Components list. Drag and drop in your page and you are good to go. You can add the component in communities pages too. Please note that you can configure the component in order to show the "Add new activity" button or hide it. Once the component is in place, you can add new activities, edit or delete existing activities (arrow menu on the right of each activity), and expand / collapse each activity details (arrow button on the left of each activity). Each activity can have an associated Icon, as per the LDS Icons. Supported icons are defined in /force-app/main/default/lwc/data/data.js . Edit it if you need more.
NEW: when you create a new activity (or edit an existing one), you can now flag it to be initially hidden (checkbox "stream hide"). Those activities will then be shown, one by one, if you click on the small icon aside to the "add new activity" button
setup.mp4
SetupComm.mp4
DemoEAT.mp4
- Add activity
- Edit activities
- Delete activity
- Add a "generate random activities" for demo purposes
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Giuseppe Bonocore - @gbonocore - [email protected]
Project Link: https://github.com/bonocore/EveryActivityTimeline