> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# deploySalesforceSFDX

> Deploys a Salesforce artifact to a Salesforce Organization or sandbox using the Salesforce CLI. This plugin operation requires to be installed on the

Deploys a Salesforce artifact to a Salesforce Organization or sandbox using the Salesforce CLI. This plugin operation requires [sfdx](https://developer.salesforce.com/tools/sfdxcli) to be installed on the endpoint where the project will be executed.

Supports both Full and Package-Based Deploy projects. Deploys a FlexDeploy Salesforce zip file from the `FD_ARTIFACTS_DIR`. This file must have been created by the BuildSalesforce operation.

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Salesforce Account Code</td><td>`FDSF_ACCOUNT_CODE`</td><td>Yes</td><td>Salesforce Account with all the required properties like User, Password, Client Id, etc</td></tr><tr><td>Salesforce Cli Path</td><td>`FDSF_CLI_PATH`</td><td>No</td><td>The Salesforce CLI Path. (Eg: C:\Program Files\Salesforce CLI\bin)</td></tr><tr><td>Salesforce API Version</td><td>`FDSF_API_VERSION`</td><td>No</td><td>The Salesforce API version to target.Specifies the Salesforce API version to use(e.g., 64.0, 63.0)..**Since version 9.0.0.8**, This property is optional. If left blank, FlexDeploy will automatically detect and use the latest supported API version from your Salesforce Org at runtime using a REST API call - up to the maximum version supported by both your Salesforce organization and FlexDeploy.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Check Only</td><td>`FDSF_INP_CLI_CHECK_ONLY`</td><td>No</td><td>Check to only validate the deployment. Uncheck to complete the deployment normally.Uses the "--checkonly" parameter while executing the command.</td></tr><tr><td>Artifact Test Level</td><td>`FDSF_INP_ARTIFACT_TEST_LEVEL`</td><td>No</td><td>Test Level for current artifact/package. Overrides Test Level set for the package.Accepted values are NoTestRun, RunSpecifiedTests, RunLocalTests and, RunAllTestsInOrg.Uses the --testlevel" parameter while executing the command.</td></tr><tr><td>Artifact Tests</td><td>`FDSF_INP_ARTIFACT_TESTS`</td><td>No</td><td>Tests for current artifact/package. Overrides Tests set for the package.Only used when the Test Level input is set to RunSpecifiedTests.Uses the "--runtests" parameter while executing the command.</td></tr></tbody></table>

# Outputs

<table><colgroup><col /><col /><col /></colgroup><tbody><tr><th>**Output Name**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>`FDSF_DEPLOYMENT_ID`</td><td>No</td><td>Outputs the deployment id so that it can be used in other operations or to look up the status of the deployment in the Salesforce UI</td></tr><tr><td>`FDSF_OUT_NUMBERTESTFAIL`</td><td>No</td><td>Number Test cases Fail</td></tr><tr><td>`FDSF_OUT_NUMBERTESTSUCCESS`</td><td>No</td><td>Number Test cases Success</td></tr><tr><td>`FDSF_OUT_NUMBERTESTRUN`</td><td>No</td><td>Number Test cases Run</td></tr><tr><td>`FDSF_OUT_TESTPERCENTAGE`</td><td>No</td><td>Test Percentage</td></tr><tr><td>`FDSF_OUT_CODECOVERAGEPERCENTAGE`</td><td>No</td><td>Code Coverage Percentage</td></tr></tbody></table>

# Artifacts 

This operation consumes artifacts from the artifacts repository.

# Endpoint Selection

This operation will select all available endpoints associated to the Target.

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.
