> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erstan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security & write safety

> How Erstan keeps your NetSuite data safe and keeps you in control of every change.

Erstan puts AI agents to work on your NetSuite finance operations — and it is built so that those agents can only ever do what you allow. Every read happens with your own NetSuite permissions, and every write pauses for a person unless you have explicitly chosen otherwise.

This page explains the four controls that keep you in charge: per-user NetSuite authorization, write safety, the one-workspace-per-environment binding, and roles plus the audit trail.

## Agents act as you, never above you

Erstan uses **per-user authorization** for NetSuite. An Owner or Admin sets up the shared **Workspace OAuth connection** once, and then every member individually authorizes their own NetSuite user before any agent can act on their behalf.

When an agent calls a NetSuite tool, it calls it **as you** — using your NetSuite user, your role, and your permissions. An agent can never see or change anything your own NetSuite login could not.

<Info>
  Erstan steers you toward a **non-Administrator** NetSuite role when you authorize. The connect dialog says "Choose a non-Administrator role" precisely so that agents inherit the least privilege needed for finance work, not full admin rights.
</Info>

<Steps>
  <Step title="A workspace connection is established once">
    An Owner or Admin connects NetSuite for the workspace using the **Erstan app** (recommended) or **Your own setup**. This stores the OAuth client — no member re-enters connection details.
  </Step>

  <Step title="You authorize your own NetSuite user">
    From the NetSuite connector's **Authorizations** tab (or an **Authorization required** card in chat), you sign in and approve access in a NetSuite popup. Agents now act with your role.
  </Step>

  <Step title="You can revoke just yourself, any time">
    Use **Disconnect your NetSuite user** to revoke your personal authorization without affecting the workspace connection or anyone else.
  </Step>
</Steps>

Owners and Admins can see who has authorized at any time. The **Authorizations** roster lists each member's authorization status, role, and connected, expires, and last-used times, with an "N/N members authorized" summary.

<Card title="Authorizing your NetSuite user" icon="user-check" href="/connectors/netsuite-authorize">
  Step-by-step on per-user authorization and the members roster.
</Card>

## Write safety: nothing changes without permission

Reading NetSuite data is safe by default. **Writing** to NetSuite — creating a record, editing a transaction, sending a payment — is treated differently, and you control it at two levels.

### Per-tool write policy

On the NetSuite connector's **Tools** tab, each tool has a **write policy**:

| Policy               | What it means                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------- |
| **Allow**            | The agent may run the action without pausing.                                                            |
| **Require approval** | The agent pauses and a person must approve before the action runs (the default for write-capable tools). |
| **Deny**             | The agent can never run the action.                                                                      |

<Warning>
  Setting a write-capable NetSuite tool to **Allow** lets agents create and modify ERP records without a person reviewing each change first. Reserve **Allow** for low-risk, read-style actions, and keep anything that posts transactions, sends payments, or edits records on **Require approval**.
</Warning>

### Human-in-the-loop approvals

When a tool requires approval, the agent stops and shows an **approval card**. You review the action — often with a before/after preview of the change — and choose **Run action** or **Don't run**. Those authenticated controls are the only way to decide the pending approval; chat replies remain feedback and do not resume it.

In a built agent, the **AI Approval** step does the same thing as a deliberate human-in-the-loop checkpoint in the run.

<Card title="Approving and rejecting AI actions" icon="circle-check" href="/chat/approvals">
  How approval cards work, plus the Queued and Authorization Required cards.
</Card>

### Auto-approve writes — use with care

You can turn on **Auto-approve writes** to let an agent skip the approval prompt for a session. This is convenient for trusted, repetitive work, but it removes the per-action checkpoint.

<Warning>
  **Auto-approve writes** lets an agent commit changes to NetSuite without pausing for you. Only enable it when you trust the agent and the task, and prefer to leave it off for anything that posts transactions or moves money. A tool set to **Deny** is still blocked even with auto-approve on.
</Warning>

## One workspace, one NetSuite environment

A **workspace** is bound to a single NetSuite environment — one production account or one sandbox. This keeps a clear line between what an agent can touch and which company's data it is grounded in.

* Connecting NetSuite ties the workspace to that specific NetSuite account (its realm). Work in one workspace never reaches into another company's data.
* Production and sandbox are kept separate. Many teams run a **sandbox** workspace to build and test agents, and a **production** workspace for live finance work.
* You can belong to several workspaces and switch between them; each carries its own connection, members, and content.

<Info>
  Need to work against both production and a sandbox? Use separate workspaces — one per environment — rather than reconnecting a single workspace back and forth.
</Info>

## Roles, permissions, and the audit trail

Access inside a workspace is governed by three roles:

| Role       | Typical scope                                                      |
| ---------- | ------------------------------------------------------------------ |
| **Owner**  | Full control of the workspace, billing, and connections.           |
| **Admin**  | Manages people, connectors, write policies, and published content. |
| **Member** | Uses chat, runs agents, and works on tasks within their teams.     |

Managing the workspace NetSuite connection, setting tool write policies, and changing authorizations require **Owner** or **Admin**. Members see these controls as read-only where they apply.

Every agent run is tracked. A run produces a step-by-step **trace** with live status, and writes that needed approval record who approved them. From a run you can open **Audit in Erstan** to follow what happened, and Admins can review workspace activity in the audit log.

<Card title="Audit log and usage" icon="scroll-text" href="/admin/audit-usage">
  Review the workspace audit trail and keep an eye on usage and cost.
</Card>

## How the pieces fit together

<AccordionGroup>
  <Accordion title="Can an agent do something I can't do in NetSuite?">
    No. Agents call NetSuite as your authorized user, so your NetSuite role and permissions are the ceiling. If your login cannot see or change a record, neither can an agent acting as you.
  </Accordion>

  <Accordion title="What stops an agent from writing to NetSuite on its own?">
    Write-capable tools default to **Require approval**, so the agent pauses for a person. An Admin can change a tool to **Allow** or **Deny**, and a user can turn on **Auto-approve writes** — both are deliberate choices, and **Deny** always wins.
  </Accordion>

  <Accordion title="Who can change the connection or write policies?">
    Only Owners and Admins. Setting up the workspace NetSuite connection, editing per-tool write policy, and managing authorizations all require the right role.
  </Accordion>

  <Accordion title="How do I revoke access?">
    Any member can run **Disconnect your NetSuite user** to revoke just their own authorization. Owners and Admins can disconnect the workspace connection, which removes access for everyone.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Managing NetSuite: tools & write policy" icon="sliders-horizontal" href="/connectors/netsuite-manage">
    Set which tools agents can use and which actions need approval.
  </Card>

  <Card title="Authorizing your NetSuite user" icon="user-check" href="/connectors/netsuite-authorize">
    Authorize your own NetSuite user and review the members roster.
  </Card>

  <Card title="Approving and rejecting AI actions" icon="circle-check" href="/chat/approvals">
    Review write actions before they run, and decide when to auto-approve.
  </Card>

  <Card title="Workspaces and people" icon="users" href="/admin/workspaces-people">
    Manage roles, members, and the people in your workspace.
  </Card>
</CardGroup>
