> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Switch Between Environments (Production and Sandbox)

> Learn to switch between production and sandbox environments to safely test configurations — in the gu1 dashboard with step-by-step guidance.

## Interactive Tutorial

<Info>
  **Coming soon**: Interactive Clueso video will be available here. For now, follow the step-by-step guide below.
</Info>

## Overview

The **dual environment system** in gu1 allows you to work with two isolated environments within the same organization:

* **Production**: Real data, active clients, operational rules
* **Sandbox**: Safe testing environment, isolated data, free experimentation

<Tip>
  **Advantage**: Test new rules, configurations, and integrations in Sandbox before activating them in Production, without risking your real data.
</Tip>

## When to Use Each Environment

<CardGroup cols={2}>
  <Card title="Production" icon="building" color="#10b981">
    **Day-to-day operations**

    * Real client onboarding
    * Production alert analysis
    * Ongoing investigations
    * Approval/rejection decisions
    * Active integrations
    * Real-time webhooks
  </Card>

  <Card title="Sandbox" icon="flask" color="#f59e0b">
    **Testing and experimentation**

    * Test new rules
    * Validate integrations
    * Train new analysts
    * Simulate complex scenarios
    * Adjust configurations
    * Develop custom workflows
  </Card>
</CardGroup>

## Steps to Switch

<Steps>
  <Step title="Locate the Environment Selector">
    In the top-right corner of the dashboard, next to your username, you'll see a **toggle** or **dropdown** indicating the current environment:

    * 🟢 **Production** (green)
    * 🟡 **Sandbox** (yellow/orange)
  </Step>

  <Step title="Click the Selector">
    Click the toggle or dropdown to open the environment selection menu.
  </Step>

  <Step title="Select the Environment">
    Select the environment you want to switch to:

    * **Production**: To work with real data
    * **Sandbox**: For testing and experimentation
  </Step>

  <Step title="Confirm the Switch">
    The dashboard will automatically reload and you'll see:

    * Visual indicator of the current environment
    * Badge in the top corner (Sandbox will have a yellow/orange badge)
    * Data corresponding to the selected environment
  </Step>
</Steps>

<Warning>
  **Important**: All your actions (creating entities, rules, alerts) will occur in the currently selected environment. Always check the indicator before making critical changes.
</Warning>

## Differences Between Environments

### Isolated Data

<Tabs>
  <Tab title="Production">
    **Real client data**

    * Real entities (people, companies)
    * Active alerts and investigations
    * Complete decision history
    * Integrations connected to real systems
    * Webhooks sent to production endpoints
  </Tab>

  <Tab title="Sandbox">
    **Isolated test data**

    * Entities created for testing
    * Simulated alerts
    * Experiment history
    * Integrations in test mode
    * Webhooks can be disabled or redirected
  </Tab>
</Tabs>

### Rules and Configurations

<AccordionGroup>
  <Accordion title="How do rules work?" icon="gavel">
    **Each environment has its own rules**, but you can:

    1. **Create rule in Sandbox** to test
    2. **Validate** with test data
    3. **Promote to Production** when ready

    **Rule promotion**:

    ```bash theme={null}
    # Via interface
    Settings > Rules > [Select rule] > Promote to Production

    # Via API
    POST /api/rules/{ruleId}/promote
    ```

    <Info>
      Promotion copies the rule from Sandbox to Production but doesn't activate it automatically. You need to manually activate it after promotion.
    </Info>
  </Accordion>

  <Accordion title="Are integrations shared?" icon="plug">
    **Integration configurations are shared**, but you can:

    * Use different credentials per environment
    * Disable integrations in Sandbox
    * Configure test mode for external APIs

    **Example**: ComplyAdvantage

    * **Production**: Real credentials, charged queries
    * **Sandbox**: Test credentials, free queries (if available)

    Configure at: **Settings** > **Integrations** > \[Integration] > **Environment Settings**
  </Accordion>

  <Accordion title="Are webhooks sent in both environments?" icon="webhook">
    **Yes, but you control the behavior**:

    **Production**:

    * Webhooks always active
    * Sent to production endpoints
    * Failures generate critical alerts

    **Sandbox**:

    * Webhooks can be globally disabled
    * Can be redirected to test endpoints
    * Failures don't generate critical alerts

    Configure at: **Settings** > **Webhooks** > **Sandbox Behavior**

    ```json theme={null}
    {
      "sandbox": {
        "enabled": true,
        "redirectTo": "https://webhook-test.com/sandbox",
        "muteErrors": true
      }
    }
    ```
  </Accordion>

  <Accordion title="Are users and teams the same?" icon="users">
    **Yes, users and teams are shared** between environments:

    * Same organization members
    * Same permissions and roles
    * Same configured teams

    **But**: Each user can work independently in each environment. For example:

    * **Analyst A** is in Production reviewing real alerts
    * **Analyst B** is in Sandbox testing a new rule

    Both can work simultaneously without conflict.
  </Accordion>

  <Accordion title="Can I copy data between environments?" icon="copy">
    **Yes, you can copy data from Production to Sandbox** for realistic testing:

    **Via Interface**:

    1. Go to the entity in Production
    2. Click **Actions** > **Copy to Sandbox**
    3. The entity (and optionally its relationships) will be copied

    **Via API**:

    ```bash theme={null}
    POST /api/entities/{entityId}/copy-to-sandbox
    {
      "includeRelationships": true,
      "includeDocuments": false,
      "anonymize": true
    }
    ```

    <Warning>
      **Privacy**: When copying to Sandbox, consider anonymizing sensitive data (SSN, emails, etc.) to protect client privacy.
    </Warning>

    **You cannot** copy from Sandbox to Production directly (for security). You need to recreate entities manually or via API.
  </Accordion>
</AccordionGroup>

## Visual Indicators

To avoid confusion, gu1 offers multiple visual indicators:

### On the Dashboard

<CardGroup cols={3}>
  <Card title="Environment Badge" icon="tag">
    **Top-right corner**

    * 🟢 **PRODUCTION** (green)
    * 🟡 **SANDBOX** (yellow/orange)
  </Card>

  <Card title="Background Color" icon="palette">
    **Subtle color change**

    * Production: standard background
    * Sandbox: slight yellow/orange tint in header
  </Card>

  <Card title="Favicon" icon="circle">
    **Browser tab icon**

    * Production: standard logo
    * Sandbox: logo with orange dot
  </Card>
</CardGroup>

### In Code (For Developers)

If you're developing custom integrations, you can detect the environment:

```javascript theme={null}
// Via API
const response = await fetch('https://api.gu1.ai/me', {
  headers: { 'Authorization': `Bearer ${apiKey}` }
});
const { currentEnvironment } = await response.json();
console.log(currentEnvironment); // "production" or "sandbox"

// Via SDK
import { GueoClient } from '@gueno/sdk';
const client = new GueoClient({ apiKey });
const environment = client.getCurrentEnvironment();
```

## Common Use Cases

### 1. Test New Rule

<Steps>
  <Step title="Switch to Sandbox">
    Click the selector and choose **Sandbox**.
  </Step>

  <Step title="Create the Rule">
    Go to **Rules** > **Create Rule** and configure the new rule.
  </Step>

  <Step title="Test with Data">
    * Use existing test data in Sandbox
    * Or copy real entities from Production (anonymized)
  </Step>

  <Step title="Validate Results">
    Check if the rule generates expected alerts and has no false positives.
  </Step>

  <Step title="Promote to Production">
    When satisfied: **Rules** > \[Your rule] > **Promote to Production**.
  </Step>

  <Step title="Activate in Production">
    Switch to **Production** and activate the promoted rule.
  </Step>
</Steps>

### 2. Train New Analyst

<Steps>
  <Step title="Create Test Data">
    In Sandbox, create fictional entities representing different scenarios (PEP, fraud, etc.).
  </Step>

  <Step title="Configure Training Rules">
    Activate rules that generate alerts for created scenarios.
  </Step>

  <Step title="Invite the Analyst">
    Add the new member with **Viewer** role initially.
  </Step>

  <Step title="Guide to Switch to Sandbox">
    Show how to switch to Sandbox and explain it's a safe environment.
  </Step>

  <Step title="Monitor Progress">
    Let the analyst practice alert review, investigation creation, etc.
  </Step>

  <Step title="Promote to Production">
    When ready, change role to **Analyst** and guide to work in Production.
  </Step>
</Steps>

### 3. Validate Integration

<Steps>
  <Step title="Configure in Sandbox">
    Go to **Settings** > **Integrations** and configure the new integration with test credentials.
  </Step>

  <Step title="Run Tests">
    Create test entities and execute the integration manually.
  </Step>

  <Step title="Check Logs">
    Review logs at **Settings** > **Integrations** > \[Integration] > **Logs**.
  </Step>

  <Step title="Adjust Settings">
    Fix errors and refine parameters until it works perfectly.
  </Step>

  <Step title="Update Credentials in Production">
    Switch to **Production** and update with real credentials.
  </Step>

  <Step title="Activate in Production">
    Enable the integration and monitor first uses.
  </Step>
</Steps>

## Best Practices

<CardGroup cols={2}>
  <Card title="Always Test First" icon="flask-vial">
    **Sandbox → Production**

    Never create or modify rules directly in Production. Always test in Sandbox first to avoid negative impacts.
  </Card>

  <Card title="Check Environment" icon="eye">
    **Before each important action**

    Always check the badge in the top-right corner before:

    * Creating rules
    * Running integrations
    * Approving/rejecting entities
    * Exporting data
  </Card>

  <Card title="Use Realistic Data" icon="database">
    **Copy from Production**

    For more accurate testing, copy real entities from Production to Sandbox (anonymized). This ensures your rules work with real data.
  </Card>

  <Card title="Document Tests" icon="memo">
    **Validation history**

    Keep a record of:

    * Which rules were tested
    * Which scenarios were validated
    * Results obtained
    * Adjustments made

    This helps with audits and onboarding new members.
  </Card>
</CardGroup>

## Limits and Quotas

<Info>
  **Sandbox has different limits from Production** to protect resources:

  | Resource              | Production       | Sandbox |
  | --------------------- | ---------------- | ------- |
  | **Entities**          | Unlimited (plan) | 1,000   |
  | **Alerts/month**      | Unlimited (plan) | 500     |
  | **AI Analysis/month** | Per plan         | 50      |
  | **Integrations/day**  | Unlimited (plan) | 100     |
  | **Webhooks/day**      | Unlimited        | 200     |
  | **Exports/day**       | 10               | 3       |

  To increase Sandbox limits, contact [support@gueno.com](mailto:support@gueno.com)
</Info>

## Keyboard Shortcuts

<Tip>
  **Productivity**: Use shortcuts to quickly switch between environments:

  * `g + e` - Open environment selector
  * `p` - Switch to Production (when selector open)
  * `s` - Switch to Sandbox (when selector open)
  * `?` - View all available shortcuts
</Tip>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I delete all Sandbox data?">
    **Yes!** You can completely clear Sandbox without affecting Production:

    **Settings** > **Sandbox** > **Reset Sandbox**

    This removes:

    * All test entities
    * All alerts and investigations
    * Action history

    **Doesn't remove**:

    * Rules (you can choose to keep or delete)
    * Integration configurations
    * Users and teams
  </Accordion>

  <Accordion title="How much does the Sandbox environment cost?">
    **Included in your plan**, no additional cost!

    * All plans (Starter, Professional, Enterprise) include Sandbox
    * Quota limits are lower (see table above)
    * AI analyses in Sandbox consume from your total quota
  </Accordion>

  <Accordion title="Can I have more than one Sandbox?">
    **Not currently**. Each organization has:

    * 1 Production environment
    * 1 Sandbox environment

    If you need multiple test environments, consider:

    * Creating a separate organization
    * Using development branches (for API integrations)
    * Contacting our Enterprise team for custom solutions
  </Accordion>

  <Accordion title="What happens if I forget I'm in Sandbox?">
    **No problem!** Data created in Sandbox stays isolated there.

    If you accidentally:

    * Create entities in Sandbox: doesn't affect Production
    * Create rules in Sandbox: doesn't affect Production (until you promote them)
    * Run integrations: uses test credentials

    **Tip**: Configure environment notifications at **Settings** > **Notifications** to receive a reminder when switching.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Rules" icon="gavel" href="/en/api-reference/rules/create">
    Learn to create and test rules in Sandbox
  </Card>

  <Card title="Configure Integrations" icon="plug" href="/en/api-reference/integrations/provider-codes">
    Set up integrations with test credentials
  </Card>

  <Card title="Environments API" icon="code" href="/en/api-reference/environments">
    Manage environments programmatically
  </Card>

  <Card title="Rule Promotion" icon="arrow-up-from-bracket" href="/en/api-reference/environments">
    Complete guide on promoting configurations
  </Card>
</CardGroup>

## Need Help?

* **Documentation**: Browse our complete guides
* **Email**: [support@gueno.com](mailto:support@gueno.com)
* **Dashboard**: Access your account at [app.gu1.ai](https://app.gu1.ai)

***

**Last updated**: January 2025
