As far as I am aware, you can only enroll contact objects via API through the older (v2) workflows API.
For custom objects, your best bet would be to set up a custom property (i.e. "enroll_x_workflow") and a workflow based on a custom object property change.
You could then use the CRM Objects API to update the property to "Yes", for example.
I am using that older endpoint to enroll contacts in another program. I was hoping maybe there is a newer one that I am not finding that will handle custom objects. The process I am working on allows the user to select from quite a few workflows and I did not want to add a new property for each one. My other thought was to maybe try to add the objects to specific lists and use that as the trigger. Seems like overkill also though. Thanks for the reply!
Have you considered setting up a Workflow that uses a Webhook as an enrollment trigger? You can post the hs_object_id into this workflow and then have this workflow enroll into another one that does the work.
I've done something similar to have a single stream that works on multiple objects without having to go into Custom Coded Actions.
Eg,
Workflow 1: Form Submission. At the end of the form submission, it posts the company hs_object_id to a Webhook via the Webhook action
Workflow 2: Triggers on Webhook (Company Object). I can use this as a middle man workflow and push it to another workflow (that might be used for many things or has it's own criteria for enrollment) or just have stuff be done here.
Workflow X: Normal enrollment criteria. WF2 can manually enroll companies into this via the Workflow Enrollment action.
Can be a bit of a pain to set up but you wouldn't have to deal with properties change trigger.
As far as I am aware, you can only enroll contact objects via API through the older (v2) workflows API.
For custom objects, your best bet would be to set up a custom property (i.e. "enroll_x_workflow") and a workflow based on a custom object property change.
You could then use the CRM Objects API to update the property to "Yes", for example.
I am using that older endpoint to enroll contacts in another program. I was hoping maybe there is a newer one that I am not finding that will handle custom objects. The process I am working on allows the user to select from quite a few workflows and I did not want to add a new property for each one. My other thought was to maybe try to add the objects to specific lists and use that as the trigger. Seems like overkill also though. Thanks for the reply!