Getting Started with Custom Objects - HubSpot Essentials Training For Developers

Dennis and HubSpot developers walk through custom objects in the CRM platform, showing how to build them, query them with GraphQL, and create dynamic pages. Learn what custom objects can do and how to use the API.
Hello world. Welcome to HubSpot Essentials for Developers getting started with Custom Objects. I'm Dennis, Developer Advocate HubSpot and I go by the pronouns he and him. And if you're curious what I look like, I am a white male, very much balding and every year it gets worse. Real quickly I want to take you through the table of contents for the event. This gonna be in three parts. Dax and Tyrone of Aptitude 8 are gonna walk us through a really cool example they have with custom objects and then really excited about this. David Adams and John McLaren, both developer advocates at HubSpot are gonna do a really cool workshop. And yeah, I learned something with this after that a little Q and A where I bring all them up and they say all kinds of smart things. Lastly, SJ is gonna be helping a lot in chat here with adding some resource links. We have a main link so we're not flooding the chat. Speaking of chat, let's make sure that you go ahead and review the code of conduct which should be posted in the chat shortly. The basic is don't you know, be nice to people. No promotional posts, no recordings, no screenshotting, blah blah blah. Just be nice and if you have any concerns, report them immediately using the form SJ is posting in the chat right now. And while we're talking about chat, this happened to me and it's embarrassing. You have this great comment, you say it and it just goes to hosts and panelists. Go ahead and change that to everyone now so everyone can see how witty and amazing you are. Lastly, if you have questions on that, anything Q and A related, add them to the Q and A panel so we don't lose them. And I want to take a second to plug our upcoming event. Go ahead, clear your calendars on October 27th because we've got something coming for you. HubSpot Extend HubSpot's HubSpot's flagship conference built for developers. If you're building, customizing, integrating and developing on HubSpot, I mean this is a no brainer folks. You need to be there streaming right into whatever space you call your office. October 27th. And as our HubSpot developer community grows, we've looked to Spotlight members in five, five minute lightning talks. That's where you come in to showcase our global community. Developers from all over the world are invited to submit an entry. We'll be sharing news about this broadly tomorrow, but you all can have a sneak peek at all the details in the link. Sj, go and drop it in there. And now enough of Me. Let's bring on the really smart folks. Dax Miller is head of product and Tyrone Foston is the chief technical officer at aptitude 8. I'm going to shut up. I'm going to let them take over. You guys have fun with this. It's going to be good.
All right.
Appreciate the intro, Dennis. I'm Dax Miller, head of product over at 8Aptitude8, our leading our product arm, 8Labs. My pronouns are he and him. I'll popcorn to Tyrone.
My name is Tyrone Falsten. I'm the CTO of appstool Day. We're pretty much head up engineering and co head things with Dax in terms of product development and software and things of that nature. And anything that's kind of quasi it related usually kind of falls into my bucket. Pronouns are he, him and I'm pretty fun and goofy. So come talk to me after this.
Amazing. So what we want to talk about, I'm going to share my screen now. What we want to talk about is custom objects, one of the what to say one of the paramount new features that have happened the HubSpot within the in the past few months. So let's say a good handful of months here. But what does this really do for us and what does it do for us specifically? So again we've already done our intros. This is what we look like at our best. So I'll send that.
Let me here.
So this is what we'd love to talk about. We sell with Eight Labs, our product arm of a Aptitude 8. We sell and build different applications. I mean we sell SaaS at that point and we have a lot of different needs that we have both on our customer service side, on our go to market side to have that data right in HubSpot. Now obviously there's no native object for our particular app subscription, but this is something that custom objects allows to do to extend HubSpot further than the limits that it was ever kind of built to do. So so we're going to talk about why we use this app subscription object, how we created it. Tyrone will go into a deep dive of the actual infrastructure of this and how we get this data into HubSpot from our proprietary lab and kind of the use cases of how it really helps our business on every single day. So why do we build this thing? We could have used a deal object. We could have jammed everything on the contact. But why have a custom object specifically for app subscriptions? So our internal services revolve around this, right? So our customer service can easily Click into this custom CRM card and see this app subscription custom object that is representative of everything about their subscription. For example, we have an app called Clone Attack that duplicates things in the HubSpot ecosystem. So what you're able to do is see, does this person have Clone Attack? How many clones have they made? What pricing tier are they on? Is their subscription pass due? Is it active? Is it incomplete? When does the billing period end? Having all that information on an object is just paramount for what we need to do. So again, we have install date, when they disconnect, when they disconnect as if they uninstalled. We can impersonate users via this, via this custom object. We can actually click in and see their lab, their settings as they would see it. So great for troubleshooting on the customer service and payment methods, billings, just, you name it, we're able to build that as a foundation additional block in our work stream. We can actually provision users from this app subscription object as well. So if someone needs to be turned off, we could turn them off or turn them on right from HubSpot. Again, it's all based upon these properties that are sitting on this custom object so happily nestled. It's a, it's a beautiful thing that we're able to build this all again directly inside HubSpot. Lastly, revenue reporting, seeing our MRR again, all that are just key things that any SaaS company would need to see at a, at an arm's reach. And we're able to use, we're able to leverage that with custom objects. So I'll let Tyrone talk about this schema of how we've kind of built this in collaboration with Stripe and kind of our laboratory. So, Tyrone, I won't steal your thunder.
Yeah, yeah. So for us, before we actually got hooked up to HubSpot, we basically had our own proprietary system which is really, at the core of it is a giant MySQL database. For us, we actually have a table called App User Config. For us, every customer is considered an application user. That's where App User comes from. We have a table called App User Config. This table is actually pretty simple. It's a key value pair table. There's like an app User id, there's a configuration key and then there's a configuration value. All of our users actually have the exact same keys. What differentiates everyone is, is the app User ID and then the key values. That's what differentiates a person from having clone Attack Basic vs Clone Attack Pro vs Clone Attack Enterprise and how many clones they get are they able to use workflows and things of that nature? Every single attribute of all of our apps are really just this massive collection of configurations. What we did was, it was like, okay, great, how do we get this into HubSpot? So we basically went into HubSpot, we created what's called a custom object, and in this case we called it the app subscription object because it's a subscription for our apps and it also is directly tied to our app users. This subscription object is there to handle all those use cases that Dax just talked about. But all of the fields, all of the properties of the apps description object ultimately map to one of these configuration keys that is in our database. Of course, this app user config table not only feeds HubSpot, but it also imports data from Stripe. It also imports data actually in from PayPal. There's actually a handful of other systems that we connect to. I just have on here Stripe because it's one of the bigger known ones that most people would be aware of. And then of course, all of our apps tap into the same table. This app user config table that we have gets a lot, a lot, a lot of activity. Definitely requires a lot of optimization, a lot of indexes, a lot of keys, a handful of read replicas and backups and things of that nature. Handful of views, handful of caching. So there's a lot going off this table. But ultimately what we do is on a periodical basis, we are almost for every user, we are periodically looking at the data in the app user config table, attempting to see what's new or what's been changed, and then copying all that over into HubSpot. This is so our support team and marketing team can actually have fairly up to date data. It's not real time. It is more like could be anywhere from 15 minutes to about an hour behind. But it definitely allows us to do all the things we want to do, like fire off those emails or have communications with our customers that are pretty close to when the actions that triggered them happened. And at the same time, when people are actually in HubSpot and they're in there, they're making those updates. Like, for example, Dax was saying, you can actually, from HubSpot, you can actually change someone from a Clone Attack Basic to a Clone Attack Pro. Or you can say, hey, I want to override the number of clones that come in a particular tier and I want to give them a million clones if I want. You can actually do that from HubSpot and the way that works is just like we have a scheduled task that kind of pulls data from the proprietary database and shoves in HubSpot. We also go and look periodically at all of the app subscription objects that have changed since the last time we went and looked. And so when we look, we look at all those objects, we suck them down. And then of course, we have this mapping, this internal mapping already kind of.
Set up that says if we're talking about standard objects, again, if we're talking about a contact in a company, you can have a special association where you have the CEO of a company being a special association, it's still a contact being associated with a company, but it will appear differently in HubSpot. So say if we have our event object type, you can have contacts being associated with the event as attendees, and you could also have a second association type that's the presenter of the event, both contacts associated with that event. But that'll look different in HubSpot, and they're going to be different association types. And then custom object properties decide what information is stored for an individual custom object record. And similar to associations, these can be created at the same time as part of the object schema, but you can also update these through the Properties API. That's one of the best things about custom objects, if you're already used to working with HubSpot. So many of these things that work for those standard objects work exactly the same for custom objects. So you can use the Properties API to create or update or even remove properties from the custom object after it's created. Then another option is that users can edit properties inside of HubSpot, so you don't need a developer to change those properties once the object is created. Just like our other standard objects, you can create property groups to help you organize the different properties that you're storing for those objects, sort them by data type or how they would be used by HubSpot users. And then just like our other standard objects, you can also set properties to be required or context or properties that can be set as searchable from Boards are completely there.
So we talk about reporting our dashboards. All that Data is using HubSpot's beautiful dashboards out of the box, because it's again, it's a native object that we're able to do. We're not just kind of pulling in data or reading data from an external source. So the use cases go go on and on. And I recommend everyone that has a really proprietary kind of set of data to see if Custom objects is.
Is for them.
So we have our emails here. If you have any questions, concerns about utilizing custom objects, development in general, and HubSpot.
We are. We're here when you need us.
So I'll turn this right back.
Perfect.
Thank you very much. And now let's go ahead and get David and John up here. I'll let them do their own introductions. And once again, I will shut up and get off this screen. Goodbye.
I'm John McLaren. He, him, pronouns. I'm a developer advocate. I'm wearing a black shirt and glasses and I am pumped to get started. This is getting started with custom objects. I'm going to pass it off now to David Adams.
Hello, everyone, my name is David Adams. I'm a developer advocate engineer at HubSpot. I use he, him, pronouns and I am today wearing a black T shirt and I have very short brown hair. We're going to talk a little bit more about custom objects and specifically how you can use them. Within the HubSpot CRM, we're going to look at what properties are and how to build them. We're also going to see a couple more use cases for custom objects. I think we've already had a very excellent use case presented to us, but we're going to cover a couple more. Then we're going to run through a demo. We're going to see how to create custom objects in HubSpot. We're also going to show you some examples for how to leverage custom objects in your apps or also on your website. First, what is a custom Object? So in HubSpot, we provide several standard CRM objects. We've got things like contacts, companies, deals. We've got things for E commerce, like products and line items. And then we also have interaction objects, things like calls, notes, deals. Sorry, not deals, meetings. So custom objects are objects that represent your business and they help you organize your data. In our CRM, we're going to talk a little bit about some definitions here and some terminology. So there's two parts to custom objects. The first, we have the object schema. The schema defines the custom object, tells you what that object is, what that object looks like. It contains things like the object properties and it also defines how that object is associated to other objects. We'll go into more detail on those in a little bit. And then on the other side of that, we have individual records. So if we're talking about contacts being an object, then an individual contact record. If we're talking about companies or deals, similar, we've got a specific Company record or a specific deal record. We're talking about an example for custom objects. You could have a custom object for events, and then you have a specific event record covering all the details for that event, and then the properties are defined for that specific record. So if we're talking about a contact, you're talking about the email address on that contact record, or for example, the website of a company. Again, if we're talking about our event example, you can talk about the title of the event or the time of the event, and then those records are associated with other specific records. You've got a specific contact record associated with a company because it's an employee of that company, similar to similar to that. If we've got this event object, you could have a specific contact associated with an event as an attendee of that event. So let's talk a little bit more about associations. They establish context and relationship between records, and that's part of the object definition. You can create associations as part of the schema request. So when you're first building and creating the custom object, you can define the associations along when you're creating that object. Or you can use our associations API just like you'd be able to use with any of our other standard objects. One thing to note, if you're looking at associations through our APIs, associations are always two directional. So if record A is associated with record B, then record B is also associated with record A. But those are technically two different associations because they're also directional. So A to B is going to be a different view than B to A. You'll still be able to find those two records and they'll still be able to be visible to each other. Just a technicality of our API works. And just like our other standard objects, you can also create custom types of associations and use custom labels. So if we're talking about standard objects, again, if we're talking about a contact in a company, you can have a special association where you have the CEO of a company being a special association. It's still a contact being associated with a company, but it will appear differently in HubSpot. So say if we have our event object type, you can have contacts being associated with the event as attendees, and you could also have a second association type that's the presenter of the event, both contacts associated with that event. But that'll look different in HubSpot, and they're going to be different association types. And then custom object properties decide what information is stored for an individual custom object record. And similar to associations These can be created at the same time as part of the object schema, but you can also update these through the Properties API. That's one of the best things about custom objects. If you're already used to working with HubSpot, so many of these things that work for those standard objects work exactly the same for custom objects. So you can use the Properties API to create or update or even remove properties from the custom object after it's created. Then another option is that users can edit properties inside of HubSpot, so you don't need a developer to change those properties once the object is created. Just like our other standard objects, you can create property groups to help you organize the different properties that you're storing for those objects, sort them by data type or how they would be used by HubSpot users. And then just like our other standard objects, you can also set properties to be required. Or context are properties that can be set as searchable from within HubSpot. One of the things about this is you can actually change these after the object is created. If you add a new property and you decide that you want it to be required, you can update the object schema after the object is already created without having to delete the whole object and start over. You can just change that by updating the schema on the fly. You can see here exactly the same way that a user would update a property within HubSpot for a contact or updated properties for companies. Looks exactly the same. Setting up groups is exactly the same. For custom objects, you do have to create the object type first through our APIs, but once that's done, the properties work exactly the same as other objects. So we're going to take a look at a couple examples here. First one we're looking at is auxiliary, sorry, Auxilio. They've created a referral program that's built entirely within HubSpot. You can see in our example here, they've got referrals as the object type. And you can see on the right it's associated with two different contact records, allowing them to track this referral program and who's the referral directly inside a HubSpot. And then the second one we're looking at is Impulse Creative and their program Cohortium. It's a community platform built entirely on HubSpot, using user profiles and topics as custom objects. You can see we've got an example here of a member profile, and it's a little difficult to see, but there's a set of badges for that user profile that you can see as a custom property in here associated with a contact record. So you have that person and their member profile inside a HubSpot when you're viewing that community. All right, and now it's going to be demo time. We're going to take a look at how to actually create the object schema and how to use those custom objects. And I'm going to hand it over to John to run our demo.
All right, now that David's explained the concepts, it's time to buckle up. We're going to dive headfirst into this and as you can see on the screen, we're going to cover a lot of ground. If you thought you were going to try and work while watching this, stop that. This isn't second monitor content. Scoot that window over. All right, let's first start with creating a custom object. The custom objects that make sense to create will vary by the individual business. Some businesses may need a custom object for physical buildings or equipment so that they can organize, automate and report on their work better. Generally, custom objects make the most sense when the items are unique and the relationship between the object and another CRM object is useful to know. An example would be an association between one object and contacts. So say we own some form of summer camp business. Aside from contacts, all of our data would need to be related to the individual camps that we're actually running. For example, we might want to associate parents to the individual camps so we can send marketing emails to just the relevant parents as well as, say, display a count of how many families are actually attending the camp. There's a couple of different ways to create a schema for a custom the HubSpot CLI and the API. If you're building a custom object for just one HubSpot account, then most of the time it probably makes sense to use the HubSpot CLI. Or you can also do it from the API docs themselves. This way you don't need to code the API calls themselves or set up a tool like Postman for something that's basically a one off. I'm going to share my screen. I have VS Code open right now with the HubSpot CLI installed and the terminal open and set up with the account that we're going to use today. Today we will be creating a summer camp object and associating that with contacts. First, what I have open right now is a JSON file named summercamp JSON. This is the schema that we're going to add to our HubSpot account. The name is a system name, and basically this is a variable that you'll use later, like in GraphQL queries or in CMS Hub. The labels are what the HubSpot CRM will show users when referring to records of this object. The properties are fields that store information, just like contact properties. And we also already know that with our summer camp object, we're going to associate it with contacts, so we can provide that. All right? To access the custom object Commands in the HubSpot CLI, you enter HS Hostema object, all right? And as you can see by the big warning text here, this feature is in beta and is subject to our beta terms. There are two main custom object commands, HSCustom object schema and HSCustom object create. We're going to enter HSCustom object schema because we want to create a new schema, all right? And then from here we can see that there is another command called Create Schema Create. And then what it's asking for is a definition. The definition is a JSON file. So we've already created that JSON file and we're just going to pass it through and it is called summer camp.JSON. all right? And we hit enter and huzzah. We've now created that custom object, and if we click into the CLI here, I will drag this window over so everyone can see. All right, so what it's done is it's created a CRM view for your new summer camps object. And it does take a moment sometimes for this to kick in. But a cool feature is that once you've created a custom object, let's see if it'll work right off the bat here. As I said, sometimes it takes a few minutes, but the gist is sometimes, if you're lucky, it'll happen right away, but it will show summer camps or whatever you name your custom object right in the main navigation. And anyhow, you can also create custom objects using the API. In order to create a custom object using the API, you use the post the post for CRM v3 schemas endpoint, and the body that you actually pass is the exact same JSON that we showed before. And if you're doing this again, you'll want to use a tool like Postman. There is a VS code extension that does about the same thing as well. Yeah, and if you are going to be creating multiple custom objects and want to do it programmatically, then you write a script in your language of Choice using the HubSpot API client and pass in your Token. All right, so let's talk about records. Using the CLI and the API, you are able to create new object records as well. So if I enter HS Custom object again, you can see the HS Custom Object create command, and it's asking for a name and a definition. The name that it's looking for is actually the object type id and the definition is again a JSON file that you provide. Now, a little bit of cooking show magic here so that we can get to showing you cool ways that you can use this data. We have a bunch of records already populated right here. What we're going to do with this is we're going to grab our record data using GraphQL. If you're new to GraphQL, that's okay. It's a query language. That's what the QL means. It's designed to give you exactly the data that you're asking for, and it gives you the data based on its relationships to other data. That's kind of what the graph refers to. If you've never used GraphQL before, I'll show you a tool that makes it easy to work with in HubSpot. This is the GraphQL interface. What we want to do is we want to grab all of our summer camps. So we're going to click on CRM here, and then we're going to go to summer camp collection. We click on that and then we want to get all of the camps. So we go to items, and then let me just. I'll wait, I'll wait and I'll. I'll. I'll show you just the specific data we want. So we want the description, the end date, the object id, the name, and the start date. Now if I hit this run button. Now we've grabbed all of that data and we have a list of each of the camps, their start date, end date, etc. Now, that's cool and all, but I want to see this ordered by the start date. So we can click on Order by and then pick Start date ascending. And then we can see that the first one in the list is Camp Dennis. All right, that's great and all, but let's hop over to. We'll hop over to Postman. All right, so I have Postman already set up with the API URL right here. I have in the authorization tab my private app token. And then we're over in the Body tab right now, and we're going to click on GraphQL. And that's because GraphQL has this really nice interface for doing GraphQL queries. And we're actually going to go over to our Query here in GraphQL and copy. Oh, actually, let me do one more quick thing. I think it'd be really cool if when we grab this data, we're not just grabbing the information on the camps, but what if we can grab the contacts that are associated to this specific camp? Well, we can. So there's this cool feature. You click on associations and then you can click on contacts. And I don't actually want the details like the email addresses and stuff for the contacts. I just want the total count of how many contacts are associated to that camp. So we're going to click on total. And now if I hit run. All right, now we're getting the total. This is awesome. All right, so we're going to copy this and we're going to bring this over into Postman and we're going to paste it in and then we're going to hit send just to make sure that works. Sometimes it takes a second click. There we go. And now we're getting the exact same data we were getting before. I already have in here. We're going to pass some variables in because I think it would be great if we could get just the camps that are within the next 30 days. So in order to do that, we need to know what today is and then what the timestamp would be for 30 days in the future. I already did the math and this is what it comes out to. But now we need to pass this in so that we can actually use it in our query. All right, so in order to do that, this is kind of like a. Like how you would pass parameters into a function you'll pass in today, which refers to this, and we're telling it that it's a date and we're doing the exact same thing for 30 days in the future. All right, that's not enough yet. We need to actually use these variables or else we're going to get an error. So let me just demonstrate that it says invalid syntax and just double checking. Oh, that's also because of this. But all right, now it's saying unused variable, so let's use that variable. Copying this just so that you don't have to watch me type this. Okay, so what this is saying is we want to grab all of the camps that have a start date that is greater than or equal to today, and we want to grab start dates that are less than or equal to 30 days in the future. Now, if I hit Send the camp wise is the first one that comes up. All right, so we're going to take this and we are going to actually do something fun with it. But first I want to, I want to note that, say you were going to use GraphQL for an app. What's great is you can grab the data that you want. You can also in Postman, if you click on the code feature here, it will give you code snippets that you can use inside of your app. Say it's a mobile app or a web app. You can grab these code snippets and it will make the request for you super handy and great if you are in a pitch. Anyhow, we're not going to use this directly in an app. What we're going to do is we're actually going to use this within CMS Hub. All right, so, and a quick reminder, please use the Q and A feature. If you have questions, we'll come back to them at the end. Promise. I'm not ignoring you, just Dennis. All right, so if I hop into VS code here, we're going to actually use that exact same query. And I've already got it right here, but I can just paste it just so you can see that it looks exactly the same. The main difference is up here. So first, just so you know, I created a folder named Data inside of my HubSpot theme. That folder contains a summer camps in the next 30 days graphQL file. This is just the exact same query that we were working with before. And then we are defining our variables a little bit different than how you do it inside of Postman. We're actually using comments at the top of the file. We are setting today to the local date time and then formatting it as a UNIX timestamp. And then we are doing the exact same thing for 30 days in the future. But then we're adding 30 days that makes this work. Now if we want to use it in the cms, say in a module and we'll show a module here. So I've pre built this module and I'll walk you through this. But in order to use GraphQL inside of a module, you use data query path. When you add that to the meta JSON file, the path that you're providing is literally the path that to that GraphQL file. That makes it so that when you are coding your HTML file here, your module HTML, you can access that data. It all gets added to the module object itself. So if you wanted to grab the raw GraphQL data, you literally enter module dot data, underscore query and that's everything. What we did here is we want to create a listing of the the summer camps happening in the next 30 days. And so we are grabbing that summer camp collection and the items. Then we're doing a simple for loop for summer camp in summer camps. And we are displaying the name, start date, description, the current number of contacts that are associated to this camp. And then we're also putting a link here, drop in the chat if you think you know where I'm going with this part. Specifically putting a link here. If you said in the chat or didn't say in the chat and we're thinking it that we were going to make dynamic pages, you are correct. All right, so we're going to go into the settings for this page and just clarifying, this is a normal HubSpot page and we're going to go into settings and we're going to go to advanced options. And I've already pre done this, but I'll walk you through it. So you can set a data source and it can be any CRM object type. We're picking our summer camp one. And then what we want the page slug to be, that's the URL after the main URL for the main listing page. We want that to be the record ID. The record ID is just the HubSpot object ID. This will make it so that no matter what, if we rename the camps, the URL isn't going to change. We're going to set the page title to be based on the object's name and then the description. So the camp's name and description. All right, we'll save, we'll go back into content here and then we're going to drag our summer camp module onto the page. All right, we're going to hit update and then I will refresh this page. Okay, so this is what our summer camp module looks like. And as you can see it shows a listing of camps and some information about them as well as that link I mentioned. And so if we click on that link, we get the camp name right here. We get the dates of the event, the description, and then we get a form to sign up. Let's take a look at what that module actually looks like to do this. So at the top of the file we're doing an unless, which means the opposite of an if statement. Basically we are going unless the dynamic this page is a dynamic CRM object page A the specific record page then display a listing and the listing itself is not the dynamic page listings feature. It is actually pulling just from the GraphQL file that makes it so we can get just the camps happening in the next 30 days. All right, so once we've done that, unless we're actually doing an else statement down here for when the page is that individual record page, then what we're doing is we're setting that object to camp and we are displaying the same information. The name, the start date, the end date description. Here's where things get a little interesting. We are using just one HubSpot form. We're also using the JavaScript embed code instead of the Hubble tag. The reason for this is that we are actually passing in the camp ID through the form so that we can associate that contact that fills out the form to the summer camp. So just showing you, we're using the on form ready function and we are then passing to that hidden field and then let me show you what that actually looks like in the form editor. So this is our signup form. The same form is used for every single summer camp. And so we are passing that ID for the summer camp through this field here. And this field is a hidden field. And the way that you make any field hidden and this hidden fields can be any field type, you just simply toggle it on and from there what we're doing is we're actually creating a workflow. This workflow is going to do the work of creating that association. The workflow is just based on that form being submitted. Once it's submitted, we run a custom coded action and our custom, if you're used to CMS Hub serverless functions, this is going to look very similar. So we're passing that same private app token that I used for Postman in through Secrets. We have the HubSpot API client that we are using to make our requests easily. And then right down here we have the object type ID and then we have the camp object ID that we are getting. Sorry, right here we have the camp ID that we are getting from the form and then over here we are associating the that contact with that specific summer camp. So let me demo what this actually does. So I have the camp wise form filled out here and I'm going to hit submit. Sweet. Thanks for submitting the form. We received your information. Let's take a look now at my contact record. Let me refresh. All right, so what's cool here is you can see I visited the summer camps page and then I also visited the camp wise page. And I submitted the summer camp sign up form. And then what's even cooler is you can see up here that I've signed up for two different summer camps. I've signed up for Camp Wise and Camp Dennis. I figured a camp with Dennis leading it would be awesome. Anyhow, the cool part about this is also that you can then jump to the record for Camp Wise and then you can also see who else is attending. And apparently Brian Halligan signed up, so I'm excited to hang out with him. Anyhow, I know I've gone through a lot really fast and I just want to do a quick recap of everything that we did. We went over two ways to create custom objects and object schemas. We went over how you can grab and filter CRM Object data with GraphQL by both API and CMS, showed you how you can build dynamic pages with CRM objects, and finally showed you how you can make a dynamic form that associates a contact to a CRM object record using custom coded actions in workflows. All right, I'm going to pass it back to Dennis to kick off our Q and A.
All right, friends. And yes, there we go. Great job, guys. This is good. So if I could just get all of my friends to come back up here. So David, John, Dax, Tyrone, all y' all get up here and show your pretty faces. Great job. I mean, seriously amazing content. And I'm so seriously just blown away by some of this stuff. Our friends have added a few questions in the Q and A, so I'll get started right away on that. Dwayne Higgs just asked, is it possible to have multiple GraphQL queries in a single GraphQL file? John singing, you just talked about it. If you feel like taking that up, go for it.
Yes, you can. And maybe I can. Yeah, I'm going to hold off on doing a live, live risky demo of it, but yes, you can do that. Cool.
Is there anything specific I should know when I'm doing it? Is it just pretty straightforward or any like, gotchas with that?
Not really. Just remember that if you are passing in parameters that you. That you are, that you're actually going to set them ahead of time. And don't just copy from Postman and hope that it works.
Cool. And I'll put all, everything, all my variables into that comment section. Right. For the entire thing.
Correct. Cool. Correct. And Hubble is allowed in there?
Yeah, it's crazy. Okay. Our friends over at Aptitude 8 answered a few questions, but I'm going to Go ahead and put them back in here, because why not? Chris Riley asked several questions. So let's start from the top. Are there limits to types of data you can store in a custom object? Can you store binaries such as images? And Tyrone, you answered it. I'm actually very curious about the images part of it. So if you want to elaborate there.
Yeah, so you know, if you wanted to take your binary and crunch it into bit 64 or something like that, you might be able to get away with it and put it into a text field. Although the thing to remember there is there are character limitations. So you probably would really not want to do that. The best thing you can do is take that file, put it on S3 somewhere and you know, use assigned URL or call it a day or come up with some other method. You definitely want to get out of the habit of storing very large things in your database, whether it's your database or HubSpot's database.
Totally agree. And David, maybe you can just add a little to that because this is a very common question around about just where do files go? When you submit a form, for example, can you speak to that just a little bit?
Yeah, just to kind of add on. You'd store the same type of data you'd be able to store in a contact record. The properties are exactly the same. So it's mostly going to be strings or enumerated values. Like if you've got a dropdown or something like that. For specifically for things submitted to a form, they're stored outside of HubSpot, at least not outside of the contact record. They're stored in our systems. But the actual form field is a link to that, to that file stored separately. It can sometimes, depending on what you're doing, it can go into like the file manager. But the only thing stored on the, say if a contact fills out a form and attaches a file, the only thing stored for the contact is going to be a link to that file. So similar for custom objects, you would have a, a place to store the link to that file, but you'd want to store that, that executable or that larger file elsewhere and then just link to it from within HubSpot.
Cool.
Yeah, you got a good one there. And just to chime in about images on the custom objects. So we have an app called Real City that is kind of like a Zillow out of the box, all in HubSpot. And one of the things that we do is when you have and I will share my screen, if we if it's okay. One thing that we. You could is we use images as a comma separated list of values, right? So these are getting imported from the MLS or maybe even uploaded. And to be able to actually leverage something like this in CMS Hub to have a slideshow of different pictures, this is all coming from one field. So again, these are all. And when you start to work with the mls, you're going to have they host those images. Otherwise you're going to have. You're going to start to come over these limits where we have tons and tons and tons and tons of images on that you're hosting on HubSpot and you don't want to use for optimization. You rather just refer to those from the actual where they're hosted. You know, the big MLS planet, wherever they have everything here. But ideally using comma rated comma separated list as values is our kind of workaround for any type of non. Non standard. Any type of non standard data type. So this is an easy example of that. By having just a bunch of different hosted images and one comma separated list and being able to use that in CMS Hub, but also being able to add video. Right. There's no video property on a custom object, or any object for that matter, but we're able to use that as well as 3D walkthroughs. Again, just comma separated lists of links that are externally hosted. So that's kind of just wanted to point that out how you can really leverage again that custom object with whatever data type you want by just being a little sneaky with the fields.
Nice.
Thanks Dak. That was really good. And I just assumed House, you're trying to sell right there, so I gotcha.
I want to chime on that real quick. Oh, sorry. I also wanted to note that that comma separated array trick effectively works also with Hub db so you can get the same sort of repeated field sort of effect.
Good call out. All right. Jorge asked a question for sending a custom objects for email. Do I need to enable programmable email beta in my module? I'll let John talk to that one real quickly if you don't mind.
Yes. So I feel like my questions are yes and no. But yes, you do need the programmable email data enabled and if you didn't know, you can do. You can enable it at the module level or at the email level. And if there is a module that that has the beta enabled, the entire email is enabled for that beta. Yeah. Cool.
Would you normally manage your custom objects? I'm assuming the records here via API or the interface once it's originally created. Yeah, you know what, Tyrone? I feel like there's two different ways. Dax says like, you know, go with the gui, but I feel like, you know, there's. There's an option perhaps for a more programmatic way if necessary. So it could be 50 50, right?
Yeah, I mean, generally speaking, it's one of those things like do I have access to the person's HubSpot? Because if it's yes, I'm probably just going to go straight into the UI and do it the simple way instead of like banging out some code and doing it the harder but more flexible, however you want to do it way. So it's really all about what can I get done? Quick, fast, cheapest, the best. And let that kind of guide you to the best answer.
Cool. And one more here we got. Is there a VS code extension I need to install? I mean, yes, obviously. John, if you want to talk. David, you take this one, buddy.
Honestly, this is a better question for John. I don't use VS code, so I don't think I can talk to this Stitch.
Take it and say yes. Just say yes and you're done.
That's like all my questions. The answer is yes. The HubSpot VS code extension is what you should install. That extension does not specifically do anything for managing custom objects. But there is also another extension that might be useful for working with trying to make API calls. I do not know a specific one offhand, unfortunately. I just know it exists and it's basically Postman in VS code.
Really cool. I don't see any more questions out there. I do want to make sure that there is a content poll I believe out there. So if you can go ahead and just take some time to answer that poll to see what's going on, how we can improve all that good stuff. And it just popped up my screen, so I assume it did on everyone else's as well. Also make sure that you do register for extend and if you do want to be in that five minute, you know, business with that, there is a link that I think will be advertised more publicly later and somewhere in there. I believe in our resources Doc as well. Before I leave, do you guys have any one of you guys might have any closing thoughts on anything here? I'm just very open. I'll go around. Dax, any thoughts?
I just think that again using the custom object, it just comes in handy. It's almost kind of just a. Here's your, here's your, your play Doh. What would you like to build? So we use it and we use it every single day. We interact with them all day, every day and it's just always so helpful to be able to not only access that, access the custom object, change the schema, add properties on the fly and, and thinking about how that custom object can speak to your app, how does it send data back to you rather than using it within the GUI within HubSpot? Yeah, that's one huge plethora of, of use case. But what about to your app, to your service, to external services? How can you use that as a, as a medium to really kind of control more in your, in your business? So again it's a big, it's a big deal. It's a, it's a must. It's a must.
Have beautiful Tyrone. Imagine you're going to mirror that. But if you have anything else to say.
Yeah, I mean honestly if we didn't have the custom app there'd be a lot more stuff we'd probably have to build which would really, really suck. So you know, once you kind of get that data into a custom object, you can do whatever you want. Another thing that we also found to be really useful for is we kind of do this thing where we're like hey because HubSpot kind of has a bit of a weakness when it comes to reporting. So what we tend to do is we'll use a custom object. It's kind of like a general data point and it helps us build a bunch of reports and stuff like that and people absolutely love the outcome. So it has a ton of flexibility out outside of you know, just like you know our, our use cases. But I can't wait until integrator objects come out eventually just kind of wink wink, throwing that out there. But custom objects are definitely the way to go. If you can find a way to use it, you will make your client so happy.
Cool.
Cool. John David, any closing thoughts?
Yeah, Tyrone just totally nailed this in talking about like the. You're not the only one that's going to be working with the custom objects like filling in the data etc. The powerful bit about custom objects is that non technical folks can hop into the CRM, make their modifications, write in the record as well as they can create automations based on it with workflows they can do marketing that involves it. Like we had mentioned with the marketing emails you can do a whole lot with it. The CMS Hub example I gave today, creating dynamic pages based on it, like having all of that happen just automatically is super powerful.
Cool. David.
Not a lot to add after all of that. Just Dax and Tyrone, thank you so much for being here with us today and presenting all the cool stuff you're doing with custom objects.
Yeah, totally agree. I also just wanted to have a little shout out to Sharon and Sarah here who have been doing our live ASL translation for us. You guys do amazing work. I don't know how you do it. And thank you for everything. Everyone else have a great day. This will be published on our YouTube developer channel. If you have any other thoughts, please find us in the community Community HubSpot. Com Bye.










