Skip to content
Promote Force
Docs: Developer workflow: Salesforce projects

Docs

Developer workflow: Salesforce projects

Signed in? Open this page in the app, with links straight to your team's screens.

Clone → branch → build → push → (validate on the dev org) → promote → review → deploy. Here is each step, and what Promote Force does for you along the way.

This page is for Salesforce projects. For an application, see Developer workflow: application projects.

Once: get set up

  • Connect your personal org under Connected orgs and add it to the pipeline as your developer stage.

  • Git access, depending on where the project’s repository lives:

    • On Promote Force Git: create a Git token under Git access. It is shown once; git asks for it as the password.
    • On your organization’s GitHub: no Promote Force token. Link your GitHub account under Git access so your pushes are matched to you, and clone with your own GitHub access. Promote Force sees your pushes through its GitHub App.
    • Salesforce projects cannot stay on Azure DevOps or GitLab. Use Promote Force Git or GitHub.
  • Install the Salesforce-aware merge driver, once per machine (Python 3.11 or newer):

    pip install --index-url https://app.promoteforce.co.za/api/tools/simple/ pf-sfmerge && pf git setup
    

    The app serves the package, so you do not need a checkout of anything. On a self-hosted server the exact command, with your server’s host, is shown in the app’s Get started panel. pipx install --index-url https://app.promoteforce.co.za/api/tools/simple/ pf-sfmerge installs it in its own isolated environment instead. See Resolving conflicts.

  • Optional: connect your editor over MCP so Claude Code or Cursor can follow your branch and open a promotion for you.

If the repository is empty

A project created without choosing an org has no metadata on main, so monitors skip with a message to retrieve from Production first (skipped, not failed). Owners and admins fix that on the project page: choose Retrieve from Production (it starts from the Production stage’s org). Promote Force retrieves the org into main, then moves each stage branch up to it, but only branches with no commits of their own. Branches that have work of their own are left alone and listed in the result message. It refuses to run when main already has metadata, and only works on Promote Force Git.

In the portal

1. Clone

Each project page shows a ready-to-copy clone command with your Git username (your email, percent-encoded: @ becomes %40, + becomes %2B) in the URL. Use your token as the password and let your credential helper remember it. The username in the URL makes git pick this account’s saved login, not one saved for another Promote Force account.

git clone "https://you%40example.com@git.promoteforce.co.za/<org>/<project>.git"

“Repository not found” for a project you can see? Git sent a login saved for another account or team. Clone with the command from the project page, or clear the saved login (see the FAQ).

For a project linked to your GitHub repository, clone from GitHub with your usual GitHub access (GitHub CLI, an SSH key or a personal access token).

git clone https://github.com/<owner>/<repo>.git

2. Branch

Branch off main. Put the Jira key in the name and the feature links to the issue automatically.

git checkout -b feature/ABC-123-discount-rules main

Building on a teammate’s unfinished feature? Branch from their feature instead. Promote Force notices on your first push and records the dependency, so the two can be promoted together.

3. Build

Build locally in VS Code with the sf CLI against your personal org, or build by clicks in your org and use Pull from my org to commit the changes for you. See Pull from my org vs VS Code.

4. Push

git push -u origin feature/ABC-123-discount-rules

Your branch shows up on My work with the components it changes. If a teammate’s feature changes the same components, the push output warns you right away. On GitHub, the warning is a “Promote Force” check on your commit, and a notification once your GitHub account is linked.

5. Validate on the shared dev org (optional)

If the project has a dev org, you can try your branch there before you promote it. A dev org is a shared sandbox, developer or scratch org that a release manager sets on the project page, under Dev org. It is not a pipeline stage and a promotion does not require it: it is a place to check and look at a change early.

On the project page, in the dev org activity, type your branch in Branch (a feature branch; it sends what the branch changes since main) and choose:

  • Validate to only check the branch against the org, or
  • Deploy to dev org to deploy it and run its Apex tests, so you and others can see the change in the org.

Developers and above can do this. Details:

  • The dev org is shared, so its runs go one at a time in a queue. The activity list shows each run, its tests and any errors.
  • If a deploy would overwrite components that another branch last put in the org, it is stopped and shows the overlap. Look at it, then choose Deploy anyway if you mean it.
  • A dev org deploy never deletes components.
  • After every production deploy, the changes can be deployed to the dev org too (Send production deploys to the dev org, on by default), so production stays the baseline. Check the org now looks for changes made directly in the org, and you can reset components to their main version.
  • AI agents use the same dev org to check their work.

No dev org on the project? Skip this step.

6. Promote

On the feature page, select Promote to Integration (or whichever stage comes first). Promote Force creates the promotion branch, merges the stage branch into it with the Salesforce-aware merge and opens the promotion. If the merge conflicts, the promotion says so and lists the files; see Resolving conflicts.

7. Review

Reviewers open the promotion and see a Salesforce-aware summary above the diff (for example “Permission Set Sales_User: +2 field permissions”), comment inline and approve or request changes. They are emailed when their review is requested. Keep pushing to your feature branch to address comments: the promotion branch picks up your commits, and approvals are asked for again on the new head.

8. Deploy

The gates (merge checks, code analysis, a check-only validation with per-class coverage, Jira status) run on every new head of the promotion. Once they are green and it has the approvals its path asks for (including any required reviewers), the promotion joins the stage’s merge queue, which validates and deploys promotions in batches and moves the stage branch forward.

The promotion into the next stage then opens automatically, all the way up to production. Where the next stage shares the branch (for example Pre-prod → Production on main), that is a release of everything pending there. Other environments then receive your change through sync promotions (back-propagation).

9. Keep fresh: Update from main

main only ever holds production. Each time something reaches production, every open feature is offered Update from main: Promote Force merges main into your feature branch with the Salesforce-aware merge and pushes it with you as the author. Open promotions pick up the new head automatically.

  • The feature page shows Behind main by N commits, and the feature list marks features that are behind. Select Update from main on the feature page (you get a notification with a link after each production deploy).

  • Turn on Update automatically after production deploys to skip the click. Automatic updates only happen when your feature changes none of the components that were just deployed; otherwise you are notified and decide.

  • The update is a merge pushed to your branch, so run git pull before your next push.

  • If main doesn’t merge cleanly, your branch is left untouched and you are told which files and components conflict. Merge it yourself:

    git fetch origin
    git checkout feature/ABC-123-discount-rules
    git pull
    git merge origin/main
    # resolve, commit, then
    git push
    

Building on a teammate’s feature

Branch from their feature instead of main. On your first push Promote Force sees their feature in your branch’s history and records the dependency (the feature page shows it as “detected on push”). You can also add or remove dependencies by hand on the feature page; cycles are refused.

git fetch origin
git checkout -b feature/ABC-124-discount-ui origin/feature/ABC-123-discount-rules
git push -u origin feature/ABC-124-discount-ui

Your feature can reach a stage only after the feature it depends on has been deployed there. If it hasn’t, Promote together… on the feature page opens one promotion with both features: a bundle. See bundles.

After production

Once a feature reaches production it is released, and the other open features are offered Update from main.

From your editor (MCP)

With MCP set up, the same loop can be driven from Claude Code or Cursor. The agent sees what you see in Promote Force, so you do not copy ids.

What to ask, and what runs:

You say What the agent runs
“Where does my branch stand?” or /pipeline-overview resolve_checkout (your remote and branch to the project and feature branch), pipeline_status, feature_branch_status
“Does my branch collide with anyone? Which stages can it go to?” feature_branch_status: collisions, dependencies, how far behind main, and for each stage whether it is reached, blocked or can be opened
“Promote this branch to Integration” or /promote-current-branch promotion_open with the feature_id and the target stage id
“Why did my gate fail?” or /why-did-my-gate-fail gates_report, run_failures, run_status. It explains and changes nothing
“Re-run the checks” (after you pushed a fix) promotion_recheck
“What did the reviewer say?” / “Reply that I fixed it” review_comments, then review_reply
“Answer the AI review: that finding won’t be fixed, because…” review_comments (its ai_findings ids), then review_finding_reply
“Add a summary of what changed and why” promotion_comment
“Cancel this promotion, it is superseded” promotion_cancel (with the reason; it always asks)
“Create a branch called feature/ABC-124-ui” (Promote Force Git projects only) feature_branch_create

The steps:

  1. Commit and push your branch to your own remote, as in steps 1 to 4. Push before you ask for a promotion: Promote Force has to see the push and register the feature branch.
  2. Ask the agent to promote it. It calls promotion_open.
  3. You confirm. The tool never acts on the call that names it. Your editor shows a form with the project, stage and branch, or the agent hands you a link to confirm on Promote Force. Nothing happens before you do.
  4. The promotion opens and its checks start, exactly as if you had selected Promote in the portal. Ask again and you get the same promotion, not a duplicate.

What still happens in the portal: reviewing and approving, the merge queue, deploying, and the next promotion. Over MCP an agent cannot approve, merge, enqueue, deploy, override a gate or change permissions. The dev org step, Update from main and Pull from my org are not available over MCP either: do those in the portal.

Writes need a token with Can open promotions, your team’s opt-in and at least the developer role. Promotions into a production stage need a separate opt-in. See Use it from your editor (MCP).