This is an example of how to use Salesforce Connect to seamlessly integrate data from Toggl without storing any data in Salesforce itself. Please keep in mind that Salesforce Connect is a significant PAID add on to your standard contract. Please read the consideration page before starting your project using this feature set.
This example was significantly modified from an example provided on Jitendra Zaa's blog.
- Make manual updates for credentials and workspace id
- workspaceId in TogglDetailedReport.cls (line 131)
- Optional - Update parameters (line 132)
- In Toggl_Reports.namedCredential-meta.xml
- update the "username" value to your toggl api key.
- leave "password" as is.
- workspaceId in TogglDetailedReport.cls (line 131)
- Create scratch org and push code
- Add current user to permission set
$ sfdx force:user:permset:assign -n Toggl_Users
- Navigate to "Detailed Report Items" tab and view data to validate it is working as intended
- Optional - you can also run a SOQL query to return data
SELECT Id, ExternalId, Project_Id__c, Project_Name__c, Client_Name__c, Start_Time__c, End_Time__c, Duration__c, DisplayUrl From DetailedReportItem__x LIMIT 10