If all filters are passed rule will start to execute it’s actions. Actions are defined in Then section of UI. Any amount of actions can be defined for rule.

966

Next type of actions are available:

  • Update Entity. Available for modified entity source.
  • Create Entity. Available for all sources.
  • Create Entity and add as Relation. Available for modified entity source.
  • Move Entity to State. Available for modified entity source.
  • Add comment. Available for modified entity source.
  • Execute JavaScript function. Available for all sources.
  • Send HTTP request. Available for all sources.

When using Update entity, Move Entity To State and add comment actions user also can select related entity to perform these actions:

772

Update entity

Update entity action allows to perform modification on target or related entities. User needs to choose field and set value to this field. Any number of fields can be chosen. To set value of fields both constant values and values from referenced fields from modified entity can be used.

832

Create entity

In Create Entity action user needs to choose type of entity to create and provide values for new entity fields. Any number of fields can be chosen. To set values of fields both constant values and values from referenced fields from modified entity can be used.

457

Create entity and add as relation

Create Entity as relation is similar to Create Entity action except new entity will become relation to target entity automatically. User can select direction and type of relation:

839

Move entity to state

In Move entity to state action user should select type of state, modified or related entity should be moved to.

498

Add comment

In Add comment action user can define template for comment that will be added to modified or related entity by rule. Fields of modified entity can be accessed in double curly brackets {{}}.

924

Execute JavaScript function

Execute JavaScript function action is available both for modified entity and incoming web hook source.
In this action user writes body of JavaScript function that should return array of commands that describe modifications in target process:

931

At the moment maximum count of modification commands that can be done by Javascript action is 50.
In JavaScript actions script has access to read only targetprocess api/v2 and information about change that triggered the rule including original values of changed fields. For more details see our Documentation.

Send http request

In send http request action user has ability to input url and body template of request to send on rule execution. Using double curly brackets user can access fields of modified entity and related entities.

930

If a field (like Description or a text custom field) is sent to an endpoint which expects JSON payload (like Slack or Zapier hook), sent value may contain critical characters for JSON format. In that case the function ToJsonText need to be applied for each field, that can contain characters that may break JSON:

{
"text": "New comment: {{ToJsonText(Description)}}",
"icon_emoji": ":bee:",
"username": "Targetprocess",
"channel": "#slack-test"
}