• Live group demo of Marketing Hub + Data Agent

    Standardize reporting, reduce manual work, and introduce AI without cleanup

    Join us on March 12
  • Ready to build your local HubSpot community?

    HUG leaders host events, spark connections, and create spaces where people learn and grow together.

    Become a HUG Leader

STATUS property always appears as Invalid property

amit-hs
Participant

CRM Custom Card (part of CRM Extensions).

 

Following this documentation (here: https://legacydocs.hubspot.com/docs/methods/crm-extensions/property-types) for defining a "STATUS" type custom property, this is the resulting JSON being sent to HubSpot CRM on a custom card request:

 

 

{

  "results": [
    {
      "objectId": "5233656208",
      "title": "A Title",
      "link": "https://app.hubspot.com/contacts/<app_id>/deal/<deal_id>",
      "completion": "complete",
      "properties": [
         {
           "label": "Completion",
           "name": "completion",
           "dataType": "STATUS",
           "options": [
              {
                "name": "incomplete",
                "label": "In progress",
                "type": "SUCCESS"
              },
              {
                "name": "complete",
                "label": "Complete",
                "type": "DEFAULT"
             }
          ]
       },
  ]
  "actions": [...],
  etc.
}

 

 

The JSON result appears correctly formed as per the documentation. However, the custom card always displays "Invalid property" despite setting "completion" to a valid option value ("complete").

 

Screen Shot 2021-09-07 at 10.38.58 AM.png

Any idea what I'm doing wrong?

0 Upvotes
1 Accepted solution
Sean_Matthews
Solution
Participant

@dennisedson and @amit-hs  Yup, this is the confusing part of the docs and how the HubSpot team built out the APIs in question.

The docs you're pointing to are the API to manage the properties on the OAuth App itself... i.e. you can programmatically manage your OAuth App, CRM Extensions, Timeline Events, etc, all via API requests should you so desire.

However, that's not commonly the case. The object definition you're looking at actually correspond with the GUI inside the Developer portal where you can (and should) define your CRM Extension and its properties.

Here's a Gif to show how to manage it... apologies for the cutoff but you should get the gist.

Once that's configured in the UI, then you can pass in the value you want the frontend (the CRM Card) to display... so your data in response to the GET request from HS frontend should be something like:

 

{
"results": [
    {
      "objectId": "5233656208",
      "title": "A Title",
      "link": "https://app.hubspot.com/contacts/<app_id>/deal/<deal_id>",
      "completion": "complete",
    }
  ]
  "actions": [...],
  etc.
}

 

 

The other thing that's confusing about the docs/implementation is that the platform provides two ways to pass in/reference properties. If you have predefined the properties (either via the GUI like I show above, or via the API) then you can just reference the property by name inside the object (i.e. exactly what you're doing inside that object with `completion: 'complete'`. The platform also lets you define properties on the fly, but only a subset of property types. That's what the `properties` array is intended to do... allows you to pass in ad hoc properties for display. That's what they mean by 

"Properties may also be specified on a per-object basis. This is handy for data points unique to a specific object. These properties may be defined in the response to the data fetch request, in the properties list on a specific Sales Object."

in the docs you linked to.

Hope that helps!

Best, 
~Sean

View solution in original post

3 Replies 3
Sean_Matthews
Solution
Participant

@dennisedson and @amit-hs  Yup, this is the confusing part of the docs and how the HubSpot team built out the APIs in question.

The docs you're pointing to are the API to manage the properties on the OAuth App itself... i.e. you can programmatically manage your OAuth App, CRM Extensions, Timeline Events, etc, all via API requests should you so desire.

However, that's not commonly the case. The object definition you're looking at actually correspond with the GUI inside the Developer portal where you can (and should) define your CRM Extension and its properties.

Here's a Gif to show how to manage it... apologies for the cutoff but you should get the gist.

Once that's configured in the UI, then you can pass in the value you want the frontend (the CRM Card) to display... so your data in response to the GET request from HS frontend should be something like:

 

{
"results": [
    {
      "objectId": "5233656208",
      "title": "A Title",
      "link": "https://app.hubspot.com/contacts/<app_id>/deal/<deal_id>",
      "completion": "complete",
    }
  ]
  "actions": [...],
  etc.
}

 

 

The other thing that's confusing about the docs/implementation is that the platform provides two ways to pass in/reference properties. If you have predefined the properties (either via the GUI like I show above, or via the API) then you can just reference the property by name inside the object (i.e. exactly what you're doing inside that object with `completion: 'complete'`. The platform also lets you define properties on the fly, but only a subset of property types. That's what the `properties` array is intended to do... allows you to pass in ad hoc properties for display. That's what they mean by 

"Properties may also be specified on a per-object basis. This is handy for data points unique to a specific object. These properties may be defined in the response to the data fetch request, in the properties list on a specific Sales Object."

in the docs you linked to.

Hope that helps!

Best, 
~Sean

amit-hs
Participant

Hey Sean, thanks for the clarity!

 

This line crystalized it for me:

The platform also lets you define properties on the fly, but only a subset of property types.

I suppose this is why STRING values can be defined on-the-fly while STATUS values require pre-configuration via the app admin interface.

dennisedson
Community Manager
Community Manager

@Sean_Matthews happen to see a flaw here?


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

0 Upvotes