Dynamic pages using Custom Objects
While our example of Dynamic Pages using HubDB used a single module and the HubDB tables data, custom objects allow significant more complexity, direct interaction with the CRM where needed and allowed, and the use of associations. Contrary to HubDB where the database is publicly accessible, the custom objects are stored in the CRM with it's full security features.
And while custom objects in the CRM are powerful, the ability to create dynamic pages based on that gives it super-powers.
Just imagine this example:
We will host a large international event. we rented a conference center, and are selling booths.
In our CRM we have companies like Coca Cola and PepsiCo who may rent a booth for their brands like Fanta (Coca Cola) and Lipton (PepsiCo).
So we create custom objects (think a table in a spreadsheet) for the host and a different table for the booths we offer.
In a deal we should connect the host and the booth. But that already gives us all the information we need to get them on our website! So instead of needing to call our developer, telling them to update everything for every single deal that closed, we have a simpler solution: Dynamic pages. Or at least: that is what HubSpot calls it. We actually create dynamic modules that can be inserted on pages like this.
How the demo page works:
So we have created two custom objects. Learn more about Custom Objects at https://knowledge.hubspot.com/crm-setup/create-custom-objects.
The first one is for the location. We have included all the information for every available booth in this table. Size, price, location description and as the unique ID the location name. We also included an X and Y coordinate in the amount of pixels from the top left that the center of the booth is on a floorplan. That will make sense in just a bit. All booth information is completely filled in before we start selling them. The booths object can be associated to deals, and hosts, which is our next custom object.
Hosts contains the details of the 'brand' (not company) that uses the booth. This should have an association to the right contact person during the execution, the brandname, logo, description and likely a unique URL for our event. The brand should be associated to the location, contact, company and deal. One could argue that the company association is not necessary as that is also set in the deal.
And then we have the deals itself. This is very standard, and that is the magic: When a sales rep creates a deal, associates the location, creates the host (from within the deal) and the deal is closed-won, we have a module that will include it in a list.
The logics is short and simple, and is quite an easy query in GraphQL: Get me all hosts that are associated to a deal that is closed-won and are associated to a location. Show that as a list of links to a new dynamic page. The styling could have been fancier, but this is the module:
Here is a list of the exhibitors:
And that is all that the first module does. For the dynamic pages itself we created a second module that is slightly more graphical, but still quite simple in it's makeup. Click on one of the links to be taken to that page.