# System Fields

System Fields are default fields available in the Straatos platform and in most cases are pre-filled from the System.

System Fields can be used to:

* Route documents with an exclusive gateway.
* Used in scripts to read or assign values to the System Fields.
* Add values in Process Steps, for example set the Scan Operator as the email recipient.

The following section explains the different System Fields and how they can be used, including some scripting examples.

### \_documentId

* When a document is created, a unique numeric ID is generated. The variable \_documentId contains this ID. \_documentId is a read only variable.

***

### userId

The variable \_userId is used by Web Validation to assign a document to a specific user. For more information please see.<br>

* Assign Document to User for Web Validation.

***

### \_errorMessage

The variable \_errorMessage is used to store details about errors that arise in different modules, such as the Service Task.

For instance, it records issues when the extraction module fails to process documents that haven't undergone OCR.

Additionally, this variable can be set in a Script Task to indicate any problems encountered, for example:

```javascript
_errorMessage = 'Web Service did not return expected result';
onwards = false; // keep the document in this workflow step

```

***

### \_status

A system variable set by a previous workflow step, commonly during web validation.

Function:

* Captures the button pressed by the user when closing a document.

Values:

* No value:&#x20;
  * Indicates that the document was completed normally.
* invalid:
  * &#x20;Assigned when the user presses the 'Complete Ignoring Validation' button, despite one or more invalid field values.

Purpose:

* Determines the routing of the document to appropriate process steps based on the user's action selected during web validation.

The \_status variable will be assigned one of the following values by Web Validation:

* No value if the document is Completed normally without validation errors.
* 'invalid' if the document is completed with validation errors (also if a Custom Button is used to complete the document).
* 'reject' if the Reject button is used.
* 'return' if the Return button is used.
* 'rework' if the Rework button is used.
* 'rescan' if the Rescan button is used.

#### Using \_status in Script

The \_status value can be assigned and read in a ScriptTask.

Here is a sample script assigning (setting) the \_status value:

```javascript
status = 'reject';
```

In this case, the field status gets the value 'reject' assigned.

Here is a sample script reading the currently assigned value in \_status:

```javascript
var status;
status = _status;
```

{% hint style="info" %}
The \_status value is a string.
{% endhint %}

***

### \_moveToStep

In the workflow designer, up to 3 custom buttons can be configured:

<figure><img src="/files/ZeCsJfScISKpIId0U3q9" alt=""><figcaption></figcaption></figure>

If the user presses this button, the variable \_moveToStep will be assigned the value 'Custom Action 1'.

***

### \_customData

CustomData is a string optionally provided by a capture client, for example Scan+ProcessLite or Scan+Express. This parameter can be any string and passed during the upload of a document to Straatos into the \_customData system variable.

***

### \_authAccountId

When an account is created in the Admin Panel, a unique numerid ID will be generated for the account.

This ID can be seen in the URL of the Account maintenance screen in the Admin Panel:

* URL: `https://admin.cumuluspro.net/adminpanel.aspx#account/10032/settings`

For each document that was sent into Straatos from a Scan Client (Scan+ProcessLite, Scan+Express, Mobile Capture etc.) the variable \_authAccountId will hold the user ID of the account if the user was authenticated.

***

### \_authLoginName

When an account is created in the Admin Panel, a Login Email Address is specified:

<figure><img src="/files/POJJ5glPsvtDnnrBJVzR" alt=""><figcaption></figcaption></figure>

For each document that was sent into Straatos from a Scan Client (Scan+ProcessLite, Scan+Express, Mobile Capture etc.) the variable \_authAccountLoginName will hold the Login Email Address of the account if the user was authenticated.

***

### \_authUserIdentifier

When an account is created in the Admin Panel, a User Identifier can be specified:

<figure><img src="/files/DvKlIvVh8xs1oNwsWsOq" alt=""><figcaption></figcaption></figure>

For each document that was sent into Straatos from a Scan Client (Scan+ProcessLite, Scan+Express, Mobile Capture etc.) the variable \_authUserIdentifier will hold the User Identifier of the account if the user was authenticated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.cumuluspro.net/developer-guide/straatos-fields-reference-basics/system-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
