# System Library variables

<div align="left" data-full-width="false"><figure><img src="https://1036686854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJPnL__mOdr_mLZ8nwf%2Fuploads%2Fd0K00KM2DTvepfqmjdYP%2Fimage.png?alt=media&#x26;token=2fff74ef-f85f-40a8-855d-7c199b67139a" alt=""><figcaption><p>System Library can be found in any variant, under Variables -> System Library</p></figcaption></figure></div>

## Overview of the System Library

**System Library variables** allow access to built-in attributes about the responder's environment or context. They allow you to reach into the internals of Formsort, or the responder's browser, and pull out information that may be useful to you, like user device or OS, or the label of the [variant](https://docs.formsort.com/response-data-collection-and-management/variable-schema/broken-reference) the user is visiting.

Any variables added here will automatically be sent along with your answers to any integrations/configurations you have set up, and do not need to be added in-flow in any way. They can, of course, be templated using [variable templating](https://docs.formsort.com/core-concepts/formsort-quickstart-guides/template-your-variables), or used in [conditional logic](https://docs.formsort.com/conditions-and-logic) statements at your discretion. &#x20;

## Available answer definitions

### Amplitude device ID

Sends the Amplitude device ID, if the device ID was set in the URL and the Amplitude integration is active with "Use device id from URL" enabled.&#x20;

### current group ID

The ID of the current [Group](https://docs.formsort.com/creating-flows/building-a-new-flow/organizing-using-groups) the user is in (falling back to the Group Index if a Group ID has not been set). &#x20;

### current step ID

The ID of the current step (falling back to the current step index if an ID is not set). The [Step ID](https://docs.formsort.com/creating-flows/building-a-new-flow/steps#step-id) is useful to include if using any analytics integrations, in order to analyze step-level performance. This id can be manually set in the Step Settings.&#x20;

### current step index

The index of the current step, which is the number automatically assigned to the step according to where it is in the flow (e.g. first step is step "0", second step is step "1", etc.). The step index cannot be manually set.&#x20;

### current step URL&#x20;

The URL for the current step, including the page index (`https://{flow-url}#1` for the first step of a page).

If "Use step ID instead of index" is enabled in [Variant Settings](https://docs.formsort.com/form-behavior-settings/variant-settings#behavior), the current step URL will instead look like `https://{flow-url}#step-id`.&#x20;

### **expected redirect url**

Where is the user getting redirected?&#x20;

Will be set even if not currently redirecting: this is where the responder would be redirected at any point in the flow.

When the flow is being finalized, this is the same as the URL they were finally redirected to.

### flow label

The string label identifying the flow that was loaded.

### **Formsort environment**

Which [environment](https://docs.formsort.com/publishing-and-deployment/environments) is the responder in?

### host

This variable will include the base flow url in the answer payload.

### **is Android?**

Is the responder on an Android device?

Useful as a condition for displaying an Play Store link if you have an app.

### is iOS?

Is the responder on an iOS device, such as an iPhone?

Useful as a condition for displaying an App Store link if you have an app.

### is Mac OS?

Is the responder on Mac OS?&#x20;

### **is mobile**

Is the responder on a mobile device, regardless of manufacturer?

### is returning responder

Has the responder been to this flow before?

### is Windows?

Is the responder on Windows OS?&#x20;

### Jornaya lead ID

The Jornaya lead ID. Will only be set if you are using the [Jornaya integration](https://docs.formsort.com/integrations/integration-reference/jornaya) in the active environment.&#x20;

### **previous step url**

The URL of the previous step, useful for back links.

### **referrer**

The URL that form user arrived from, corresponding to `document.referrer`.

May be undefined if the user navigated directly to the flow, or if the referring page does not send the referrer per their [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).

{% hint style="warning" %}
Take care with collecting the **referrer**: it may contain personally-identifying information, if the referring page puts user data in its own URL and does not have a Content Security Policy defined.
{% endhint %}

### responder UUID

The [responder uuid](https://docs.formsort.com/core-concepts/how-data-works-in-formsort/responder-uuids) of the responder.

### session UUID&#x20;

The UUID of the session, unique for every time a flow is loaded. Reloading the browser or navigating back to the page will create a new UUID.&#x20;

### Trusted Form certificate URL&#x20;

The URL of the Trusted Form certificate issued for the session. Read more about the Trusted Form integration [here](https://docs.formsort.com/integrations/integration-reference/trustedform).&#x20;

### user agent

Navigator user agent, meaning the browser the responder is using. Includes version number.&#x20;

### variant label

The string label identifying the variant that was loaded.&#x20;

### variant revision UUID&#x20;

The UUID of the variant revision that was loaded for the responder.&#x20;

***

{% hint style="info" %}
If you have any suggestions for our System Library chat us in Intercom!&#x20;
{% endhint %}
