Skip to main content

Production Safety

Production Safety is a critical safeguard that prevents accidental deployments to production environments by requiring explicit confirmation before proceeding with high-risk operations.


Overview

When deploying changes to a production HubSpot portal, the system automatically detects the environment and displays a Production Environment Warning modal. This extra confirmation step helps prevent:

  • Accidental deployments to production
  • Unintended changes to live customer-facing systems
  • Configuration mistakes that could impact business operations
  • Deployment to the wrong environment

How It Works

Automatic Detection

The system identifies production environments using two criteria:

  1. Portal Type: HubSpot STANDARD portals (production-tier accounts)
  2. Portal Name: Portal names containing "prod" (case-insensitive)

Examples of detected production portals:

  • Portal type: STANDARD
  • Portal names: "Production", "Prod Portal", "PROD-US", "production-eu"

Confirmation Flow

When you attempt to deploy to a production environment:

  1. Click Deploy Selected or Deploy All
  2. Production Environment Warning modal appears
  3. Modal displays:
    • Warning icon and "High-Risk Operation" message
    • Target portal name and ID
    • Input field for confirmation
  4. Type the exact Portal ID to confirm
  5. Click I understand the risk, proceed
  6. Deployment mode selection modal appears
  7. Proceed with deployment as normal

⚠️ Important: You must type the Portal ID exactly as shown. Copy-paste is allowed, but the ID must match character-for-character.


Production Environment Warning Modal

Header:

  • Title: "Production Environment Warning"
  • Red warning icon

Warning Banner:

  • High-visibility red background
  • Exclamation triangle icon
  • "High-Risk Operation" heading
  • Message: "You are about to deploy changes directly to a Production environment"

Portal Information:

  • Target portal name (e.g., "Production Portal")
  • Portal ID in monospace font (e.g., 12345678)

Confirmation Input:

  • Label: "To proceed, please type the Portal ID to confirm:"
  • Text input with Portal ID as placeholder
  • Monospace font for easy comparison

Actions:

  • Cancel: Close modal without deploying
  • I understand the risk, proceed: Disabled until Portal ID is entered correctly

When Production Safety Triggers

Scenarios That Trigger Confirmation

Triggers production safety:

  • Deploying to a STANDARD portal
  • Deploying to portal named "Production Portal"
  • Deploying to portal named "Prod-US"
  • Deploying to portal named "PRODUCTION-ENV"

Does NOT trigger production safety:

  • Deploying to SANDBOX portals
  • Deploying to portal named "Staging"
  • Deploying to portal named "Development"
  • Deploying to portal named "Test Environment"

Portal Type Reference

Portal TypeProduction SafetyDescription
STANDARD✅ YesProduction-tier HubSpot account
SANDBOX❌ NoSandbox/test environment
DEVELOPER❌ NoDeveloper test account

Bypassing Production Safety

There is no way to bypass or disable production safety. This is intentional to ensure all production deployments are deliberate and confirmed.

If you need to deploy to production frequently:

  • Consider using a staging environment for testing first
  • Use Assisted Deployment for step-by-step control
  • Review changes carefully in the comparison view before deploying

Best Practices

Before Deploying to Production

  1. Test in staging first: Always deploy to a non-production environment first
  2. Review all changes: Carefully examine the diff viewer for unexpected changes
  3. Check dependencies: Ensure all dependencies are resolved
  4. Verify scope permissions: Confirm you have required HubSpot scopes
  5. Create a backup: Backup production portal before deploying (see Backups)
  6. Document the deployment: Note what you're deploying and why

During Production Deployment

  1. Read the warning: Don't rush through the confirmation modal
  2. Verify portal ID: Double-check you're deploying to the correct portal
  3. Type carefully: Enter the Portal ID accurately
  4. Choose deployment mode wisely: Consider Assisted Deployment for critical changes
  5. Monitor progress: Watch the deployment logs for errors

After Production Deployment

  1. Verify changes: Check HubSpot portal to confirm changes applied correctly
  2. Test functionality: Test affected workflows, forms, or features
  3. Monitor for issues: Watch for errors or unexpected behavior
  4. Document outcome: Record what was deployed and any issues encountered
  5. Backup again: Create a post-deployment backup for rollback capability

Naming Conventions

To ensure production safety works correctly, follow these naming conventions:

Production Portals

Use clear production indicators in portal names:

  • ✅ "Production"
  • ✅ "Prod Portal"
  • ✅ "PROD-US"
  • ✅ "Production-EU"
  • ✅ "Live Environment"

Non-Production Portals

Avoid "prod" in non-production portal names:

  • ✅ "Staging"
  • ✅ "Development"
  • ✅ "Test Environment"
  • ✅ "Sandbox"
  • ✅ "QA Portal"

⚠️ Avoid ambiguous names:

  • ❌ "Production Test" (contains "prod")
  • ❌ "Pre-Prod" (contains "prod")
  • ❌ "Prod-Like" (contains "prod")

Troubleshooting

Problem: Deploying to production but no confirmation modal appears

Possible causes:

  • Portal type is not STANDARD
  • Portal name doesn't contain "prod"
  • Portal is actually a sandbox

Solution:

  1. Check portal type in HubSpot settings
  2. Rename portal to include "Production" or "Prod"
  3. If it's truly production, contact support to verify portal type

Cannot Type in Confirmation Input

Problem: Input field is disabled or not accepting text

Possible causes:

  • Browser autofill interfering
  • JavaScript error
  • Modal not fully loaded

Solution:

  1. Click directly in the input field
  2. Disable browser autofill
  3. Refresh the page and try again
  4. Check browser console for errors

"Proceed" Button Stays Disabled

Problem: Button doesn't enable after typing Portal ID

Possible causes:

  • Portal ID doesn't match exactly
  • Extra spaces before/after ID
  • Wrong Portal ID entered

Solution:

  1. Copy the Portal ID from the modal and paste it
  2. Check for extra spaces
  3. Verify you're typing the correct ID (shown above the input)
  4. Clear the input and try again

Problem: Confirmation required for staging/dev portal

Possible causes:

  • Portal name contains "prod"
  • Portal type is STANDARD but used for testing

Solution:

  1. Rename portal to remove "prod" from the name
  2. If portal is truly non-production, consider using a sandbox portal type
  3. Accept the extra confirmation as a safety measure


Security Considerations

Why Portal ID Confirmation?

Requiring the Portal ID to be typed (not just clicking "OK") ensures:

  • Deliberate action: Forces you to slow down and verify
  • Correct target: Confirms you know which portal you're deploying to
  • Audit trail: Demonstrates intentional deployment decision
  • Mistake prevention: Reduces accidental clicks

Compliance and Governance

Production Safety helps meet compliance requirements:

  • Change management: Documented confirmation of production changes
  • Audit trail: Clear record of who deployed what and when
  • Risk mitigation: Reduces likelihood of unauthorized or accidental changes
  • Best practices: Aligns with industry standards for production deployments

FAQ

Can I disable production safety?

No. Production safety cannot be disabled. This is a core safety feature designed to prevent accidental production deployments.

What if I deploy to production frequently?

Consider these alternatives:

  • Use staging environments for testing
  • Implement CI/CD pipelines for automated deployments
  • Use Assisted Deployment for better control
  • Create deployment checklists to streamline the process

Does production safety apply to backups?

No. Production safety only applies to deployments (changes being pushed to HubSpot). Backups (reading data from HubSpot) do not trigger the confirmation modal.

Can I mark a portal as non-production?

Yes, by:

  1. Renaming the portal to remove "prod" from the name
  2. Using a SANDBOX portal type instead of STANDARD

What happens if I cancel the modal?

Nothing. The deployment is cancelled and no changes are made to the portal. You can review your changes and try again when ready.


Next Steps