Global and local scripts
You can choose to use global scripts or write a local script specific to the playbook.
A global script is available to every playbook and also included in the Scripts tab in Customization Settings. The playbook library organizes all global scripts by object type.
A local script is available to this playbook only. The playbook library organizes all local scripts in one category called Local.
Global scripts allow for code reuse between playbooks.
A local script is typically used when the code logic only makes sense for the current playbook and not other playbooks. A common situation where a local script is useful is processing the results from a function to translate it for use in a function downstream or save the processed results into incident data.
Scripts use the playbook keyword to access function results and other data available in the current instance of the playbook. For details on the playbook keywords, see Playbook operations.