Skip to main content

talonic_process_script_draft

Write a script for a script step from what it should do, in plain words. Saves nothing: returns the script, its hash and an explanation; put it on the step with talonic_process_change or the draft, then talonic_process_script_test. The step must already name the fields it writes. Uses credits.

Availability

Listed when your workspace role has the Process Plane view permission. Changing, publishing and signing are checked again on every call against your role in the process.

Behaviour and cost

  • Not read-only. It can add to or change workspace data.

Parameters

ParameterTypeDescription
process_id *string—
step_id *string—
purpose *stringWhat the script should do, in plain words

Example

Example
// talonic_process_script_draft({ "process_id": "1111…", "step_id": "s_script", "purpose": "Upper-case the vendor name" })
{ "lua": "record.set(\"vendor\", string.upper(record.get(\"vendor\") or \"\"))", "hash": "9f2c…", "explanation": "…" }

Errors

A failed call comes back as a tool error with the HTTP status and a message that says what to change. Troubleshooting lists the common ones.

Frequently asked questions

Is the script saved on the step?+
No. It is returned for you to put on the step.