Success 4 Posted August 10, 2020 Report Share Posted August 10, 2020 We are trying to add contacts from our lead generation process into X2CRM using the API and would like to start them on a process/stage but we are not sure how to do this using the API.Is this part of the Actions?Thanks in advance. Quote Link to post Share on other sites
jack 7 Posted August 10, 2020 Report Share Posted August 10, 2020 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 Quote Link to post Share on other sites
Success 4 Posted August 11, 2020 Author Report Share Posted August 11, 2020 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. Quote Link to post Share on other sites
Success 4 Posted August 13, 2020 Author Report Share Posted August 13, 2020 @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! Quote Link to post Share on other sites
jack 7 Posted August 13, 2020 Report Share Posted August 13, 2020 Just to clarify you are trying to create process stages from the api? Quote Link to post Share on other sites
Success 4 Posted August 17, 2020 Author Report Share Posted August 17, 2020 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. Quote Link to post Share on other sites
jack 7 Posted August 21, 2020 Report Share Posted August 21, 2020 Is this what you are describinghttps://imgur.com/a/PfCuKHB Quote Link to post Share on other sites
Success 4 Posted August 25, 2020 Author Report Share Posted August 25, 2020 No it is not.... It is adding those same process stages with the API. Not in the Workflow section...I tried to be pretty clear this is using the API on my post 3 weeks ago from 8/10.Here is the very unclear documentation;http://wiki.x2crm.com/wiki/REST_API_Reference#Working_With_Associated_Actions Quote Link to post Share on other sites
X2Peter 42 Posted August 25, 2020 Report Share Posted August 25, 2020 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. Quote Link to post Share on other sites
Success 4 Posted August 28, 2020 Author Report Share Posted August 28, 2020 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. Quote Link to post Share on other sites
X2Peter 42 Posted September 29, 2020 Report Share Posted September 29, 2020 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.