My organisation is moving an increasing number of business applications into the Force platform. As systems we previously integrated outside of SFDC now move into a common environment, it feels daft not to also migrate the integration logic.

From what I've read, DX looks like the ideal way for us to manage this transition. We will be able to build a CI/CD workflow to migrate our integrations into the Force platform, testing in scratch orgs, then Sandboxes, before deploying to our main org.

My question is around how this will work with the paid apps we use. Presumably the packages themselves don't get pulled down into source, but what about our integrations which reference objects defined in these packages?

And what about different versions of an app? Do package versions become part of my source? If I wanted to test a new release, can I specify a particular version on an app in DX?

1 Answer 1


You can script package installation with Salesforce DX using the sfdx force:package:install -i <PKGID> command. A common way to obtain the package ID, which starts with 04t, is to initiate an install from the AppExchange and copy the 04t ID out of the URL.

Another route is described by sfdxfox in this answer: you can extract the installed package details with SFDX itself, optionally using a 'dummy' project to connect to your real instance.

In some cases, though, paid apps have to be licensed before they can be installed, so the package ID isn't available through the AppExchange. If you don't have the package or version installed already, you may have to contact the developer of the package to get the ID, but I've confirmed (with NGO Connect) that you can still install the package from the command line with SFDX, no specific licensing action being required.

The Package ID identifies a specific version of the application, so to that extent the package version becomes part of your CI setup rather than your source. You might consider putting your package IDs in a versioned text file that you can parse in a shell script and install to make it easier to test new releases on a branch.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .