Sub topic 4
Authorizing a deployment connection
This chapter assumes you can work in Setup, know the difference between a production org and a sandbox, and have the Deploy Change Sets permission. You will learn how a deployment connection lets two orgs exchange change sets, and how to set one up.
What a deployment connection is
A deployment connection is a one-way permission. It lets a source org upload an outbound change set to a target org. Salesforce creates connections between orgs that are related, such as a production org and its sandboxes. It does not create them between unrelated orgs.
Authorization is the step that turns a listed connection into a usable one. The connection must be authorized for the direction you want to deploy in. A sandbox can send to production only if production has authorized that direction.
Where connections come from
You do not create connections by hand. Salesforce lists them automatically. When you create a sandbox, it appears in the production org's connection list. Sandboxes created from the same production org also appear in each other's lists.
Open Setup, enter Deployment Settings in Quick Find, and select Deployment Settings. The page lists every org your current org can connect to. Each row shows the org name, a Edit link, and an Authorize status.
| Column | What it tells you |
|---|---|
| Name | The related org. |
| Type | Production or sandbox. |
| Authorize status | Whether uploads from the listed org are allowed. |
Authorize a connection
Authorization is set in the target org, because the target decides what it accepts. Follow these steps.
- Log in to the target org. For a sandbox-to-production deployment, that is production.
- Go to Setup, then Deployment Settings.
- Click Edit next to the source org, such as your sandbox.
- Select Allow Inbound Changes.
- Click Save.
Once saved, the source org can upload change sets to this org. The source org does not need to do anything else.
Direction matters
Authorization works in one direction only. Allowing a sandbox to send to production does not let production send to the sandbox. If you also want to push changes down, authorize that direction separately in the sandbox.
Keep these limits in mind:
- Orgs must be related. Two unrelated sandboxes cannot exchange change sets.
- Two sandboxes created from the same production org can exchange them, once authorized.
- Authorization is about permission to upload. It does not move any components by itself.
Checking the connection from the source org
After authorizing, confirm the target appears as an upload target. In the source org, open an outbound change set and click Upload. The target org should appear in the list.
If the target is missing, one of these is usually the cause:
- Inbound changes are not allowed in the target for that source.
- The orgs are not related.
- The target org is a Developer Edition or trial org, which is not supported through this path.
- Your user lacks the Deploy Change Sets permission in one of the orgs.
Common mistakes
- Authorizing in the wrong org. The setting belongs in the target. Enabling it in the sandbox does nothing for sandbox-to-production uploads.
- Assuming it works both ways. Check each direction you need.
- Expecting the list to update instantly after a refresh. Sandbox refreshes can reset settings, so recheck Deployment Settings after a refresh.
Exercise
You want to deploy a change set from a sandbox to production. In which org do you open Deployment Settings, and what do you select?
Show answer
Open Deployment Settings in production, the target org. Click Edit next to the sandbox and select Allow Inbound Changes, then save.
Exercise
You authorized production to receive changes from a sandbox. Can production now upload a change set to that sandbox?
Show answer
No. Authorization is one-way. The sandbox must separately allow inbound changes from production.