Scripts

From Planfix
Revision as of 09:32, 21 November 2024 by Dmitri (talk | contribs)
Jump to: navigation, search

A script is an automatically executed sequence of tasks or contacts operations that are linked to a specific event and set of conditions.

Watch on YouTube

Scripts for various objects

Planfix currently supports scripts for the following objects:

Working with scripts

Important

  • Planfix executes scripts according to their position in the process script list.
  • If an automatic script makes a change, it is not triggered again due to these changes (or subsequent changes by other scripts or recalculated fields).
Example: Script A is triggered when a comment is added and modifies the "P1" field This change triggers Script B, which changes the "P2" field, recalculating the "P3" field and triggering Script C, which adds another comment. Script A is not triggered again as it has initiated the entire change chain. Such cycles are not allowed in Planfix.
  • If a script modifies an object (e.g., a task, a contact) so that the following script's conditions are no longer met, the system doesn't execute the next script.
  • Conversely, if a script modifies an object so that the conditions for the next script are met, the next script is executed, even if these conditions were not yet fulfilled at the time of the event.
  • Changes made by a script to an object trigger the "Object Modified..." event, activating other scripts tied to this event.
  • Scripts are executed asynchronously in a separate queue. This nuance should be taken into account when designing automation processes.
Example: If you add a value of 1,000 to a task field and a script processes data tags, the script will wait in the queue. In the meantime, you update the value to 1,500. When the script is executed, it will use the latest value of 1,500. While scripts are usually executed with minimal delays, larger queues can cause slight delays.
  • A script can only create a subtask for an assignee once every 5 minutes, with any additional attempts during this period ignored to avoid loops.
  • Automatic scripts perform actions in Planfix on behalf of a specified user or robot. When tasks are created or modified by an automatic script, user access to fields is not checked.
Exception: If an automatic script opens a task creation form in the user interface to set field values, these fields are not filled in if the user does not have editing rights.

Useful links

Training materials

Automatic scripts are covered in the following Planfix Academy courses:


Go To