Is this really the version you are looking for? Kentico Xperience 8.2 Documentation is no longer updated. Use the switcher in the header to choose your product version.
Kentico EMS required
Features described on this page require the Kentico EMS license.
Kentico allows you to program your own action steps, which users can then incorporate into automation processes. You need to:
Create a new class in your Kentico web project. You can:
Set the class to inherit from:
Override the Execute() method from the base class.
public override void Execute()
{
}Write the code that you want the action to run into the Execute method's body.
Working with action parameters
You can use parameters to allow users to modify the behavior of your custom action. Users can edit the values of parameters when configuring specific instances of the action step in the workflow designer. If you want your action step to use parameters, you need to define the parameters as fields when registering the action in the system.
To access the values of parameters in your code, use the GetResolvedParameter<ParameterType> method. The method accepts the following parameters:
GetResolvedParameter<string>("MessageText", string.Empty);Once you create the class containing the required logic, you need to register the custom action:
Log in to the Kentico administration interface and open the Marketing automation application.
Switch to the Actions tab.
Click New action.
Fill in the following fields:
Click Save.
If the action has any parameters, switch to the Parameters tabs and define the form fields through which users can configure the action.
Users can now place your custom action into the automation process designer.