CData Python Connector for HubSpot

Build 25.0.9454

CreateCustomProperty

Adds a custom property to a HubSpot object, enhancing CRM data flexibility.

Execute

When you need to create a new Property of type Enumeration you need to define its options (required).

There are two ways to do this. The first way is to feed all the json aggregate of the options directly to the options input, as shown below:

EXECUTE CreateCustomProperty
        TableName = 'DevObject',
        PropertyName = 'TestEnumeration',
        PropertyLabel = 'Test Enumeration',
        PropertyGroupName = 'group1',
        PropertyType = 'enumeration',
        PropertyFieldType = 'radio',
        Options = '[
                {
                    \"label\": \"Model-GT\",
                    \"value\": \"GT\",
                    \"description\": \"GT Model\",
                    \"displayOrder\": \"1\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-AF\",
                    \"value\": \"AF\",
                    \"description\": \"AF Model\",
                    \"displayOrder\": \"2\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-Z\",
                    \"value\": \"Z\",
                    \"description\": \"Z Model\",
                    \"displayOrder\": \"3\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-0\",
                    \"value\": \"0\",
                    \"description\": \"0 Model\",
                    \"displayOrder\": \"4\",
                    \"hidden\": \"false\"
                }
            ]'

The second way is to make use of the Driver #TEMP tables for the aggregate value. To do that you need to execute the following:

INSERT INTO PropertyOptions#Temp (OptionLabel, OptionValue, OptionDescription, OptionDisplayOrder, OptionHidden) VALUES ('TRUE', 'true', 'Yes', 1, false)

INSERT INTO PropertyOptions#Temp (OptionLabel, OptionValue, OptionDescription, OptionDisplayOrder, OptionHidden) VALUES ('False', 'false', 'No', 2, false)

After creating the temporary table with the options, we can execute the stored procedure as shown below:

EXECUTE CreateCustomProperty
        TableName = 'Contacts',
        PropertyName = 'TestEnumeration',
        PropertyLabel = 'Test Enumeration',
        PropertyGroupName = 'contactinfomation',
        PropertyType = 'enumeration',
        PropertyFieldType = 'radio',
        Options = 'PropertyOptions#Temp'

PropertyOptions temporary table schema info:

Column NameTypeRequiredDescription
OptionLabel string true Human-readable label for an enumerated option. Required if PropertyFieldType is set to an option-based input like select or radio.
OptionValue string true Internal value corresponding to the enumerated label. This value is used when setting the property through the API.
OptionDescription string false Optional description for the enumerated option. Appears as help text to clarify the option's meaning or use.
OptionDisplayOrder integer false Order in which this option appears in the UI. Lower positive integers appear first; -1 causes the option to appear last.
OptionHidden boolean false Specifies whether the option should be hidden from the HubSpot interface. Hidden options can still be used via API.

Input

Name Type Description
ObjectFullyQualifiedName String Fully qualified name of the object where the custom property will be created. Required if TableName is not provided.
TableName String Exposed table name of the object where the property should be added. Required if ObjectFullyQualifiedName is not provided.
PropertyName String Internal name of the custom property. This value is used in API requests and must be unique within the object.
PropertyLabel String User-friendly label for the property, shown in the HubSpot interface wherever this property appears.
PropertyGroupName String Label for the group where this property will be organized in the HubSpot UI. Helps categorize properties logically.
PropertyType String Data type of the property, such as string, number, date, datetime, or enumeration. Determines how values are stored and validated.
PropertyFieldType String Defines how the property is rendered in the HubSpot UI. Supported field types include text, date picker, select dropdown, radio buttons, and checkboxes.
PropertyDescription String Optional help text shown to users when interacting with the property in the UI. Provides context or instructions.
PropertyDisplayOrder Integer Controls the position of the property within its group in the UI. Lower values are shown first; -1 places the property after all others.
PropertyHasUniqueValue Boolean Indicates whether the value of this property must be unique across all records of the object. Cannot be changed once enabled.
PropertyHidden Boolean Indicates whether the property is hidden from users in the HubSpot interface, but still available for automation or API usage.
FormField Boolean Indicates whether this property is available for inclusion in HubSpot forms, enabling data collection through public forms.
ObjectType String Optional classification of the object type this property belongs to, such as contact, company, or deal.
Options String Required only if PropertyType is set to enumeration. The input values should be an temporary table (#TEMP).

Result Set Columns

Name Type Description
Success Boolean Specifies whether the property was created successfully through the stored procedure.
PropertyName String Internal name of the custom property that was created.
PropertyLabel String User-facing label of the newly created property, displayed in the UI.
ErrorCode String Code representing the type of error that occurred, if the procedure did not complete successfully.
ErrorMessage String Detailed message describing the issue encountered during the creation of the custom property.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454