What’s an Action?

Single running unit in Herogi is called as an action. For example sending an email, sms or push, calling a web service. Each action can have several functionality. Herogi scenarios use actions to act on specific events.

Action Structure

Each action consist of multiple parameters which differs from action to action. Parameters are just key/value pairs. As an example you can think email action has parameters like; to, from, subject, body, content-type.


to = 
from =
subject =  Great Documentation!
body = You can learn how to use Herogi via knowledge base
content-type = html/text 

Recurring / Non-recurring Action Parameters

There are two types of action parameters, recurring and non-recurring.

Non-recurring action parameters are easy one, they can only exist once in an action. For example in case of email action there can be only one body or from.

In contrast non-recurring, recurring action parameters can be exist multiple times with different field name. For example, http post action can have headers parameter which is recurring. Then you can add several fields like content-type, Authorization

Customizing Action Parameters

Herogi comes with powerful scripting language, Freemarker. You can use it to generate custom dynamic action parameters.

Actions support loops, conditions, arithmetic operations, localization, variable substitution. To learn more about features check developer guide

Variable Substitution

With variable substitution, Herogi provides powerful customized actions like email, sms, etc. for your user. In each action context along with the functionality discussed above, Herogi brings every single event parameters and session parameters into scope.

For email action, body parameter can be written like;

     Hello ${event.username.value()},
     Welcome to <a href="">Herogi</a>

This will generate an output for a sample event along with username Jenn like;

     Hello Jenn,
     Welcome to <a href="">Herogi</a>

later on body will be rendered as html in Jenn’s email client.

Available Actions

Herogi supports different type of action groups like email, sms, utility from multiple vendors like Aws, Sendgrid, Twilio.

To see full list all of available actions check integrations.

Creating Your First Action

Action creating is really simple. Just go scenarios page and select the scenario you want to add action.

Create Action

Setting Action Parameters

After you created the action, you can set predefined action parameters with the actual values.

Add Action Parameters