How do I use the REST API to connect a case to a workflow?

Hello,

I am trying to create a new case using the REST API, and I want to connect a particular workflow to it. Simply setting Case_WorkflowID to the suspected workflow id doesn't seem to work.Do I have to create a new workflow instance? If so, how? 

Thanks,

N.

Parents
  • 0

    Hiya

    It is going to be a little hard to attached a new Case directly to a workflow using the REST API.

    We still need to extend the REST API services to cover Workflow Control.  The problem for the REST API is pretty much the same as we face for the SOAP webservices (+) Workflow and Web Services - Sage CRM Hints, Tips and Tricks - Sage CRM - Sage City Community

    The essential problem is that the link between workflow and an entity is done via the workflowinstance table.  The field case_workflowid is a foreign key value pointing to a record in the workflowinstance table that is an child of the workflow.

    You would need to create the case record, then create a workflowinstance record, linked to the target workflow to be followed and then update the case record with the workflowinstance id.  

Reply
  • 0

    Hiya

    It is going to be a little hard to attached a new Case directly to a workflow using the REST API.

    We still need to extend the REST API services to cover Workflow Control.  The problem for the REST API is pretty much the same as we face for the SOAP webservices (+) Workflow and Web Services - Sage CRM Hints, Tips and Tricks - Sage CRM - Sage City Community

    The essential problem is that the link between workflow and an entity is done via the workflowinstance table.  The field case_workflowid is a foreign key value pointing to a record in the workflowinstance table that is an child of the workflow.

    You would need to create the case record, then create a workflowinstance record, linked to the target workflow to be followed and then update the case record with the workflowinstance id.  

Children