# Creating Equations

Admins can create an equation to produce a custom score. The process for creating an equation for a priority and findings is the same and consists of two steps:&#x20;

1. **Equation Properties**: The tab in which the name, description, and (when applicable) what clients the equation applies to are entered.
2. **Equation Builder**: The tab where the user selects and configures the variables of the equation that determines the contextual score.

## Part 1: Equation Properties Tab

{% hint style="info" %}
The example below is done within the Priorities tab, but the process is the same as the Findings tab.
{% endhint %}

<mark style="background-color:yellow;">Step 1:</mark> From the **Admin Dashboard**, click **Risk scoring**.

<div align="left"><figure><img src="/files/fl2YL5OpnkWUi24NTQUH" alt="" width="267"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 2:</mark> Click **Create Equation**.

<div align="left"><figure><img src="/files/kgLVd0MD5G0x2lNIWFAm" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> Select whether to start from the tenant default or another equation. When finished, click **Create**.

<div align="left"><figure><img src="/files/g4ik9ZPjsavxhlJCFvaU" alt="" width="412"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 4:</mark> Enter an equation name and description on the "Edit basic information" tab.

{% hint style="info" %}
If priorities are configured for all clients, client-specific configuration options for priorities equations will not appear, and users will proceed to Step 9.

![](/files/9sw64NMus10kT6eal3g7)
{% endhint %}

<div align="left"><figure><img src="/files/m2ou8y6VaioSQXCvpfhn" alt="" width="551"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 5:</mark> Identify whether the equation will apply to all clients in the tenancy who currently have no equation assigned or to a specific client.

{% hint style="info" %}
If this equation applies to all clients, skip to Step 9.
{% endhint %}

<div align="left"><figure><img src="/files/EM6ORmZXYFeZChrWuWsI" alt="" width="556"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 6:</mark> If client-specific, click **Select clients** and search, scroll, or use filter options to find the desired client.&#x20;

<div align="left"><figure><img src="/files/56bgcuEG8l2EZWmvFKXL" alt="" width="556"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 7:</mark> Click **Select.**

<div align="left"><figure><img src="/files/UUVp9bXi5v7ikWTLDKgz" alt="" width="501"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 8:</mark> Click **Save** at the bottom right of the page.

<div align="left"><figure><img src="/files/5PUvunoGExixj2E8EXgo" alt="" width="501"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 9:</mark> Click **Continue** at the bottom right of the page.

The "Edit variables and equation" second tab appears as the equation builder tab.&#x20;

<div align="left"><figure><img src="/files/TuIBJ143T45MCm3fZA1t" alt=""><figcaption></figcaption></figure></div>

## Part 2: Equation Builder Tab

The equation builder tab consists of three sections/boxes:

<div align="left"><figure><img src="/files/v8hjLUaMh4FP7rDKo2Me" alt=""><figcaption></figcaption></figure></div>

**Box 1 - Score Equation**: This box displays the current equation and allows users to modify it by dragging variables on/off the box.&#x20;

**Box 2 - Available Equation Variables:** This box lists the available variables to be leveraged to update the current equation in Box 1.&#x20;

**Box 3 - Variable Configuration**: When a variable in Box 1 is clicked or selected from the pulldown menu at the top of Box 3, this box provides further details that can be used to define how the variable is utilized in the equation. These details include additional properties and business rules.

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

### **Equation Weight**

The total equation weight must always equal 100%. The current allocation is listed above the equation.

<div align="left"><figure><img src="/files/QArgT8cgTLqX30MWUAps" alt=""><figcaption></figcaption></figure></div>

Variable weights can be edited directly in the variable's box or in Box 3 on the right of the page in the "Variable weight" section.

<div align="left"><figure><img src="/files/Hb8iUf3JdD03TXKr0qGk" alt=""><figcaption></figcaption></figure></div>

To calculate the score for each variable in the equation, multiply the weight of the variable by the highest rule score and then divide the result by 100. For instance, if the weight of a variable is 50% and the highest rule score is 90, the score for that variable would be `50 * (90/100) = 45`.

If the total allocation for variables does not equal 100%, the total equation weight value in Box 1 will turn red to indicate an error, and an error message will appear if attempting to save the equation.

<div align="left"><figure><img src="/files/5KEPUEsrfRwDFhIV0r5n" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Variables can be included with an assigned 0% weight, but these will be ignored in the equation and have the same result as those that do not exist in the equation at all.

![](/files/45NKTBmZJCSSBOzLvaJY)
{% endhint %}

### **Resetting to Default**

PlexTrac provides a default equation out of the box that cannot be deleted but can be edited. This equation becomes the tenant default that can be used as a template or starting point to create additional equations.

Any other equation can be reset to its default equation by clicking the kebob menu in the equation's box and clicking **Reset to default PlexTrac equation**.

<div align="left"><figure><img src="/files/wPRUPAcCsOlmzdPLxUN0" alt=""><figcaption></figcaption></figure></div>

## Equation Use Cases

The equation builder allows for many variables and scenarios. Below are a few examples that cover various aspects of the functionality and demonstrate the multiple ways equations can be leveraged to meet specific client or tenant needs.&#x20;

{% hint style="info" %}
When configuring an equation, errors will not be visible until the user clicks **Save**. After that initial action, however, error messages are provided dynamically as the equation is worked on.&#x20;

![](/files/LfmK2bpLzv5BZNYVI4fK)
{% endhint %}

### Adding a Variable

* [x] **Scenario**: The user needs to add an asset type of "Server" to an existing equation.

<mark style="background-color:yellow;">Step 1:</mark> Click the `Asset type` variable in Box 2 (Available Equation Variables), drag it up to Box 1 directly above and place it in the equation. &#x20;

<div align="left"><figure><img src="/files/vFQTcKFCNqNzuBp8iH0y" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 2:</mark> Click **Save**. An error notification appears both in the equation and as a message because an operator variable is needed between the variables `Asset type` and `Asset criticality`.

{% hint style="warning" %}
All field variables need to be separated by an operator.&#x20;
{% endhint %}

<div align="left"><figure><img src="/files/Iv0mC0yzBCPMVsfmt1Wk" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> Click the operator variable in Box 2, drag it to Box 1, and place it where the error notification was displayed between the variables `Asset type` and `Asset criticality`.&#x20;

<div align="left"><figure><img src="/files/hSIP9tHysUwYX5f1hraG" alt="" width="563"><figcaption></figcaption></figure></div>

The error is resolved, and the message disappears.&#x20;

<mark style="background-color:yellow;">Step 4:</mark> The next step is to set the variable attribute with the correct value. Click the `Asset type` variable or select it from the pulldown menu in Box 3.

<div align="left"><figure><img src="/files/GbuxQad1nC737yIjQ9kc" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 5:</mark> Select the "Sever" asset type value from the pulldown menu for Rule 1.

<div align="left"><figure><img src="/files/CMBQOBbw5y30ohcVFRZa" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 6:</mark> The next step is to give `Asset type` some weight to the equation, or else it will be ignored, as all added variables default to 0%. Change the "Variable weight" value to 10%. The variable in the equation will dynamically update.&#x20;

<div align="left"><figure><img src="/files/vHiMjaD6REspgKoy9pZY" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 7:</mark> Identify how many points the variable will receive if the business rule is met by adding 75 to the "out of 100" box at the bottom of the rule.

<div align="left"><figure><img src="/files/C30uPuGthdJclFFggAUY" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 8:</mark> Since the total equation weight is now over 100% with the new variable being updated to 10%, another variable must be reduced to compensate. Note that the total equation weight is currently 110% and in red, denoting an error. An error message is also provided.

Click `Source data` and change its weight from 80% to 70% so that the total of all four variables equals 100%.

<div align="left"><figure><img src="/files/IVI1q7KHVeRO6cjRwwMM" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 9:</mark> The equation is now ready to be executed. Click **Save** and check "Enable equation after saving" to immediately enable (all existing equations assigned to the client will be disabled).

<div align="left"><figure><img src="/files/MrMohjwhbHCwHHvjnSuY" alt="" width="341"><figcaption></figcaption></figure></div>

### Removing a Variable

* [x] **Scenario**: The user must remove the CVSS 3.1 score from an existing equation.

<mark style="background-color:yellow;">Step 1:</mark> Click `Finding score (CVSS 3.1)`in Box 1, drag it to Box 2, and unclick the mouse.&#x20;

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

The equation no longer includes that variable, and CVSS 3.1 is now listed as available in Box 2.&#x20;

<mark style="background-color:yellow;">Step 2:</mark> Because the total equation weight must equal 100% and 10% of that weight was removed in Step 1, the remaining variables must be adjusted to compensate. Click `Source data`and add 10% to the existing set weight to increase from 70% to 80%.

<div align="left"><figure><img src="/files/rgcRcMf7UsyaBFwl2kCD" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> The next step is to remove an operator variable, as an equation cannot end with an empty operator.&#x20;

<div align="left"><figure><img src="/files/pt2V6X8tVAVOy0r7FpoH" alt=""><figcaption></figcaption></figure></div>

Select the operator at the end of the formula, drag it to Box 2 and release. The error message disappears.

<div align="left"><figure><img src="/files/hYgAk8LFKh1QwTmGS3tz" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 4:</mark> Click **Save**.&#x20;

### Editing a Business Rule

* [x] **Scenario**: The user needs to add a business rule to account for files from Snyk.

<mark style="background-color:yellow;">Step 1:</mark> Click `Source data` on the equation.

<div align="left"><figure><img src="/files/EqqsKgEyhdoprfmabREj" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 2:</mark> All business rules and parameters for `Source data` appear in Box 3 on the far right of the page. Currently, a business rule only exists for HackerOne. Click **Add rule**.&#x20;

<div align="left"><figure><img src="/files/tY90y5d0MyMek2Ld6HXf" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> Working now under Rule 2, select the source data value "is added from integrations" from the pulldown menu.

<div align="left"><figure><img src="/files/PwUINzFGRkANgHj5mlQ5" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 4:</mark> Select "Snyk" as the integration source in the following pulldown menu.

<div align="left"><figure><img src="/files/pYp3C54bxLCj9CWDVGUH" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 5:</mark> Give Rule 2 a weight of 45 out of 100 points.

<div align="left"><figure><img src="/files/vkWK1eINoLlF2iCCHHwl" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 6:</mark> Click **Save.**&#x20;


---

# 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://docs.plextrac.com/plextrac-documentation/product-documentation-1/account-management/account-admin/automations/risk-scoring/creating-equations.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.
