• Learn how AI and automation actually work in your Help Desk. Ask our experts how to improve team speed and customer happiness! AMA Nov 17-21.

    Ask us anything

APIs & Integrations

SDevAdmin
Member

How to pull SQLs who were MQLs and now SQLs + show source and follow-up activity via API?

SOLVE

We are looking to pull the data from hubspot of contacts who have become SQL from MQL and want to check where the leads came from (which campaign, which industry, which region).

 

After this we have to show the activity that has been followed up for those contacts like calls, emails etc. Is there a way to do this via APIs ?

0 Upvotes
1 Accepted solution
RubenBurdin
Solution
Top Contributor

How to pull SQLs who were MQLs and now SQLs + show source and follow-up activity via API?

SOLVE

Hi @SDevAdmin   Sounds like you need a clean list of contacts who progressed from MQL to SQL, with source/campaign context and their follow-up activity.

 

You can do this fully via API. Query contacts with the Search API filtering for lifecyclestage = salesqualifiedlead, and in your projection include the date-stamp properties “Became a marketing qualified lead date” and “Became a sales qualified lead date” to confirm the progression. Use propertiesWithHistory if you prefer to inspect transitions. Guide for query/filters is here (https://developers.hubspot.com/docs/api-reference/search/guide )

 

For attribution, pull Original/Latest Source, Drill-down 1/2, and Campaign properties; these populate from tracking/UTMs and will give you channel, campaign, and often region (https://knowledge.hubspot.com/properties/understand-traffic-source-properties )

 

Quick check: are your UTMs and HubSpot tracking code deployed on the forms/landing pages tied to those campaigns? For follow-ups, list activities via CRM objects “calls” and “emails,” then fetch associations to those contact IDs to build the timeline. When this hinges on reliable two-way sync, Stacksync handles the mapping and timing so records stay consistent without manual patches.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner

View solution in original post

0 Upvotes
1 Reply 1
RubenBurdin
Solution
Top Contributor

How to pull SQLs who were MQLs and now SQLs + show source and follow-up activity via API?

SOLVE

Hi @SDevAdmin   Sounds like you need a clean list of contacts who progressed from MQL to SQL, with source/campaign context and their follow-up activity.

 

You can do this fully via API. Query contacts with the Search API filtering for lifecyclestage = salesqualifiedlead, and in your projection include the date-stamp properties “Became a marketing qualified lead date” and “Became a sales qualified lead date” to confirm the progression. Use propertiesWithHistory if you prefer to inspect transitions. Guide for query/filters is here (https://developers.hubspot.com/docs/api-reference/search/guide )

 

For attribution, pull Original/Latest Source, Drill-down 1/2, and Campaign properties; these populate from tracking/UTMs and will give you channel, campaign, and often region (https://knowledge.hubspot.com/properties/understand-traffic-source-properties )

 

Quick check: are your UTMs and HubSpot tracking code deployed on the forms/landing pages tied to those campaigns? For follow-ups, list activities via CRM objects “calls” and “emails,” then fetch associations to those contact IDs to build the timeline. When this hinges on reliable two-way sync, Stacksync handles the mapping and timing so records stay consistent without manual patches.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner
0 Upvotes