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

# Environment & Credentials

> Understanding and configuring PureClarity environment and credential settings in Magento 2.x

The Environment & Credentials section contains the essential settings that connect your Magento store to PureClarity's system. These settings are typically configured automatically during signup but can be managed manually when needed.

## Configuration Location

Navigate to **Stores > Configuration > PureClarity** to access the Environment & Credentials settings.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/pureclarity/images/magento/environment-credentials-settings.webp" alt="Environment & Credentials settings in PureClarity configuration page in Magento 2 admin" />

<Note>
  These settings are populated automatically when you sign up through the PureClarity dashboard page. Manual changes are rarely needed during normal operation.
</Note>

## Configuration Fields

### Enabled

**Purpose:** Master switch for PureClarity functionality\
**Options:** Yes/No\
**Default:** Yes (after signup)

When set to **"No"**, PureClarity will:

* Stop displaying zones on the frontend
* Disable daily feed execution
* Stop real-time product and category indexing
* Maintain configuration but suspend all operations

<Warning>
  Disabling PureClarity will immediately stop all personalization features and data synchronization. Use this setting carefully.
</Warning>

### Access Key

**Purpose:** Public identifier for your PureClarity store\
**Format:** Alphanumeric string\
**Security:** Safe to share with PureClarity support

The Access Key identifies your specific PureClarity store and is used for:

* API authentication
* Feed submission
* Zone content retrieval
* Analytics tracking

<Info>
  Access Keys are store-specific. Each Magento store view connected to PureClarity has its own unique Access Key.
</Info>

### Secret Key

**Purpose:** Private authentication credential\
**Format:** Alphanumeric string\
**Security:** Highly confidential - never share

The Secret Key provides secure authentication for:

* Data feed encryption
* API request validation
* Account verification
* Secure data transmission

<Warning>
  Never share your Secret Key with anyone outside your organization. Treat it like a password and store it securely.
</Warning>

### Region

**Purpose:** Determines which PureClarity servers to connect to\
**Options:** USA / Europe\
**Impact:** Affects performance and data residency

The region setting controls:

* **Server endpoints** for API calls and feeds
* **Data storage location** for compliance requirements
* **Network latency** and connection performance
* **Service availability** and redundancy

<Tip>
  Choose the region closest to your primary customer base for optimal performance. This setting cannot be changed after account creation.
</Tip>

## Configuration Sources

### Automatic Configuration

Settings are populated automatically when:

* **Signing up** through the PureClarity dashboard
* **Linking existing stores** during setup
* **Adding additional stores** to your account

### Manual Configuration

Manual entry may be needed for:

* **Account recovery** after configuration loss
* **Store migration** between environments
* **Multi-environment setup** (staging, production)
* **Troubleshooting** connection issues

## Security Best Practices

### Credential Management

* **Limit access** to Magento admin users who need it
* **Use different credentials** for staging and production
* **Rotate credentials** if compromise is suspected
* **Document access** for compliance purposes

### Environment Security

* **Use HTTPS** for all PureClarity communications
* **Restrict admin access** to configuration pages
* **Monitor configuration changes** in admin logs
* **Backup configurations** before making changes

<Warning>
  Store Secret Keys in secure password managers or documentation systems. Never include them in code repositories or unsecured documents.
</Warning>

## Troubleshooting Connection Issues

### Verification Steps

1. **Check credentials** are correctly entered
2. **Verify region** matches your account setup
3. **Test network connectivity** to PureClarity servers
4. **Review error logs** for authentication failures

### Common Issues

**Authentication Errors:**

* Incorrect Access Key or Secret Key
* Wrong region configuration
* Network connectivity problems
* Account suspension or expiration

**Feed Failures:**

* Invalid credentials preventing data transmission
* Region mismatch causing connection timeouts
* Firewall blocking PureClarity server access

**Zone Content Missing:**

* Access Key mismatch preventing content retrieval
* Account disabled or suspended
* Incorrect region reducing performance

## Multi-Store Configuration

### Store View Settings

Each Magento store view requires:

* **Unique Access Key** for that specific store
* **Corresponding Secret Key** for the same store
* **Correct region** for your account
* **Individual enable/disable** control

### Shared Account Benefits

Multiple stores on one PureClarity account provide:

* **Unified billing** across all stores
* **Shared analytics** and reporting
* **Cross-store insights** and optimization
* **Centralized management** in PureClarity admin

<Note>
  While stores share an account, each maintains separate credentials and can be managed independently.
</Note>

## Configuration Changes

### When to Update Settings

* **Account migration** to new regions
* **Security incidents** requiring credential rotation
* **Store consolidation** or separation
* **Environment changes** (staging to production)

### Change Process

1. **Backup current settings** before making changes
2. **Update credentials** in Magento configuration
3. **Save configuration** and clear relevant caches
4. **Test functionality** to verify successful connection
5. **Monitor feeds and zones** for proper operation

### Post-Change Validation

* Check feed status in dashboard
* Verify zones load correctly
* Test personalization features
* Monitor error logs for issues

## Related Configuration

### Dependent Settings

Environment & Credentials affect:

* [Feed Status](/integrations/magento/magento-2/feed-status) - Connection required for feed transmission
* [Dashboard Overview](/integrations/magento/magento-2/dashboard) - Credentials needed for data display
* [Zone Configuration](/integrations/magento/magento-2/zone-debug) - Access Key required for content retrieval

### Integration Points

These settings integrate with:

* **Data Feed Indexing** - Credentials authenticate feed submission
* **Zone Display** - Access Key retrieves personalized content
* **Analytics Tracking** - Account identification for proper attribution

## Support and Recovery

If you lose access to your credentials:

1. **Contact PureClarity support** with account details
2. **Verify account ownership** through alternative means
3. **Request credential reset** if necessary
4. **Update Magento configuration** with new credentials
5. **Test full functionality** after restoration

<Info>
  Keep your PureClarity account contact information current to facilitate credential recovery if needed.
</Info>
