This skill points you to Kentico's automation-customization documentation. Use it to implement a custom automation process condition.
Pieces of a custom condition
- Condition class – inherits
AutomationCondition(no configuration) orAutomationCondition<TProperties>(marketer-configurable); implements the logic inEvaluate, which returnstruefor the true branch andfalsefor the false branch. - Properties class – implements
IAutomationConditionProperties; public properties annotated with admin UI form components define the configuration dialog. - Registration – the
RegisterAutomationConditionassembly attribute (identifier, display name, icon, description) makes the condition appear in the Automation Builder. - Runtime context –
AutomationProcessContextgives access to the processed contact, the process, and trigger data. - Process data –
IAutomationProcessDataimplementations carry typed data from earlier steps; a condition reads that data, it never writes it.
How to use
- Read
references/docs.mdand fetch the docs pages listed there.
Gotcha
- Keep
Evaluateread-only and idempotent — a condition can be re-evaluated for the same contact, so side effects belong in an action. - Both an unhandled exception and the two-minute timeout resolve the condition to
false, indistinguishable from a genuine no — handle the failures you can insideEvaluate, log them, and return a deliberate result. - Form-component and validation attributes come from the
Kentico.Xperience.Admin.*.FormAnnotationsnamespaces — never fromKentico.Forms.Web.Mvc, an obsolete Form Builder namespace with matching class names. - Use
ILogger<T>for logging.EventLogServiceis obsolete — don't use it.