APIs & Integrations

Blaineyam
Participant

Hubspot Deal API - Make update without Hubspot ID?

Résolue

I have a quick question I'd like to run by you all. I have an ERP system that will contain a Shopify ID as the primary key. Can I push this record into the Hubspot API and update a Deal status with the matching Shopify ID (that will be also in Hubspot deal record)? 

 

Or do I need the Hubspot ID to update the Deal status? Please let me know thanks!

0 Votes
2 Solutions acceptées
mangelet
Solution
Guide | Partenaire solutions Platinum
Guide | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

You can update HubSpot as you please.

 

If you want to update a HubSpot deal based on information you have on you ERP is fine.

 

Just use the Deal's API with YOUR_HUBSPOT_API_KEY.

 

To update a deal you will need a Deal ID.

Martin Angeletti
HubSpot Veteran (12+ years)

Worried about messing up your HubSpot? I've got your back.

Join the thousands of people who have discovered how to avoid problems with simple tricks and have started to dominate HubSpot (and not be dominated).

️ Don't get left behind.

→ Click the subscribe button and scroll down to find the opt-in box.

Subscribe

Did I help answer your question? Mark this as a solution.

Voir la solution dans l'envoi d'origine

RMones
Solution
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

run a request on/crm/v3/objects/deals/search

And use filter on your custom field :

 

{
  "filterGroups": [
    {
      "filters": [
        {
          "value": "<YOUR SPHOFIY ID>",
          "propertyName": "<YOUR SHOPIFY_ID FIELD>",
          "operator": "EQ"
        }
      ]
    }
  ]
}


This will return:

{
  "total": 0,
  "results": [
    {
      "id": "512",
      "properties": {
        "amount": "1500.00",
        "closedate": "2019-12-07T16:50:06.678Z",
        "createdate": "2019-10-30T03:30:17.883Z",
        "dealname": "Custom data integrations",
        "dealstage": "presentation scheduled",
        "hs_lastmodifieddate": "2019-12-07T16:50:06.678Z",
        "hubspot_owner_id": "910901",
        "pipeline": "default"
      },
      "createdAt": "2019-10-30T03:30:17.883Z",
      "updatedAt": "2019-12-07T16:50:06.678Z",
      "archived": false
    }
  ]
}


And then with the ID you fetched with the Search:


PUT /crm/v3/objects/deals/512

{
  "properties": {
    "shipping_status": "prepairing"
  }
}

Voir la solution dans l'envoi d'origine

0 Votes
9 Réponses
mangelet
Solution
Guide | Partenaire solutions Platinum
Guide | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

You can update HubSpot as you please.

 

If you want to update a HubSpot deal based on information you have on you ERP is fine.

 

Just use the Deal's API with YOUR_HUBSPOT_API_KEY.

 

To update a deal you will need a Deal ID.

Martin Angeletti
HubSpot Veteran (12+ years)

Worried about messing up your HubSpot? I've got your back.

Join the thousands of people who have discovered how to avoid problems with simple tricks and have started to dominate HubSpot (and not be dominated).

️ Don't get left behind.

→ Click the subscribe button and scroll down to find the opt-in box.

Subscribe

Did I help answer your question? Mark this as a solution.

Blaineyam
Participant

Hubspot Deal API - Make update without Hubspot ID?

Résolue

Shopify is not part of this integration, therefore we are not able to use the Shopify - > Hubspot integration as part of the solution.

 

Here's the arch diagram. I need to update Hubspot directly from an ERP system. I would like to update the Hubspot Deal with a shipping status sent from the ERP. The ERP does not have the Hubspot ID, therefore it won't be able to update the deal using Hubspot ID. Both systems have a Shopify ID from the transaction from Shopify.Screen Shot 2022-03-09 at 4.16.59 PM.png

0 Votes
mangelet
Guide | Partenaire solutions Platinum
Guide | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

I still think you are better of integrating hubspot <> shopify

Then updating shopify's order status from your erp <> shopify.

 

Having said that, hubspot id is usually the hubspot portal's id, you do need that to use the apis.

Then you need to query for a deal id that has the order number from shopify that you want to update. 

Then you would also need to update the order status in shopify. 

Martin Angeletti
HubSpot Veteran (12+ years)

Worried about messing up your HubSpot? I've got your back.

Join the thousands of people who have discovered how to avoid problems with simple tricks and have started to dominate HubSpot (and not be dominated).

️ Don't get left behind.

→ Click the subscribe button and scroll down to find the opt-in box.

Subscribe

Did I help answer your question? Mark this as a solution.

RMones
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

Hi @Blaineyam ,

The best way is to fetch the data via the Search API by your property to fetch the Hubspot ID and after that update the Deal by with the ID fetched by Hubspot Search.

 

Regards Ronald

0 Votes
Blaineyam
Participant

Hubspot Deal API - Make update without Hubspot ID?

Résolue

Sorry I'm talking about an integration between the ERP and Hubspot, not Shopify and Hubspot. Two totally different things.

0 Votes
RMones
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

Yes on that scenario is my anwser based..

First use the Search API from Hubspot to search for a Deal with property ShopifyId; 
If that one finds some records, it can return the ID's of the Deals. Then you can use this ID's in the Deals API to udpate the Record with the values from your ERP system.

But what if there are more deals with the same ShopifyId in Hubspot? Do you have a check for that?

0 Votes
RMones
Solution
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

run a request on/crm/v3/objects/deals/search

And use filter on your custom field :

 

{
  "filterGroups": [
    {
      "filters": [
        {
          "value": "<YOUR SPHOFIY ID>",
          "propertyName": "<YOUR SHOPIFY_ID FIELD>",
          "operator": "EQ"
        }
      ]
    }
  ]
}


This will return:

{
  "total": 0,
  "results": [
    {
      "id": "512",
      "properties": {
        "amount": "1500.00",
        "closedate": "2019-12-07T16:50:06.678Z",
        "createdate": "2019-10-30T03:30:17.883Z",
        "dealname": "Custom data integrations",
        "dealstage": "presentation scheduled",
        "hs_lastmodifieddate": "2019-12-07T16:50:06.678Z",
        "hubspot_owner_id": "910901",
        "pipeline": "default"
      },
      "createdAt": "2019-10-30T03:30:17.883Z",
      "updatedAt": "2019-12-07T16:50:06.678Z",
      "archived": false
    }
  ]
}


And then with the ID you fetched with the Search:


PUT /crm/v3/objects/deals/512

{
  "properties": {
    "shipping_status": "prepairing"
  }
}
0 Votes
mangelet
Guide | Partenaire solutions Platinum
Guide | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

Through HubSpot APIs you are able to push data into HubSpot.

 

When you talk about Shopify ID, is it an order number? Is that what you want to push into a deal? 

 

Maybe you can further describe what you want to achieve.... 

Martin Angeletti
HubSpot Veteran (12+ years)

Worried about messing up your HubSpot? I've got your back.

Join the thousands of people who have discovered how to avoid problems with simple tricks and have started to dominate HubSpot (and not be dominated).

️ Don't get left behind.

→ Click the subscribe button and scroll down to find the opt-in box.

Subscribe

Did I help answer your question? Mark this as a solution.

0 Votes
mangelet
Guide | Partenaire solutions Platinum
Guide | Partenaire solutions Platinum

Hubspot Deal API - Make update without Hubspot ID?

Résolue

@Blaineyam 

 

Have you considered connecting HubSpot and Shopify (link)? 

 

This integration will create HubSpot Deals from Shopify Orders.

 

HubSpot deals will have the "Order Number" from Shopify.

 

 

Martin Angeletti
HubSpot Veteran (12+ years)

Worried about messing up your HubSpot? I've got your back.

Join the thousands of people who have discovered how to avoid problems with simple tricks and have started to dominate HubSpot (and not be dominated).

️ Don't get left behind.

→ Click the subscribe button and scroll down to find the opt-in box.

Subscribe

Did I help answer your question? Mark this as a solution.

0 Votes