Has anyone been able access salesforce historical data?
Fellow Domosapiens,
I know I have to append my data and immediately start snapshoting Salesforce data (or any data for that matter) but, I'm wondering (hoping) someone has been able to figure out how to bring in Salesforce Opportunities with Historical Trending data without having to do this?
Best Answer
-
@Canioagain this was something I tackled about a year ago in our domo instance. As far as I could find, there was no easy way to query it out of salesforce - it doesn't seem that there is an opportunity history object you can query.
I created a new salesforce dataset (salesforce_daily_append) that snapshots the salesforce opportunities daily.
I was able to leverage the opportunity field history and stage history items (https://help.salesforce.com/s/articleView?id=sf.opp_history.htm&type=5) to build a historic dataset via a python script, which I then loaded to Domo and used an ETL to append to the salesforce_daily_append to create a full opportunity history dataset.
The script to build the historic dataset from the opportunity field history and stage history items basically just fills in the gaps between the records (so if an opportunity was created as a lead jan 1 and changed to cultivation on feb 1, it creates records from jan 2 - jan 31 for that opportunity as lead, etc). You could probably also do this in magic ETL.
2
Answers
-
Hi @Canioagain
Im not a Salesforce user but on other systems sometimes I can export a report from the system to get the historical data and then combine it with the data from the connector using an ETL or view. It depends on the Salesforce platform if they even keep historical records of opportunities. Based on what I’ve read I don’t think the historical trending is kept so you won’t be able to get it historically
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
@Canioagain this was something I tackled about a year ago in our domo instance. As far as I could find, there was no easy way to query it out of salesforce - it doesn't seem that there is an opportunity history object you can query.
I created a new salesforce dataset (salesforce_daily_append) that snapshots the salesforce opportunities daily.
I was able to leverage the opportunity field history and stage history items (https://help.salesforce.com/s/articleView?id=sf.opp_history.htm&type=5) to build a historic dataset via a python script, which I then loaded to Domo and used an ETL to append to the salesforce_daily_append to create a full opportunity history dataset.
The script to build the historic dataset from the opportunity field history and stage history items basically just fills in the gaps between the records (so if an opportunity was created as a lead jan 1 and changed to cultivation on feb 1, it creates records from jan 2 - jan 31 for that opportunity as lead, etc). You could probably also do this in magic ETL.
2 -
@mhouston That's what I've already done. I have some dev resources I'm going to see if they can crack the nut and get to the data some way and pull it in. I'll follow up here and let you know what I do (eventually)
Thank you
0 -
@Canioagain you can get the opportunity history and field history using the domo salesforce connector and using the "Browse objects and field" option and selecting OpportunityHistory and OpportunityFieldHistory. I did a basic writeup when I built this that outlined the main logical steps of processing - let me know if you would like to see that, I'd be happy to share.
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive