APIs & Integrations

Jaylin
Contributor

can API creat 1:M datas

SOLVE

Hi everyone,

 

i want to know something about API, if some datas from magento, one contact have several orders, can API realise create one contact and multi deals, and this contact also related to multi deals.

0 Upvotes
1 Accepted solution
Jigar_Thakker
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

can API creat 1:M datas

SOLVE

Hi @Jaylin ,

It is possible to sync contacts and multiple deals (orders) from Magento to HubSpot using the API.

  • In your Mangento integration or middleware, use HubSpot contacts API to create the contact in HubSpot if it doesnt already exist
  • For each order, use deal API to create a deal in HubSpot
  • Then use the Associations API to link each deal to the contact, so the contact is associated with multiple deals

    This is supported in HubSpot API, Your Integration just needs to include the logic to check for existing contacts and properly associate each deal.

    FYR: https://developers.hubspot.com/docs/guides/api/crm/objects/contacts

https://developers.hubspot.com/docs/guides/api/crm/objects/deals

https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4

 

If this helps, feel free to mark it as the solution ✔️ and give it an upvote 👍 !

View solution in original post

0 Upvotes
1 Reply 1
Jigar_Thakker
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

can API creat 1:M datas

SOLVE

Hi @Jaylin ,

It is possible to sync contacts and multiple deals (orders) from Magento to HubSpot using the API.

  • In your Mangento integration or middleware, use HubSpot contacts API to create the contact in HubSpot if it doesnt already exist
  • For each order, use deal API to create a deal in HubSpot
  • Then use the Associations API to link each deal to the contact, so the contact is associated with multiple deals

    This is supported in HubSpot API, Your Integration just needs to include the logic to check for existing contacts and properly associate each deal.

    FYR: https://developers.hubspot.com/docs/guides/api/crm/objects/contacts

https://developers.hubspot.com/docs/guides/api/crm/objects/deals

https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4

 

If this helps, feel free to mark it as the solution ✔️ and give it an upvote 👍 !

0 Upvotes