Scripts: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 5: Line 5:
|description=scripts
|description=scripts
}}
}}
A script is an automatically executed sequence of [[tasks]] or [[contacts]] operations that are linked to a specific event and set of conditions.
A '''script''' is an automatically executed sequence of [[Objects|tasks]] or [[contacts]] operations that are linked to a specific event and set of conditions.
Scripts are configured for [[Processes | a process]] in the '''Account management / Processes / Desired process section'''


https://pic.planfix.ru/pf/ow/DZdvUU.png
<youtube>https://youtu.be/HfqC6A1WCq4=l3OgxC3Oi82Lgyhp</youtube>
 
[https://youtu.be/HfqC6A1WCq4=l3OgxC3Oi82Lgyhp Watch on YouTube]
==Scripts for various objects==
==Scripts for various objects==
Planfix currently supports scripts for the following objects:
Planfix currently supports scripts for the following objects:
*[[Scripts for tasks]]
*[[Automatic object scenarios|Scripts for Objects(tasks)]]
*[[Scripts for contacts]]
*[[Scripts for contacts]]
==Working with scripts==
==Working with scripts==
Line 25: Line 25:
*[[Custom scripting actions]]
*[[Custom scripting actions]]
*[[How the number of automatic operations is calculated]]
*[[How the number of automatic operations is calculated]]
*[[Custom scripting actions]]
==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==
*[[Adding_your_own_Telegram_commands|Custom Planfix management commands can be added via messenger, chat, or email.]]
==Training materials==
Automatic scripts are covered in the following '''Planfix Academy''' courses:
*[https://academy.planfix.com/auth/sign/in Basic Course]





Latest revision as of 09:33, 21 November 2024

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