Update trigger

❗️

Webhook plugin is deprecated.

Please use the Automation Rules feature instead, unless you're on the old Targetprocess version (older than Targetprocess v3.13.0) or on a local On-Site installations.

📘

Requires Targetprocess 3.8.1+

When update is triggered

Update is triggered only when one of the entity fields has been created or changed.

If some field not from this list was changed, or there was an update of an item in the nested collection for the entity (e.g. comment is removed, or a new assignment is added), update action will not be triggered. However, some items such as Comments, Assignments and Role Efforts are available as entities.

How to subscribe to particular field update

If you're interested in one particular field (e.g. progress) you can subscribe to this field changes by using one of the following filters:

ChangedFields.Contains("Progress")
Progress != Previous.Progress

🚧

ChangedFields and Previous handle CREATE events differently

ChangedFields collection helps to handle UPDATE events only. In CREATE events this collection is always empty and does not list any fields. A field is not changing during creation of an entity.
Previous entity helps to handle both CREATE and UPDATE events. Previous value of the field is always blank when an entity is created.

How to access previous values

You can access previous values by using Previous prefix.

  • In filters: Previous.Effort
  • In templates: {{Previous.Effort}}

An example of using previous values with Slack integration is available here.

How to use ChangedFields collection

In a filter you can check if a certain field is present in ChangedFields collection: ChangedFields.Contains("Progress")

In template there is no access to ChangedFields collection.
However, if you're not using a template at all, you will get all the objects in response (Entity, OldEntity, ChangedFields, Author, Modification):

246

Use case: entity state changed

The following filters help to subscribe for "Entity State changed" event:

ChangedFields.Contains("EntityStateName") and Previous.EntityStateName == "FromStateName"
EntityStateName != Previous.EntityStateName and Previous.EntityStateName == "FromStateName"