Jump to content
X2Community Forums

API Call to Add/Complete Process Stages


Recommended Posts

Hi Success,

You can put user on the process/stage by using the workflows. You can have it so when a record is created it will starts them on a stage. 

-Jack

 

Hey Jack,

 

Thanks for your input.  I was originally going to reply that workflows were not powerful enough to do what I was wanting, but you gave me some ideas to have many different workflow trigger based on the value of a custom field.

 

I'll try this, but would still prefer a method to add to process stage though the API.

Link to post
Share on other sites

@jack I am not able to insert the exact data I need into the stage using the built-in workflow files and we are still not able to figure out how to add a process stage via the API.

Any help would be great since the documentation for this does not see very clear!

Link to post
Share on other sites

Just to clarify you are trying to create process stages from the api?

Yes, we are trying to create a process stage from the API.  The same process enters the contact through the API and we want to get that contact started on a process and complete the first "COLD" stage.

Link to post
Share on other sites

Hello Success,

 

I believe this is possible to do via the API. You will need to set the 'workflowId' field (this fieldname is a misnomer, it is actually the ID of the Process you would like the record to be on) and the 'stageNumber' (this is the number of the stage  of the process you would like the record to be on). Everything else should be straightforward such as the 'associationType', 'associationId' and 'createDate' fields.

Link to post
Share on other sites

Hello Success,

 

I believe this is possible to do via the API. You will need to set the 'workflowId' field (this fieldname is a misnomer, it is actually the ID of the Process you would like the record to be on) and the 'stageNumber' (this is the number of the stage  of the process you would like the record to be on). Everything else should be straightforward such as the 'associationType', 'associationId' and 'createDate' fields.

 

Yes Peter, I pretty sure it is possible, we are just not able to figure it out since the documentation is lacking.

 

I'm really looking for an example or better documentation to help on this project lingering on for over a month now.

Link to post
Share on other sites
  • 1 month later...

Hello Success,


 


You will need to update the database and the `x2_fields` table in particular. You will need to change the `readonly` attribute of `workflowId` and `stageNumber` to 0. The following should then work:



curl -H 'Content-Type: application/json' -H 'Authorization: Basic {your auth here}' --request POST --data '{"workflowId":1, "type":"workflow", "stageNumber":1}' https://{domain}/index.php/api2/{modelName}/{modelId}/Actions
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...