> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/fuse/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/fuse/data/evaluate-js.md).

# Evaluate JS

![](/files/-M5NbiY-0zWFCfeaMtSk)

{% hint style="danger" %}
**This is an advanced module**
{% endhint %}

## **Function**

This module enables users to write JavaScript and have it execute within the application.\
Anything that can be done in JavaScript can be written in this module.

For example, it can support a mod10 check for an “offline” credit card number change by doing calculations based on the digits input by the caller.

All the JavaScript written in the module is in its own scope. Any variables that are not added via reference will not be considered “global” will be limited locally to that module.

To use application variables or assign variables that will be available outside the JavaScript module, you will need to use the <img src="/files/-M4u9_-gGG1yzAnn6SZK" alt="" data-size="line"> button on the lower-right hand corner.

For example:

| Module                                                              | Description                                                                              |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| <img src="/files/-M5NbiY0nGxD8W9HfmtV" alt="" data-size="original"> | In this scenario, `variable_x` (defined by the module name) will have a value of 2.      |
| <img src="/files/-M5NbiY1SHBG4wPcLwq3" alt="" data-size="original"> | In this scenario, the variable *`result`* will have a value of 4.                        |
| ![](/files/-M5NbiY20jz5jBJSqE1n)                                    | This scenario assigns 10 from the result of `variable_x` + 8 to the variable *`result`*. |

## **Module Settings**

![](/files/-M5NbiZ24MWE5t2rbNzC)

### [Private](/fuse/module-settings.md#private)

|                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <img src="/files/-M5NbiYoLH9-yNY0kT9f" alt="" data-size="original"> | <p>This setting controls the logging function of a module.<br>Enabling the 'Private' setting instructs the module to not record, report, or retain the information input to that module for reporting or any other purposes. When enabled any information entered into a module during a call will be lost immediately when the call terminates.<br>The 'Private' setting is critical for businesses that need to maintain PCI-DSS or HIPAA compliance.<br><br>The module icon, in the upper left-hand corner, becomes grayed-out when this setting is enabled. See more details <a href="/pages/-M4zJLOnor8aJqMZ7an7#visual-indicators">here</a>.</p> |

### [**Module Size**](/fuse/module-settings.md#module-size)

|                                                                     |                                                                                                                                                                            |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="/files/-M5NbiYmYHI_IJiDcAiN" alt="" data-size="original"> | <p>This setting allows users to toggle the size of the Fuse module between Small and Large.<br>This setting only affect size of the module cosmetically in the editor.</p> |

### [**Show Custom Errors (Evaluate JS)**](/fuse/module-settings.md#show-custom-errors-evaluate-js)

|                                                                     |                                                                                               |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| <img src="/files/-M5NbiYpIlBkq4cl4qvN" alt="" data-size="original"> | This setting can be used to catch any errors that might occur when evaluating the Javacsript. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.plumvoice.com/fuse/data/evaluate-js.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
