How to manual run automation in Form, when use code to store the submission?
I've create Form and Automation link to that form, but it only work when I use Form widget, but I want to run the Automation when call service to store the mission, is it possible?
Environment
Xperience by Kentico version: 30.6.0
.NET version: 9
Answers
Hello hieuden0,
In Xperience by Kentico, automation processes are only triggered by supported system events—mainly form submissions or logged activities. There is no official API for starting automation processes manually via custom code. If you save form submissions by custom code, you must log an activity such as "form submitted" (using the supported activity framework) and set up your automation process to trigger on that activity. This ensures the process runs as expected.
Direct API invocation to start automations is not supported. Refer this API documentations https://api-reference.kentico.com/api/CMS.html notes.
We can request this API for future use case https://roadmap.kentico.com/tabs/5-release
Thanks for your information,
about this "If you save form submissions by custom code, you must log an activity such as "form submitted" (using the supported activity framework) and set up your automation process to trigger on that activity", I've research about that but don't see any article about that, could you help give me example or any blog about that?
Thanks
Hi hieuden0,
You can use an event BizFormItemEvents
to apply your custom logic for form activities. Check the event handler's official documentation.
For more information, take a look at the Kentico Community Portal for examples on how to use global event handlers
Note: Set up your automation process to trigger on that activity, which means you need to write the custom logic to perform the expected outcomes. There are no built-in API providers for automations in xbyk.
Thanks.
To answer this question, you have to login first.