# Usage

### A. Create Pre-validation Request

Create a pre-validation request to commit from your local [version control](https://www.autorabit.com/7-tips-for-salesforce-version-control-integration/) repository.

<figure><img src="/files/EdrAzCgklmwpUw8gQr07" alt="Pre-validation request creation in VSCode Extension"><figcaption><p>Creating a pre-validation request</p></figcaption></figure>

### B. Stage Changes

#### Stage all changes

<figure><img src="/files/Q1AjWFRUaKBgltycAybH" alt="Staging all changes in VSCode Extension"><figcaption><p>Stage all changes</p></figcaption></figure>

#### Stage changes for a file

<figure><img src="/files/81dPEPTX44XrNYfbWg3O" alt="Staging changes for a single file in VSCode Extension"><figcaption><p>Stage changes for a file</p></figcaption></figure>

#### Stage selective line of code

<figure><img src="/files/uYVxTLZfvGYQzZmvUU2W" alt="Staging selected lines of code in VSCode Extension"><figcaption><p>Stage selective line of code</p></figcaption></figure>

### C. Submit Pre-validation Request

While submitting the pre-validation request, you may choose the following criteria as pre-checks:

1. Generate Diff Report
2. Run Static code analysis
3. Validate deployment

#### Generate Diff report

AutoRABIT compares the metadata between the source org and the destination branch and generates a metadata difference report. The diff report shows a summary of metadata component differences between the org and the branch.

#### Run Static code analysis

[Static code analysis](https://www.codescan.io/blog/what-is-salesforce-static-code-analysis/) detects data flow problems, software defects, language implementation errors, inconsistencies, dangerous usage, coding standard violations, and security vulnerabilities, if any.

#### Validate Deployment

AutoRABIT performs a check-only deployment to your selected org/branch. Nothing is deployed; however, if the deployment fails or tests do not pass, the issues will be clearly shown so they can be resolved.

<figure><img src="/files/upWOwqP1Oejaawxo8UiA" alt="Pre-validation request options in VSCode Extension"><figcaption><p>Submit pre-validation with selected checks</p></figcaption></figure>

### D. Commit approved pre-validation request

Commit the code once the pre-validation request has been approved.

<figure><img src="/files/JUDv8EqaSkTnbTB8f3RV" alt="Committing approved pre-validation request in VSCode Extension"><figcaption><p>Commit approved request</p></figcaption></figure>

### E. View Pre-validation Requests

#### Diff Report

<figure><img src="/files/XTmTxmIPnBvAs10ojC98" alt="Viewing diff report in VSCode Extension"><figcaption><p>Diff Report</p></figcaption></figure>

#### Static Code Analysis Report

<figure><img src="/files/LSLuMO5As2LxC4ayFjG9" alt="Viewing static code analysis report in VSCode Extension"><figcaption><p>Static Code Analysis Report</p></figcaption></figure>

#### Validate Deployment Report

<figure><img src="/files/EDhC3ftekQqcGeWVSMfT" alt="Viewing deployment validation report in VSCode Extension"><figcaption><p>Validate Deployment Report</p></figcaption></figure>

### F. Trigger Build

This extension also allows developers to trigger builds once the code is committed. Actions like Quick Deploy and Abort are available for each build.

<figure><img src="/files/OZCUJbIzAPFRUPdI0Lgr" alt="Triggering builds using VSCode Extension" width="563"><figcaption><p>Triggering a build</p></figcaption></figure>

### G. Deployments

Use the extension to view results for pre-validations, builds, and deployments.

<figure><img src="/files/hCCXIvQw9uR1jafDoQ6H" alt="Viewing deployment results in VSCode Extension" width="563"><figcaption><p>Viewing deployments</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/arm-1/integration-and-plugins/visual-code-extension/working-with-vscode-extension.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
