<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317454#M30422</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/76645"&gt;@nigelqwilr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parent/child relationship for companies is easily managed via the UI but this is a manual process. In terms of automation, you're best working with our APIs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking for an endpoint to manage parent/child company relationships, you can check out our&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;CRM Associations API Overview&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CRM Associations API is being updated to support two new association types:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Parent company to child company, definition ID = 13&lt;/LI&gt;
&lt;LI&gt;Child company to parent company,definition ID = 14&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For your use case, I'd recommend for you to use HubSpot's&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;Webhooks API&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt; Subscribe to contact.propertyChange and company.propertyChange &amp;gt; When your server received notifications &amp;gt; Use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/crm-associations/associate-objects" target="_blank" rel="nofollow noopener noreferrer"&gt;Associate CRM objects endpoint&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to create the parent &amp;lt;--&amp;gt; child company relationship.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the above is done, you can fetch the IDs of the actual company you want to be added as the &lt;CODE&gt;associatedCompany&lt;/CODE&gt; and then update the contact record using the &lt;A href="https://developers.hubspot.com/docs/methods/contacts/create_or_update" target="_self"&gt;Create or update a contact&lt;/A&gt; endpoint, like my example below:&lt;/P&gt;
&lt;P&gt;Request URL:&lt;/P&gt;
&lt;PRE&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testContact@hubspot.com/?hapikey={{hapikey}}&lt;/PRE&gt;
&lt;P&gt;Request Body:&lt;/P&gt;
&lt;PRE&gt;      {
      	"property": "associatedcompanyid",
      	"value": "newChildCompanyID"
      }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 09:40:05 GMT</pubDate>
    <dc:creator>Willson</dc:creator>
    <dc:date>2020-02-07T09:40:05Z</dc:date>
    <item>
      <title>How to create a Hubspot company (as well as Parent-child relationships) based on Segment group calls</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317400#M30401</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Context:&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;EM&gt;What we do in Hubspot&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;We've been leveraging Segment to automatically create contacts in Hubspot. As for companies, we use the automatic association feature to create Hubspot companies.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;What we have in Segment (and our app)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Each user in our app will have a userID and an account ID (groupID in Segement lingo). There can be many accounts under one Company. For example, imagine if we had users from Company ABC. Company ABC will have department X, Y, and Z. Each user will have a user ID but they are mapped to one specific department. Therefore, each department will have a unique account ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Situation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Following the example from above, our users of Company ABC will be under the the Hubspot company: Company ABC. However, what we want to happen is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For each unique account ID, Hubspot creates a unique Company i.e., Company ABC: Dept X, Company ABC: Dept Y...&lt;/LI&gt;&lt;LI&gt;These companies be associated as a child company to an umbrella Parent Company i.e., Company ABC&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can this be done automatically via Segment (and its Group Call)?&lt;/LI&gt;&lt;LI&gt;Or maybe a combination of Segment and Hubspot workflows?&lt;/LI&gt;&lt;LI&gt;Else, what solutions are possible for this scenario?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If anyone has encountered this before/ knows the best resources to do the above, I really appreciate the help!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 04:15:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317400#M30401</guid>
      <dc:creator>nigelqwilr</dc:creator>
      <dc:date>2020-02-07T04:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317454#M30422</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/76645"&gt;@nigelqwilr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parent/child relationship for companies is easily managed via the UI but this is a manual process. In terms of automation, you're best working with our APIs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking for an endpoint to manage parent/child company relationships, you can check out our&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;CRM Associations API Overview&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CRM Associations API is being updated to support two new association types:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Parent company to child company, definition ID = 13&lt;/LI&gt;
&lt;LI&gt;Child company to parent company,definition ID = 14&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For your use case, I'd recommend for you to use HubSpot's&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;Webhooks API&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt; Subscribe to contact.propertyChange and company.propertyChange &amp;gt; When your server received notifications &amp;gt; Use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/crm-associations/associate-objects" target="_blank" rel="nofollow noopener noreferrer"&gt;Associate CRM objects endpoint&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to create the parent &amp;lt;--&amp;gt; child company relationship.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the above is done, you can fetch the IDs of the actual company you want to be added as the &lt;CODE&gt;associatedCompany&lt;/CODE&gt; and then update the contact record using the &lt;A href="https://developers.hubspot.com/docs/methods/contacts/create_or_update" target="_self"&gt;Create or update a contact&lt;/A&gt; endpoint, like my example below:&lt;/P&gt;
&lt;P&gt;Request URL:&lt;/P&gt;
&lt;PRE&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testContact@hubspot.com/?hapikey={{hapikey}}&lt;/PRE&gt;
&lt;P&gt;Request Body:&lt;/P&gt;
&lt;PRE&gt;      {
      	"property": "associatedcompanyid",
      	"value": "newChildCompanyID"
      }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:40:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317454#M30422</guid>
      <dc:creator>Willson</dc:creator>
      <dc:date>2020-02-07T09:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317456#M30424</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/72929"&gt;@Willson&lt;/a&gt;, thanks that confirms my suspicion for Parent/Child--that we'll have to do that via our own codebase rather than depending on Segment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if you happen to have an idea for the other questions above as well? To rephrase the questions above, is there a way (ideally through Segment's integration) to create separate Hubspot Companies by referencing to unique Segment Groud Ids rather than a domain?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:45:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317456#M30424</guid>
      <dc:creator>nigelqwilr</dc:creator>
      <dc:date>2020-02-07T09:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317457#M30425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/76645"&gt;@nigelqwilr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to hear I was able to add some clarification in there for you. In relation to your last query, I unfortunately would not be able to shed some light on this - The Segment integration is an external integration and I have no insights into it's current setup.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without much insight it is hard to make a suggestion here but if an API call can be made via Segment to fetch the data associated to this Group Id, a secondary request could in-turn be made to HubSpot API to create a new record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately though, this is not a feature I am aware of with Segment and so would have to be done manually from your end. Perhaps it could be worth mentioning to Segment Support to see if they would have any methods to handle this from their side.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:52:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317457#M30425</guid>
      <dc:creator>Willson</dc:creator>
      <dc:date>2020-02-07T09:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317755#M30452</link>
      <description>&lt;P&gt;Thanks for that&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/72929"&gt;@Willson&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In that case, one clarification I'd like to check is this then: Segment's documentation says that to create Hubspot Companies, a website URL is used as a unique identifier by Hubspot's Companies API. However, Hubspot's API references for creating a company only has name and description (&lt;A href="https://developers.hubspot.com/docs/methods/companies/create_company" target="_self"&gt;link&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming we can interact with Hubspot's API directly, we won't need a unique URL to create a Hubspot Company? I.e., we can use our own unique account Ids to create Hubspot Companies?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 23:47:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317755#M30452</guid>
      <dc:creator>nigelqwilr</dc:creator>
      <dc:date>2020-02-09T23:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Hubspot company (as well as Parent-child relationships) based on Segment group c</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317788#M30463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/76645"&gt;@nigelqwilr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Absolutely not! You will not need a unique URL to create Company Records. The Website URL property is used as a 2nd unique ID internally.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have automation tools that lookup the domain and provide more data for the company i.e If you create a company HubSpot with the website URL, HubSpot.com, we will see the record created and a few other properties populated as part of our automation.&amp;nbsp;But this is not a mandatory field whatsoever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 08:48:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-create-a-Hubspot-company-as-well-as-Parent-child/m-p/317788#M30463</guid>
      <dc:creator>Willson</dc:creator>
      <dc:date>2020-02-10T08:48:27Z</dc:date>
    </item>
  </channel>
</rss>

