# Pipeline Operation: Deploy

The **Deploy** operation moves changes from one Salesforce org to another. It can be added as a pipeline step, either as the primary deployment or as part of a larger automated workflow.

Deploy steps can be configured with:

* **Target organization** (where the deployment will go).
* **Run tests** (default or custom test options).
* **Next step** (define what happens on success or failure).

#### Creating Deploy Step <a href="#creating-deploy-step" id="creating-deploy-step"></a>

1. Navigate to **Pipelines** and create a new pipeline or edit an existing one.
2. Under the **Overview** tab, click the + button between **Start** and **Stop**.
3. In the configuration panel, enter:
   * **Name**: e.g., *Deploy to Dev Org*.
   * **Operation**: Select Deploy.
   * **Target organization**: Choose the connected org (e.g., *Source–Sandbox*).
   * **Run tests:** Select the test option (default or custom).
   * **Next step**: Define behavior:
     * On pass → Continue (e.g., to next step or Stop).
     * On fail → Define rollback or stop.
4. Click **Add**.

***Example***: A Deploy step was created targeting *Source–Sandbox*, with both On pass and On fail set to *Stop*.

<div data-with-frame="true"><figure><img src="https://docs.revvy.io/~gitbook/image?url=https%3A%2F%2F599358484-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FlcWbuZareqS9jci4Vs22%252Fuploads%252FZqDhwLVweH9nsX55ZYXS%252Fimage.png%3Falt%3Dmedia%26token%3D487fbdb5-38a0-41bd-a268-0cf34284d4bc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d95dab38&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://docs.revvy.io/~gitbook/image?url=https%3A%2F%2F599358484-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FlcWbuZareqS9jci4Vs22%252Fuploads%252FdWGrhmyANZzFSc95GZrs%252Fimage.png%3Falt%3Dmedia%26token%3Dbbf13795-d26d-4f8c-b8f6-e589c7b5280b&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=3d517724&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

#### Running the Deploy Pipeline <a href="#running-the-deploy-pipeline" id="running-the-deploy-pipeline"></a>

1. Once the step is added, the pipeline diagram updates to show **Start → Deploy → Stop.**
2. Click **Run pipeline** in the top-right corner.
3. The system executes the deployment to the selected target org.

The pipeline now visually reflects the Deploy action as part of the flow.

<div data-with-frame="true"><figure><img src="https://docs.revvy.io/~gitbook/image?url=https%3A%2F%2F599358484-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FlcWbuZareqS9jci4Vs22%252Fuploads%252Fqbl4f3Q7Mkiu3DOnWkB9%252Fimage.png%3Falt%3Dmedia%26token%3Dc1198a32-3a15-4139-8a16-51ecc5e97099&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=62e3f082&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

#### Viewing Deployment Results <a href="#viewing-deployment-results" id="viewing-deployment-results"></a>

After running the pipeline, results are logged in the **Activities** tab of the related branch.

* **Jobs** section shows:
  * **Type**: *Deploy*
  * **Status**: *Completed* (with timestamp and duration).
  * **Created by**: User or system.
* **Pipelines** section shows:
  * **Pipeline name** (e.g., *Dev Pipeline*).
  * **Status**: *Completed*.
  * **Execution duration.**

***Example*****:** A deployment executed on Oct 8, 2025, completed in 5 seconds and was marked successful in both Jobs and Pipelines logs.

<div data-with-frame="true"><figure><img src="https://docs.revvy.io/~gitbook/image?url=https%3A%2F%2F599358484-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FlcWbuZareqS9jci4Vs22%252Fuploads%252FzFeV8F48tPEX3yjIcddG%252Fimage.png%3Falt%3Dmedia%26token%3D990bd14d-cbc0-47b4-8b60-86e6870c38b9&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=977f91f1&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://docs.revvy.io/~gitbook/image?url=https%3A%2F%2F599358484-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FlcWbuZareqS9jci4Vs22%252Fuploads%252FP6lpF6rVj5xEVozyucdw%252Fimage.png%3Falt%3Dmedia%26token%3D91d78c42-ef6a-4859-87db-f7ca74103c96&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=252bcb1&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

#### Best Practices <a href="#best-practices" id="best-practices"></a>

* Always validate in a lower environment before deploying to higher ones.
* Use conditional next steps (Rollback, Stop) to handle failures automatically.
* Monitor the **Activities** **tab** after each deployment to track status and logs.
* Pair Deploy steps with **Run Tests** for better confidence.
