# Data Rules

{% hint style="info" %}
**Configures:**

* Which scenario to use?
* Which policy to use for a particular [Stoobly mode](https://docs.stoobly.com/core-concepts/agent/intercept-modes)?
  {% endhint %}

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-44f6673ab96ea05b96ba3e4df61038bcec61ce65%2Fproxy-settings-sept-2023.png?alt=media" alt=""><figcaption></figcaption></figure>

## Source or Destination

{% hint style="info" %}
Answers: Where to record/mock requests?
{% endhint %}

For recording, this setting controls which scenario the request will be saved to. For all other modes, this setting controls which scenario the request will be searched from.

## Policy

{% hint style="info" %}
Answers: Which requests to record/mock?
{% endhint %}

### Record Policy

Record policy settings controls what to do with requests received by the agent. By default, the agent will record `all` requests intercepted.

To configure the record policy, go to the Proxy Settings by clicking on the cog next to the Run button. Below is similar to what you will see.

<div align="left"><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-5efb171faa18130b127cf382d306fbf347c71f19%2FScreen%20Shot%202023-04-12%20at%209.57.08%20AM.png?alt=media" alt="Figure 1. Record policy settings"></div>

The following describes the behaviour of each record policy:

<table><thead><tr><th width="201.71124589450892">Policy</th><th>Description</th></tr></thead><tbody><tr><td>all</td><td>All requests will be recorded</td></tr><tr><td>not_found</td><td>Only requests not previously recorded will be recorded</td></tr><tr><td>overwrite</td><td>Active scenario will be overwritten with record requests</td></tr></tbody></table>

### Mock Policy

Mock policy settings controls what to do with requests received by the agent.

By default, the agent will only mock `found` requests.

<div align="left"><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-755161f13d41864dc717f7daed20d771dce46251%2FScreen%20Shot%202023-04-12%20at%209.57.08%20AM.png?alt=media" alt="Figure 2. Mock policy settings"></div>

The following describes the behaviour of each mock policy:

<table><thead><tr><th width="210.6632398448366">Policy</th><th>Description</th></tr></thead><tbody><tr><td>all</td><td>All requests will be mocked</td></tr><tr><td>found</td><td>Only requests that have been recorded will be mocked</td></tr></tbody></table>
