Skip to content

JavaScript functions

Add your own logic in JavaScript, running on your PC

Write functions that reshape reports, combine several reads into one answer or call your other systems — or have the AI agent (Max; not available yet) draft them. Scripts are stored and run in the AI Zeny Windows app on your PC, never in AI Zeny Cloud.

Start Free Trial

Free trial · no card or payment details · Pro-level features, without the AI Agent

What it does

  • Reshapes the answer of a standard operation into the fields and format your system expects.
  • Combines several reads — operations, saved queries, other scripts — into one named answer.
  • Calls your other systems when you allow it, which is how integrations and reminders are built.
  • Accepts drafts from the AI agent (Max; not available yet): describe what you need, then review and test the draft.

What you need

  • An enrolled PC with the AI Zeny Windows app; scripts are written, stored and run there.
  • Someone comfortable reading JavaScript to review each script, including drafts from the AI agent.

Plus reads your BUSY data, with scripting and Google Sheets; Pro adds accounting writes; Max adds the AI Agent, which is not available yet. Go, below Plus, includes none of these. Every plan, the free trial included, has the end-to-end encrypted BUSY backup. Local mode and Cloud mode are not tied to a plan. The free trial gives Pro-level features, without the AI Agent.

From draft to active script

  1. Step 1: Write or draft

    Write the function yourself, or ask the AI agent (Max; not available yet) to draft it. A new script starts inactive.
  2. Step 2: Preview and test

    Run the inactive script against your data and compare the result with the original answer. These runs are real.
  3. Step 3: You activate it

    Only you can activate a script. The AI agent never does.
  4. Step 4: Callable through the API

    Once active, the script can be called through the API. Deactivate it and API calls stop.

Step 1 of 4: Write or draft

You test and you activate

A script starts inactive. Inactive scripts still run when you preview or test them against your data; only API calls need the script to be activated, and only you activate it.

Preview runs are real

Previews and tests execute the script for real, with whatever access you gave it — including calls to other systems if you allowed them. They are not sandboxed and are not guaranteed to be free of side effects. Check what a script does before you run it.

Scripts run only in the Windows app on your PC — also when you use Cloud mode. AI Zeny Cloud stores and runs none of them.

Limits and responsibilities

  • You are responsible for what your scripts do and for their compliance.
  • Review AI-drafted scripts as carefully as your own before testing or activating them.

Sample

Sample script (illustrative) (javascript)
// Reshape a customer list before it reaches your system.
function main(input) {
  return input.data.map((customer) => ({
    code: customer.customer_id,
    name: customer.customer_name,
    closing: customer.closing_balance,
  }));
}

An illustrative example, not a customer’s script. Field names depend on the operation you reshape.

Start Free Trial

Free trial · no card or payment details · Pro-level features, without the AI Agent