HubSpot Developer Community Spotlights | HubSpot.Extend() 2022

Developers and partners share technical solutions and integrations built on HubSpot's platform. Topics include API integrations, AI-powered CRM search, and how the community is extending HubSpot's capabilities.
So much good stuff. Not sure what to do with myself. Oh, hi. Dennis Hudson here, developer advocate@HubSpot. My pronouns are he and him. I'm a balding white guy with a beard and I'm wearing a greenish T shirt with a bike on it. In my tenure here at HubSpot and before, when I was a developer working on the HubSpot platform, I've been lucky to have had such a rich community who has been there to support and inspire me. In my opinion, and perhaps I'm a little biased, the HubSpot developer community has no rivals. No other community of developers rallies together in support of one another like you do. Y' all are amazing. All right, enough gushing. Let's get to business. All the sessions you've attended so far have been pretty freaking amazing. I can't wait to see what they inspire you to build in the future. But they had one advantage that the next three developers did not have time. What was the challenge? You say take a complex problem and like an egg, crack it open to expose the basic ingredients of the problem. Then, using these ingredients, accompanied by the spices available in a developer's pantry, prepare a dish that can be served to sate the seemingly insatiable Appetite of the HubSpot community developers and do it in under 10 minutes. I didn't think it was possible, but I was proven wrong in most spectacular ways. So Ben, Nicole, and Roman all delivered some of the best developer quiche that I've eaten. Friends, I'm not selfish. No, no, no, no, no. I'm here to share the bounty with you. And without further ado, may I present the three course meal that is the HubSpot Community Developer Spotlight.
I'm Sobhan, CEO of Arivi. Today we'll talk about how ARIVI built its scalable integration with HubSpot. We will start with quick introduction, followed by the challenges we faced and the solution details. Ryvi is an operations platform for service businesses to streamline their operations. We have a long history of working with HubSpot, its APIs, and APIs in general. The Rivee integration app has been on the HubSpot Marketplace for more than two years. It's certified and has glowing reviews. In one of our customers words, and I quote, it's the best thing that happened to our business in a few years. For us, those few words convey the impact of the HubSpot IV integration in the best possible way. So our customers had figured out their sales piece of the puzzle with HubSpot, and their operation needs were served by Rivi but the systems were disconnected and it was a disaster. There was no way to send data across two platforms. The result was tons of manual effort data, copy phone calls, text messages and bundles of printed pages to name a few. And there was no single source of truth for the business. Let's consider that a sales team has marked a particular deal as one in the sales pipeline on HubSpot. And they want to create a task or an operational plan for for the ops team to prepare, schedule and plan resources on their IV platform. So this requires bringing relevant data from the HubSpot deal structure and morphing it into the appropriate data for the opsworth, which is typically we call the IV task structure. So our engineering was tasked with building a connected layer to take care of such orchestration. The base use case looks straightforward, but building a generalized version of this is complicated for a few reasons. So first off, as the audience knows, HubSpot platform provides extensive customization options to businesses to structure their sales process, their service process. And we have similar level of controls offered on the IV platform as well. And you have unique structures, you have field types, you have nesting, you have custom objects. All these these things bring complexity to the problem. And to make matters more difficult, each business have some unique sales and operations workflows that has to be catered in the context of this data handoff between the two platforms. So building a clear handoff boundary between the systems was absolutely critical. And it also had to be very easily configurable for each customer. So the solution can scale to thousands of customers without having to make one off changes every time or doing customer integration effort. So after many heated debates with our architects, yes, engineers love to do that. Our solution looked something like this. We'll again use our simple use case to understand the data flow and the components involved in the process. So first off, we connected with HubSpot webhooks to listen to particular events that were interesting. In our use case, the deal change event is interesting so we would be hooked onto that. When that happens at IV integration pipeline gets a post notification at a known endpoint and it enqueues the event to be processed. Then when the time is right, a pre processor is called or invoked to assess the event, figure out the match and then fetch necessary configurations for that for that particular customer. As part of the configuration we load up a predefined JSON mapping structure for that customer that defines the Data between the HubSpot deal data and the RIV task data. We will zoom in on this piece in a little bit. So this JSON and some other configs are then passed on to a cloud function that we call it a cloud function. It's literally a cloud function like an AWS lambda or something that is responsible for bringing the HubSpot data any additional HubSpot data in an optimized way. Also, it's responsible to transform the data based on the provided JSON mapping and then generating an IV friendly structure format for for this data. Next up is a downstream processor that takes the output from the cloud function which is the IV friendly data format, and it's responsible for sending this data to different modules within the IV platform. The example of that may include committing data to storage to create tasks and other objects for preparation, for scheduling, for planning and and then sending notifications through different queues to name a few. So here is a quick example of a very simple JSON mapping that we maintain. Notice there is a particular node. Each node represents a field info from HubSpot and how it maps to an IV field along with the field type. So there are a few things to highlight in this solution and based first off, for the JSON structure the simple version was straightforward. But we recognized a few complexities early on in building a more generic version or a generic scheme and we solved them. So first off, the more complex object structures had to be handled with a jQuery style selector scheme where we are able to look up values on either platforms and then provide a mapping formula based on that. So it made it very flexible. Sometimes we had to add pre processing directives to provide functions for instant data manipulation like trim map based function date formatting, time formatting, lat long calculations to name a few. And then there were some business specific rules that had to be included to add, remove or morph certain data elements for the operations team so it could make sense for them. So we would do that Sales to ops translation lingo within this file and then it also had extensive error handling. The second thing to point out is that the entire process of understanding and applying these rules was contained within this cloud function. Keeping this part of the process separate meant quicker iterations and easy deployments and then encapsulating all the complexities of the integration in a single place. I can't stress enough how important this was in evolving and quickly iterating this pipeline. The third thing is once we had this whole pipeline built and set up, it allowed engineering team to leverage it in other parts of the product. So for example we talked about the webhook usage, but we could also trigger it from certain UI actions hooking onto different objects, their states and certain events on either platforms. So it helped us quite a bit. So that covers a high level overview of the solution. Among other positives, this solution allowed us to onboard customers much faster and handle their requirements in a scalable manner. I hope this was useful for the audience today. I encourage everyone here to build the next best thing for their customers and delight them with the HubSpot ecosystem and the amazing APIs it provides. So I am available for any follow up questions or deep dive discussions. You can reach out to me directly@solonrivi.com thank you again.
Hi there. Welcome to my session about using custom objects to create partner records and track referral leads. My name is Nicole Pereira, CEO at RemoteTish. We are a HubSpot diamond partner. We won the 2020 theme hackathon contest as a most technically optimized theme and we currently have 11 themes in the Asset Marketplace. So today we're going to talk about creating a custom partner object, creating partner records from a registration form and letting partners submit referrals through a form and automatically associating those to all the records. So let's start with the partner object. So you may need this because you want to track offline referral sources. And the way that you do that is you use the CRM API. You go and post to create your custom object and you make sure that it's associated at a minimum with contacts, companies and deals, and potentially tickets. But for this project you just need contacts, companies and deals. Then we have the partner form which allows your partners to self register, which saves everybody time. So you're going to do that using the Marketing API. You'll pass values through the forms. Now accept custom object values. So once you pass that through, it'll just make that partner record for you. Next we're going to let your partners submit their own leads to you. So they can do that through a referral link, they can do it manually. And then at the end of all that you're going to just create an association between everything with an API. So that's going to look a little like this. They might have a referral link with some sort of ID or identifiable information in the link that then gets pulled into the form into a property. The form itself might have a hidden property with that identifiable information. If this partner is using like a dedicated form on a page, that's going to then API all that information over. We're going to create contacts and companies and deals and associate everything. And obviously you can still do this all manually from the inside. Say you, you have lists or other information and they're not using the form. But the easiest way would be to just let your partners self submit their leads to you. So how are you going to do this? You're going to use the Marketing API and that will post into the forms and create that new contact. So when this form is being submitted, it'll have a little bit of data for the lead and a little bit of data for the partner. And so when you send the lead information over, if there's no company that currently exists, you, you can turn on the settings that allows automatic company creation and association. So if the company doesn't already exist, it'll make it. And if it does already exist, it'll associate the contact with the company, saving you a step, which is really nice. So the way you're going to do that is you're going to use the form, you're going to pass that information over via the form and now it's going to make that contact for you. Then you're going to have this CRM API that you're going to use and you're going to need to get the ID of that contact that you just sent through the form. You will have their email address. So this will make it very easy. So you'll just go through and grab that and then you'll also need to get the company that was just associated with your contact and you're going to store these IDs inside your application for use later. So how are you going to do that? You're going to use the CRM API, you're going to get information for the contact, since you have the email address, grab that contact id, you're going to use that contact ID and you're going to find out what is the associated primary company to that contact. You're going to grab that ID for the company and you're going to store both of those for use later on. Then we're going to use the CRM API yet again. You're going to get very familiar with this API and it's going to be used to get the custom object data, because at this point you don't have it yet. So you want to find that partner ID via the identifiable properties that you had sent over that you were housing in the application as well. You got to go find that and then you're going to associate that later on. So you're going to read and get data from the custom objects, which is your partners using a get through the CRM API. And then once you have that id, you're going to store it. Next you're going to make a deal and then get the deal's ID and store that as well. So a little different than the other ones where you're just grabbing everything, because in step one with the marketing API, you created the contact and sent over information related to the partner. Now you're going to go in there and you're going to make a deal and then get the deal's id. So this is a net new creation of something which you haven't done in a while because the last three steps were just getting information. You're going to go in there, you're going to create a deal, and then once you create the deal, then you're going to get the deal's ID and you're going to store that later for association. Next you got to do all the associations. Like this is the hard work without the associations. A lot of this doesn't quite matter because if you make things and don't associate them, the cleanup work is going to be a mess. So we're going to pop in here, you are going to take all those IDs you have and you're going to start with the partner, you put the partner ID and then you're going to make an association with the partner with the company with a partner, with the contact with the partner with the deal. You don't have to worry about the company and contact association because that was already done in step one if you had that setting on. So now you're making sure that the partner is connected to all its important pieces so that you can track that referral. And then the last item that you need to do is you need to associate the deal to the contact in the company. Because if you've noticed before, we connected the partner to the contact to the company in the deal and the company and the contact are already connected, but the deal is not connected to the contact in the company yet. So to do that you're going to use the CRM API and you're going to create an association between the deal and the company and the contact, since you have all of those IDs and that's it. Now you have a full blown partner program where you have a partner object. You can now have partners self register themselves and show up in your database. And then you have partners who can submit their own leads, making it probably the most efficient way to get referral information from your partners. You know, quick and easy.
Hasflot is a powerful and easy to use CRM. But searching CRM through API is not that easy and that doesn't have to be so. Actually, this can be so simple that you only need to ask a question. Hi, my name is Roman. I'm super excited to share with you my experience building a new way to search hotspot CRM using artificial intelligence. And right now I will show you why I built such a tool and how AI is a hot topic these days. A lot of folks are developing new applications utilizing it. A half a year ago I had a chance to start working with GPT3. It was a project for salespeople which used a lot of data from HubSpot CRM as an input for GPT3. To get all that data to my app, I decided to use HubSpot's CRM search API. The number of searches I needed to craft was huge. I had to manage and run them through a number of API endpoints. Keeping track of all the variations wasn't fun and easy and most important, it's not flexible. Let me show you. For example, let's take a simple search like finding someone named John via the Contact Search API endpoint. By setting the first name filter equals to John. The API URL and query JSON would look like this. Or let's say we need to find a company with the name Cohorta. Then we would need to send a post request to the company search API with a different query that looks like this. Let's take it to the next level. CRM custom objects are really powerful, so maybe I want to find a custom object with a specific field. For that I need to make a request to the search endpoint defined by the custom object type and also provide a custom query. Individually these queries are straightforward, but as you create more and more with more parameters, varieties and filters and complexity will grow. There must be an easier way to construct them. Can we use AI to tackle this problem? Artificial intelligence is all over the place. GPT3 can do almost any text work. Let's say one has a kitten and needs a name. GPT3 can suggest that for you need to know if tweet is positive or negative. No problem. GPT3 can do tweet sentiment analysis for you. What is even more interesting is that we can generate database SQL queries based on plain text. As you see, GPT3 is a powerful language model that can generate even programming logic based on plain English statements. Can it generate that JSON that helps what Search API expects? The answer is yes, just some basic data training would be sufficient. Give AI a sample set of inputs matched with the desired outputs and the AI quickly gets the idea of what we want. Together, HubSpot API and GPT3 creates a possibility of using plain English text to get JSON queries and perform the search. And guess what? I did a training for you already. In this GitHub repo you can find the logic written in JavaScript, you can download it and run it on your local server, skipping the training and interface creation altogether. Only two things are needed to make it work. API key for GPT3 and HubSpot access token. Both OpenAI and HubSpot make that easy. Get a key by registering for OpenAI and viewing API keys in your account. Then in your HubSpot portal, create a private app and get an access token. After getting these keys, you need to add them to the two variables in the config file. It's located in the project root under the local and then the config folder. After setting and modifying the config, visit your terminal and run NPM Start. This spins up the server which hosts the sample webpage on localhost port 50Ln. Now you are ready to go. Enter CRMsearch as you were talking directly to your HubSpot portal. The tool will output a HubSpot friendly JSON query and perform CRM search like this. The code that performs search is at the left and the actual search filing is at the right. It's worth mentioning that this is a new technology so false positive can happen. To refine it further, provide more training examples that suit your queries even better. Now you can do what you do. Focus on developing more complex HubSpot solutions like creating more ways to get data into HubSpot through custom objects because now you have a flexible and automated way to query that data. I'm Roman from Cohorta. Thank you for letting me share this solution with you. For more details you can Read on the HubSpot developer blog and feel free to connect with me in LinkedIn.
Wow, those are fun to watch. In my 18 years in software development, I have always learned the most from peers. So seeing solutions like that from Soban, Nicole and Roman are powerful. Thank you. Examples of what is possible and give all of us the confidence to build more with HubSpot folks, you did it. Six hours of HubSpot content presented by 27 experts inside and outside of HubSpot. My name is Chris Riley. My pronouns are he, him and. I am a manager in HubSpot's developer relations team. Our team wakes up every day thinking about how we can be stewards of your journey in building and growing better with HubSpot's platform. Hosting events like this are just a small portion of how we do it and we are super excited to share with you even more interactive and engaging content coming in 2023. But let's take a moment to recognize first the people who put extend together. Just clap your hands if you have ever organized an event before, you know in the few weeks leading up to it, you start to question your sanity a little bit. The hubspotters who pulled this together, worked like crazy and showed a deep commitment to making sure you all got the content you deserved. In particular, I would like to thank Sarah, sj, Makeda, Jocelyn, Dennis and all of the speakers. If you know any one of them, please reach out and say thank you. But now I want to thank you, all of you. It is all of you that are building better with HubSpot and unearthing capabilities that are making end users more efficient and effective. The ideas that come out of the developer community are always amazing and there is something really exciting about just making businesses more productive and successful. And I'm sure you agree with me. You work hard. So now it is time for us to clear our minds, gather together and have some fun. After my next few lines I will set you free to join our interactive experience hosted by two Bit Circus. We're going to get together for tech infused trivia games. I am not great at trivia at all, but I am a gamer so bring it on. The attendance is limited to the first 500 who join the fastest so so get your finger ready to click the link. So don't idle. Head over to the lobby in the navigation above and you will see a pinned link to the experience. Also, our moderators have shared a link in the chat. Are there prizes you ask? Of course there are prizes. Hand selected and composed of awesome HubSpot gear. And we appreciate you giving us your time. Today we are on HubSpot developers. Click that link and let's go have some fun. See you there.










