> How CSDocs works · CSDocs
> Every night CSDocs maps your NetSuite customizations, runs 9+ automated checks, and explains each problem in plain English inside NetSuite.
> Page: https://getcsdocs.com/how-it-works

# It reads your account every night *You see what needs fixing*

CSDocs installs a lightweight app inside NetSuite, maps your customizations every night, and runs 9+ automated checks to surface what’s broken.

[Start free trial](https://getcsdocs.com/pricing) [See each step](#tour)

## What happens each night

- ***1*It reads**

**

- ***2*It checks**

**

- ***3*It explains**

**

- ***4*You decide**

Every script, workflow, and field mapped

The nightly read maps what runs on every record, stage by stage.

**24 automations** deployed on Sales Order Create

Client**3**

- **SO Entry Helper**
- **Ship-To Validation**
- **Wholesale Line Check**

Before load**1**

- **Wholesale Credit Hold** *Sets Credit Hold Reason*

Before submit**10**

- **Apply Promo Codes**
- **SO Expedite Rules** *Sets Ship Priority*
- **Order Fraud Check**
- **Hazmat Ground Rule**
- **Marketplace Fee Calc**
- **Sales Rep Assignment**
- **Set Channel & Priority** *Sets Ship Priority*
- **SO Credit Check** *Sets Credit Hold Reason*
- **AvaTax Calculation**
- **Hold: Missing PO**
- + 4 more

After submit**9**

- **EDI 855 Ack**
- **Gift Note Cleanup** *Conditional*
- **SO Recalc Totals** *Sets Wholesale Terms*
- **Send Order to 3PL**
- **3PL Order Sync** *Conditional*
- **Storefront Sync**
- **SO Approval Routing** *Sets Wholesale Terms*
- **Large Order Alert**
- **TEMP - SO Confirm Email**
- + 4 more

Async**1**

- **3PL Retry Queue**

**3 fields written by multiple scripts:**Ship PriorityCredit Hold ReasonWholesale Terms

Derived from deployed scripts and workflows (static execution map).

Client scriptUser EventWorkflowScheduledSuiteApp

9+ automated checks every night

Each report runs one focused check and splits findings into *to fix* and *worth a look*.

**Reports**30 to fix, 7 to review.

Issues

- **Failing scripts** SO Set Ship Method, Invoice Wholesale Terms, and 5 more. **7** *5 high · 2 review*
- **Broken references** AR Aging Saved Search, Promo Code field, and 4 more. **6** *3 high · 3 review*
- **Field write conflicts** Ship Priority, Credit Hold Reason, and Wholesale Terms. **3** *conflicts*
- **Slow saves** SO Recalc Totals, SO Credit Check, and 3 more. **5** *3 high · 2 review*
- **Legacy SuiteScript** 3 scripts on SuiteScript 1.0, 13 on SuiteScript 2.0. **16** *to upgrade*

Changes & hygiene

- **Changes this week** 6 customizations added, 4 modified. **10** *changes*
- **Unused & leftover items** Copy of Nightly Inventory Sync and 9 more. **10** *items*
- **Script quality** Top issue: unhandled N/https calls. **B** *grade*
- **Customization quality** Top gap: 112 scripts missing descriptions. **B** *grade*

Every problem explained in plain English

See what’s happening, why it matters, and how to fix it, backed by the exact code and error log.

Web Sales Orders failing on save

**High priority · User Event · 212 errors in the last 7 days

What’s happening

SO Set Ship Method hardcodes shipmethod = 4127 on web orders. That shipping item was inactivated Tuesday, triggering INVALID_KEY_OR_REF on 212 saves.

Impact

Incoming web orders are rejected before reaching fulfillment or billing.

Recommended fix

Move the shipping item to a script parameter pointing to your active UPS Ground item.

Execution log

**212×**`INVALID_KEY_OR_REF`*last Nov 11*

Invalid shipmethod reference key 4127

- **Script**: **SO Set Ship Method**
- **First seen**: Nov 10
- **Last error**: Nov 11

Summary generated from execution logs and source code.

Ask follow-up questions, or generate a fix

Every answer links directly to the scripts, fields, and line numbers behind it.

Why is saving a sales order so slow?

CSDocs

**24 automations run on Sales Order save. Three account for most of the delay:**

- SO Recalc Totals calls `record.load` + `record.save` in `afterSubmit`, re-triggering the full save stack twice. `ue_so_recalc_totals.js` line 23
- SO Credit Check runs a search inside the line-item loop — 60 lines triggers 60 searches. `ue_so_credit_check.js` line 41
- AvaTax Calculation makes an external tax call on every save (managed bundle). `avatax_ue.js` line 13

**Where to start:** move the recalc logic to `beforeSubmit` to eliminate the double save, then batch the credit check query outside the line loop.

Sample data from our demo account (Larkspur Outfitters).

## Rules find the problems, AI explains them

Automated checks catch the issues. AI turns the code and logs into plain English.

- Consistent rules catch the same problems every night, without AI guesswork
- AI explains each problem in plain English and writes a note on every script, workflow, and saved search
- In the 2 quality reports, AI suggests missing descriptions, flags duplicate fields, and reviews script quality
- Use the included AI, or route everything exclusively through your own provider (Bedrock, Azure, Vertex AI, Anthropic, OpenAI, and more)

[How CSDocs uses AI](https://getcsdocs.com/security#ai)

Legacy SuiteScript

Report · Nov 11 · Upgrade to SuiteScript 2.1

**16**custom**4**in bundles

Upgrade breakdown

3 of 16 require a 1.0 rewrite.

****

**2.0 → 2.1 header update**13**

**1.0 → 2.1 rewrite**3**

SuiteScript 1.0 · rewrite · 3

- **SO Approval Routing** Uses nlapiLoadRecord and nlapiSubmitField across 5 calls on Sales Order save. *User Event · Oct 12*
- **Nightly Invoice Batch** Scheduled 1.0 script using nlapiSearchRecord (10 legacy API calls). *Scheduled · Oct 12*
- **ACH Bank File Export** Builds payment CSV via nlapiCreateFile and nlapiSubmitFile (7 calls). *Scheduled · Oct 12*

SuiteScript 2.0 · update @NApiVersion to 2.1 · 13

- **Vendor Bill Approval** No deprecated syntax found; update @NApiVersion header and test in Sandbox. *User Event · Oct 12*

A rule found these scripts, and AI wrote the explanation. Sample data from our demo account (Larkspur Outfitters).

## What CSDocs can’t see

- **External writes & live traces** CSDocs reads your NetSuite code and configuration, not live traffic. It can’t see external integrations, CSV imports, or field IDs built dynamically at runtime.
- **Business data** The nightly read skips transactions and customer, vendor, and employee records. On Pro, Ask can query live records through your NetSuite login without storing them.
- **Locked vendor bundles** Locked SuiteApp source code can’t be read. Findings tied to a managed bundle are labeled so you know only the vendor can change them.
- **Incomplete reads & verification** If a nightly read is cut short, CSDocs flags it so unread items aren’t treated as deleted. Every finding links straight to the source code and logs so you can check it yourself.

Want to see what connecting takes? [Read the setup guide](https://getcsdocs.com/setup)
