Feature Requests

Got an idea for a new feature or integration? We’d love to hear it! You can find our roadmap here.

1 vote

Hubspot Association API – Companies

would be highly beneficial for users to enable the display of relevant company data within the WordPress user profiles and potentially other areas of the site. This feature would leverage the synced company data from HubSpot, providing a richer and more informative user experience for B2B membership sites Benefits: Enhanced User Profiles: Displaying company information such as company name, industry, size, and location can enrich the profile pages of each member, providing more context to other members and fostering a more connected community environment. Customized User Experience: With access to company data, sites can tailor content, notifications, and offers based on the company attributes of their members, leading to a more personalized and engaging experience. Improved Networking Opportunities: For membership sites focused on professional networking or industry-specific interactions, having visible company data can enhance networking opportunities by making it easier for members to find and connect with representatives from relevant companies. Administrative Ease: Admins can better manage memberships, understand demographic distributions, and organize events or content by having immediate access to aggregated company data through the WordPress dashboard.

Under Review Category: Core Feature Enhancements Kiri Stejko shared this idea Updated: May 6, 2024

1 thought on “Hubspot Association API – Companies”

  1. Hey Kiri,

    It’s not straightforward, unfortunately. It might make more sense as another addon plugin to WP Fusion, which is a bigger undertaking than simply extending the core plugin.

    What you’d want essentially is to sync HubSpot companies with a custom post type in WordPress. This would let you store company data independent of user data, and even display a company directory if you wanted to.

    That would involve:

    1.) Create a post type for Companies, with all the fields on the company record you want to store
    2.) Write code to detect when a new Company is published, and call the HubSpot companies API at https://api.hubapi.com/crm/v3/objects/companies to create the company (https://developers.hubspot.com/docs/api/crm/companies)
    3.) Store the company ID back to post meta
    4.) Write code to detect when a Company is updated, and sync the updates to the saved company ID
    5.) Try to find a match between WordPress users and Company post types (maybe by also saving the Company post ID to the user’s usermeta)
    6.) When a user’s Company Post ID is updated in WordPress, load the associated HubSpot Company ID from that post, and make a call to the associations API (https://developers.hubspot.com/docs/api/crm/associations) to associate the user with the company.

    This is a basic implementation and doesn’t take into account field mapping, non-text field types, deleting companies, or loading updated company data from HubSpot.

    A simple example would just be creating / updating a company when a user is updated, based on their user data. A customer came up with a solution for this a couple of years ago, I’ve just updated it for the newer HubSpot API and confirmed it’s working, and posted it at https://wpfusion.com/documentation/crm-specific-docs/custom-objects-with-hubspot/#companies . I hope that’s useful in the meantime 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *