When the value for a deal we were working on changed out of the blue, it made us think about how can we track these changes or give the power to the Account Admins to track changes and execute their own Actions on these changes.
We always maintain the current state of the record but using the historical states we can have more possibilities like change detection, more report insight and have more customisable workflows.
We are not having anything like app script to have easy reusable functions and scripts during the updation of record and easy access the scope without writing much things.
What it does
Hi-Story is having two components
1) Datastore for historical data 2) Script runner for running Action Group scripts
DataStore is having a historical track of data in a queryable and
The Global User History page gives an option to track User history on a filtered date range per module.
Hi-Story tracks User actions on a record, giving intuitive inputs on the actions performed by Users. The "Action Group" function allows Users to execute their own actions like trigger emails, SMS and custom scripts execution and sharing when a change takes place.
How we built it
- We created Data Storage using elastic search and events for storing and retrieving data.
- ES was used because it is more scalable and used for performing functions like sorting, search aggregation like count average and more advanced filter criteria.
- For the script, we have used Node.js and Marketplace Datastore and wrote our own Dependency Manager and Executor. Context will be set for each run and having current user, Record context.
Challenges we ran into
- Query construction in the elastic search based on the dynamic criteria selected
- Full page apps are not supported currently for Freshsales which proved as a challenge to load all the UI components
- Dependency management was complicated than expected.
Accomplishments that we're proud of
- We could implement all the UI components in the small widget available
- Built the app runner along with package manager and sharing in a single day
- Datastore to have historical data
What's next for Hi-Story
- More API kind of interface for datastore
- Script runner to have more utilities and security mechanism