Checkbox in Workflows Extensions

Top Contributor

When creating a Workflows extension definition, there is support for data entry in the form of DATE, NUMBER, SELECT, TEXT, TEXTAREA, OWNER.  I need to supply a checkbox.  How can that be done?

Reply
0 Upvotes
1 Reply 1
Highlighted
HubSpot Moderator

Hi @Renegade,

 

The only field types available for workflow extension definitions are the ones you listed. But you might be able to accomplish what you're trying to do. If you create a SELECT field, when you define the field values you can make it an OBJECT_PROPERTY type. Then in your account properties you could create a Single checkbox type property for that object type, and select that in the workflow.

 

So for example let's say you have a Contact-based workflow. Create a new contact property. In our example I've named mine trueorfalse. When you send your POST request to create the definition, its fieldMetadata might look something like this:

 

"fieldMetadata": [
    {
        "label": "TrueOrFalse",
        "key": "trueorfalse",
        "fieldType": "SELECT",
        "values": [
            {
                "type": "OBJECT_PROPERTY"
            }
        ]
    }
]

Then the objects that move through the workflow will have their value for that property included in the payload. It will be true for "Yes" and false for "No".

 

If on the other hand you need a static value, could you just use a TEXT type field and manually supply a true or false value?

 

Leland Scanlan

HubSpot Developer Support
Reply
0 Upvotes