APIs & Integrations

MAgarwal5
Participant

Can I retrieve HubSpot record Id from Salesforce Id?

SOLVE

Hello community members,

 

Can I get HubSpot record Id if I have Salesforce record ID(contact Id/Account Id) via API?

 

Thanks in advance!

 

Best,

Meenal

0 Upvotes
1 Accepted solution
LaurenRyan
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Can I retrieve HubSpot record Id from Salesforce Id?

SOLVE

@MAgarwal5 yes you can as long as these fields are mapped in the integration. They are automatically created in HubSpot when the integration is installed but they are not automatically added to the field mappings. Once they are mapped, you can retrieve via API. 

 

For more info on the HubSpot Salesforce integration - enroll in our free course here.

View solution in original post

3 Replies 3
LaurenRyan
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Can I retrieve HubSpot record Id from Salesforce Id?

SOLVE

@MAgarwal5 yes you can as long as these fields are mapped in the integration. They are automatically created in HubSpot when the integration is installed but they are not automatically added to the field mappings. Once they are mapped, you can retrieve via API. 

 

For more info on the HubSpot Salesforce integration - enroll in our free course here.

Jaycee_Lewis
Community Manager
Community Manager

Can I retrieve HubSpot record Id from Salesforce Id?

SOLVE

Thanks, @LaurenRyan 🙌

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Can I retrieve HubSpot record Id from Salesforce Id?

SOLVE

Hey, @MAgarwal5 👋 Thanks for the great question.

 

I have a few questions of my own:

  • Specifically, which property are you using? Is it Salesforce Account ID, for example?
    salesforceaccountid​
  • If so, have you considered using the Search API for this type of request? It's not a perfect for every circumstance, but it might be useful in your project

An example Request might look like this:

 

https://api.hubapi.com/crm/v3/objects/contacts/search

 

Body:

 

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "salesforceaccountid",
            "operator": "EQ",
            "value": "YOURID"
          }
        ]
      }
    ]
  }

 

 

Please let the community know if you have any follow-up questions.

 

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes