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.
Once you're connected, you will need to configure the permissions and Connect to the Salesforce Enhanced Chat API (if applicable) for your new test environment. This is all done on the same Connect page, below the list of Salesforce connections. There will be a new dropdown that allows you to toggle between connections when configuring.
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.
Enhanced Chat channel [optional]
You will need to connect the Salesforce Enhanced Chat API of your new Salesforce environment if you want to handoff to a human agent. This configuration exists on the Connect 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 to the Salesforce Enhanced Chat API, no further configuration is required for the Fin Messenger workflow. 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.
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.
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












