Setting up Salesforce multi-environment allows you to connect multiple Salesforce instances (like sandbox and production) and safely test workflows, content, guidance, and procedures before going live.
This guide walks you through connecting environments, configuring channels, testing workflows, and promoting changes to production.
Key benefits
Safely test changes without impacting your live environment.
Run environment-specific workflows for better control.
Validate integrations and routing before deployment.
Target content, guidance, and procedures to specific environments.
Step 1: Connect and configure another environment
Go to Connect > Connect to Salesforce from the main menu.
Click Connect under "Add organization".
Follow the setup instructions to connect your Salesforce instance.
Step 2: Configure your channels for multi-environment
Once you have your test environment connected, jump to the Deploy section and choose which channel you want to test with. Depending on the channel, there may be some further configuration to do at this point.
Salesforce cases channel
For Salesforce cases, you will need to choose which user acts a Fin in your test environment. You will see a new accordion on the Salesforce cases channel that should prompt you to configure cases.
Once you click Configure here, you will be asked to choose a Salesforce user for Fin to reply with. You can also optionally configure Fin over email here. If you are planning on using a different email domain for your test environment, you'll need to verify it here.
Note: Don't forget to configure your routing on the Salesforce side so that new cases are assigned to the Fin user.
Bring Your Own Channel [optional]
You will need to connect & activate Bring Your Own Channel for your new Salesforce environment if you want to handoff to a human agent. This configuration exists on the Settings > Fin Messenger > Configure for Salesforce page, so you may have already added this configuration, but if not, you will have an incomplete step on the Fin Messenger channel prompting you to add your configuration.
Enhanced Chat [Deprecated]
Deprecated - New Salesforce deployments use Bring Your Own Channel (BYOC). This section is only visible if your workspace already uses Enhanced Chat and is only required if you're using Fin Messenger. If you're setting up Fin to handle Salesforce cases, you can skip this section.
You will need to connect to the Enhanced Chat API for your new Salesforce environment if you want to handoff to a human agent. This configuration exists on the Settings > Fin Messenger > Configure for Salesforce page, so you may have already added this configuration, but if not, you will have an incomplete step on the Fin Messenger channel prompting you to add your configuration.
Configure workflows
You'll find your existing workflows underneath the Deploy checklists for each channel.
Salesforce cases workflow
If you use Salesforce case handoff, you'll need to configure which user or queue the case is handed off to when you add a new environment. You'll initially see a red box around the unconfigured handoff step. Click this and choose an assignee per environment.
Fin Messenger workflow
Once you have connected & activated Bring Your Own Channel, you can add the Hand-off to Salesforce agent step to the workflow to handoff to a live human agent in Salesforce via the Fin - Bring Your Own Channel. See details for how you can test each environment in the next section.
Synchronize data to and from Salesforce
Sychronizing data doesn't change when you add another connection. You will still see one set of attributes when you choose from your list. The attributes populated in the list come from your production environment, and, if a production environment is not connected, attributes will be pulled from your default environment.
Important: Attributes must exist in both environments and match in:
Type
Options (for picklists)
Step 3: Update workflows for multiple environments
The main way to test your new environment is via workflows. You have two options on how to test with workflows.
Option 1: Target a workflow
Open a workflow.
Click on the first block.
Choose which environment(s) the workflow applies to.
Select Done and set your workflow live.
Option 2: Add branching
If you don't want to create a new workflow, you can add branching within an existing workflow:
Open your workflow.
Add a Branches step.
Add a condition using Environment and select the environment you want.
Define logic for each environment.
Tip: Duplicate workflows using the three-dot menu > Duplicate to quickly create environment-specific versions.
Step 4: Test your setup
Once you've updated your workflows, you can test the changes in your non-production environments.
Test Salesforce Cases
Go to Deploy > Salesforce cases.
Click Live test at the top of the page.
Enable your test environment.
Once enabled:
Cases assigned to the Fin user will be handled by Fin.
Conversations will appear in Analyze > Conversations.
Test Fin Messenger
Go to Deploy > Fin Messenger.
Click Live test at the top of the page.
Select your environment from the dropdown.
Enter a URL where the messenger is installed.
Click Launch test.
The system automatically appends:
IntercomLiveTest=true
messenger_environment=abc123
IntercomLiveTest=true — this tells the messenger to launch even if it's not enabled so you can test it
messenger_environment=abc123 — this tells the messenger which environment you are testing with. Even if you've pointed at your production website, this will swap the messenger environment to whatever environment is set in the URL. You can also add this to your messenger settings if you have a messenger on an internal test site so you don't have to always remember to include the environment in the URL to set it to test mode.
Note: If you don't specify the messenger_environment attribute either in the URL or messenger_settings, the default environment will be used. To set a default environment, go to the Connect page, click Manage below the environment, and toggle on Default environment.
Step 5: Test content, guidance, and procedures
To test environment-specific content, guidance, or procedures:
Create an audience
Go to Settings > Audiences.
Click New.
Add a rule:
Select Environment.
Choose your target environment.
Save the audience.
Apply the audience
Content: Select a piece of content and set audience in the "Details" sidebar.
Guidance: Select audience in the dropdown after adding your guidance.
Tasks and procedures: Apply audience in the first node.
Test a Release against a specific environment
If your changes to content, guidance, or procedures are bundled in a Release, you can roll it out to a specific environment instead of manually building an audience rule for each one (as described in Step 5 above). Open your Release, select Rollout release, then Roll out gradually, and choose one of three rollout types.
Phased rollout — Release to a percentage of conversations in a chosen environment, monitor how it performs, and increase the percentage when confident. Under Audience, select (or create) an audience scoped to the environment you want to test, then set your traffic split.
A/B test — Split traffic between the Release and Fin Main within a chosen environment, and measure a metric for statistical significance. Scope it to an environment the same way, via the Audience setting.
Test organization — Release directly to one or more connected test organizations, without needing to build an audience rule first. This is the fastest way to check a Release end-to-end in a test environment before it reaches your live organization.
Note: Releases are currently in closed beta. Conversations in the environment(s) or test organization(s) you target use the Release's version of content, guidance, and procedures. Conversations in your live organization keep using Fin Main.
Step 6: Promote changes to production
When ready to go live:
Content, guidance, procedures: Remove audience targeting or switch to an audience used in production.
Workflows with branching: Remove the branching and old redundant logic, or update the branches to point to your production environment.
New workflows: Toggle the environment targeting in the first block or re-order the workflows on the Deploy page.
Note:
Workflows run in the order they are shown on the deploy page, so if the first workflow matches the current environment, that one will be selected to run when a new conversation or case arrives. There is currently a restriction where the first workflow can't be moved down, which will be removed soon.
The "Environments" column on the Deploy page will tell you what environment the workflow is currently targeting.
Why isn't my Fin Messenger workflow starting on the Help Center?
A Fin Messenger workflow doesn't start on the Help Center Messenger when the workflow isn't enabled for the environment that the Help Center Messenger uses. The Help Center Messenger always uses your workspace's default environment, because no specific environment is passed to it. If the workflow targets only another environment, such as a Salesforce sandbox, the Help Center Messenger never considers that workflow, and the conversation goes to your inbox without Fin starting.
To fix a Fin Messenger workflow that doesn't start on the Help Center Messenger:
Open the Fin Messenger workflow from the Deploy page.
Click the trigger step at the top of the workflow.
In the Environments section, enable your production environment, or choose to run in all environments.
Set the workflow live again.
To check which environment a Fin Messenger workflow targets, look at the Environments column on the Deploy page. To change which environment is the default for Fin Messenger, go to the Connect page, click Manage below the environment, and toggle on Default environment.
If you want to keep a Fin Messenger workflow limited to a test environment, test it from a page where the Messenger loads with that environment selected, rather than from the Help Center. For example, add messenger_environment with your test environment's value to the URL of a page that has the Messenger installed. See Test Fin Messenger in Step 4 for details.
Assign identity verification keys to an environment
If you run Fin across more than one Salesforce org, such as production plus sandboxes, you can assign each Messenger identity verification key to one environment. A key assigned to an environment only verifies users on Messenger requests from that environment, so a leaked sandbox key can't be used to sign in as a user in production.
Go to Settings > Security > Messenger. When you create a new identity verification key, pick an environment, or leave it on All environments to keep the current behaviour.
The keys table has an Environment column showing each key's scope.
A key's environment is fixed when you create it. To move a key to a different environment, create a new key and revoke the old one.
Existing keys stay unassigned and keep working in every environment, so you don't need to change anything.
Tip: You can also set the environment when creating a key through the REST API (Preview API version) by passing environment_id. Its value is the messenger_environment from your Messenger install snippet.
Glossary
Environment
An environment is any Salesforce instance that is connected to your Intercom workspace. These can be used to target workflows, procedures, content or guidance. The environment is also applied to any conversation that’s displayed in Analyze > Conversations in the right sidebar.
Default Environment
This is the environment that is used for Fin Messenger when no specific environment is passed to the messenger. The default environment can be configured on the Connect page by clicking on the environment and enabling the Default environment toggle.
Messenger Environment
This is a string that can be passed via the URL or set in the messenger settings object (as messenger_environment). This maps directly to a connected Salesforce environment. You can get the messenger environment string either by clicking on a specific environment on the Connect page and copying the value at the bottom of the open sheet, or by going to Deploy > Fin Messenger then clicking Live test and entering your URL for the environment you want to test.
Production Environment
This will always be the environment that your live customers talk to you in. A production environment is required for a channel to go live. You explicitly connect your production environment on the Connect page. You don't have to connect production initially, you can connect a test environment first.
Need more help? Get support from our Community Forum
Find answers and get help from Intercom Support and Community Experts













