AppOps:Deploy

This page describes an older version of Prodly SF CLI. View Latest

appops:deploy

To deploy data from one Salesforce environment directly to another Salesforce environment, enter this command at the command line prompt in your Salesforce DX CLI command shell:

$ sfdx appops:deploy DATA [ENVIRONMENTS] [OPTIONS]

The parameters provide for maximum flexibility when using the CLI command. Deployment requires these three pieces of information:

  • Deployment instructions (deployment plan or data set)
  • The environment to use as the source of the data to deploy
  • The environment to use as the source destination of the data to deploy

Here are all the available parameters:

Data

ParameterPurpose
-t, --dataset=<value>Use to specify the name or record ID of the data set to deploy.
-p, --plan=<value>Use to specify the name or record ID of the deployment plan to deploy.

Notes: Specify exactly one deployment instructions parameter. Specifying zero or more than one deployment instructions parameter results in an error. For each data set and deployment plan in the deployment, Active must be selected in the corresponding record.

Environments

ParameterPurpose
NoneUse to specify the dev hub org as the source environment and the scratch org as the destination environment.
-s connection,
–source=<connection>
Use to specify a connection name or record ID as the source environment and the scratch org as the destination environment.
-d <connection>,
–destination=<connection>
Use to specify the scratch org as the source environment and a connection name or record ID as the destination environment.

Notes: Specify zero, one, or both org parameters. When not specifying an org parameter, you must specify the scratch and dev hub orgs either with the optional setup steps or with the -u/–targetusername and -v/–targetdevhubusername options. When specifying a connection record, Active must be selected in the Prodly connection record. When specifying a connection record as the destination environment, Do Not Allow As Destination must not be selected in the Prodly connection record. When specifying a connection record by a name that exists for more than one record, Prodly uses the last-modified connection. The dev hub org cannot be the destination environment.

Options

ParameterPurpose
-b <nickname>,
–label=<nickname>
Use to specify a nickname for the environment.
-e,
–deactivate
Use to temporarily deactivate all events Prodly has permission to deactivate.
-l,
–simulation
Use to preview the source records that would be deployed.
-n <deployment name>,
–name=<deployment name>
Use to specify a name for the deployment.
-o <notes>,
–notes=<notes>
Use to include notes in the deployment results.
-q <query filter>,
–filter=<query filter>
Use to specify a query filter override for a data set deployment.
-u <username>,
–targetusername=<username>
Use to specify the username or alias of the destination environment, overriding any default scratch org you specified in the optional setup steps.
-v <username>,
–targetdevhubusername=<username>
Use to specify the username or alias of the dev hub org, overriding any dev hub org you specified in the optional setup steps.
–apiversion=<apiversion>Use to override the API version used for API requests made by this command.
–jsonUse to receive an output response. When included, the response is in JSON format. When not included, no response is given.
–loglevel=<level>Use to specify the logging level for this command invocation with one of these levels:errorwarninfodebugtracefatalFor details, refer to https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_log_messages.htm.

The Prodly service retrieves the active control environment connection information from the dev hub control org. If not found, the service returns an error and terminates.

The scratch and dev hub org connections are based on access tokens only. You cannot use refresh tokens. This requirement means the session settings you configure in the environments apply. Any deployment running for longer than the session timeout terminates on next connection access.

For any deployment involving the dev hub org, the plugin uses the control environment connection from Prodly as the control environment connection for the actual deployment, not the dev hub org connection from DX. The user who created the control environment connection in Prodly can be different than the user who authenticated the dev hub org in Salesforce DX.

The plugin uses the DX dev hub connection to query for connections and insert the result, and uses the DX dev hub connection as the source connection when the source environment is also the control environment. The Prodly service uses the control environment connection to report results and the source connection to query for data and metadata.

Prodly service inserts deployment result record into your control environment. Monitor the deployment and view the results in the Prodly app on the Deployment Results tab.