Skip to content

Move audiences between orgs

Copy audiences from a sandbox to production, or keep orgs in step

The open-source sf CLI plugin sf-plugin-cab copies Campaign Audience Builder audiences between Salesforce orgs, for example from a sandbox to production at a go-live. It uses the org aliases that your sf CLI already knows, so there is no separate login.

The plugin copies the complete definition of each audience: its filters, sequence components, and folder, plus the Filter Library templates and outcome definitions it uses. It does not copy schedules, run results, or campaign members.

  • sf cab audience list shows the audiences in an org.
  • sf cab audience export writes selected audiences to a file.
  • sf cab audience import shows a plan and then writes the audiences from a file into an org. Before it changes anything, it writes a backup of the target audiences that it updates.
  • sf cab audience migrate exports from one org and imports into another in one step.
Terminal window
sf plugins trust allowlist add --name @campaign-audience-builder/sf-plugin-cab
sf plugins install @campaign-audience-builder/sf-plugin-cab

The first command adds the plugin to the sf CLI allowlist, so the installation does not ask for confirmation.

For the requirements, all options, and examples, see the sf-plugin-cab repository on GitHub.