Get last time every lead was contacted and by who.SOLVE
Mar 22, 2020 2:47 PM - edited Mar 22, 2020 4:21 PM
I am new to HubSpot and I have been tasked with getting all leads (contacts / companies) and than getting a list of each one, when they were last contacted by a sales rep and which sales rep contacted them.
We just moved to HubSpot from SalesForce, so a lot of our data was imported from SalesForce as well.
I have already integrated with Contacts (Get all contacts), Companies (Get all companies), Company Properties (Get all Company Properties) and Engagements (Get all engagements, Get recent engagements). However, I can't seem to figure out how they all connect to be able to get that.
Any help in how they connect to get that together is very much appreciated.
Solved! Go to Solution.
Mar 22, 2020 11:42 PM
When looking to get last contacted timestamp of a contact record, you can look at the `Get contacted` property which has an internal value of `notes_last_contacted`.
You can include this property when retrieving all contacts using this endpoint e.g.
While the endpoint doesn't pull the engagements id, you can use this endpoint Get Associated Engagements to retrieve all the engagements of an object record and get the latest engagement of the particular object and look at the createdBy/ownerId key. Lastly, you can use ths Get a list of owners endpoint to match the ID to an owner.
Let me know if this helps and/or if there's any other questions!