# CodeScan and Flosum Integration

## About Flosum <a href="#about-flosum" id="about-flosum"></a>

**Flosum** is a release management tool for the Salesforce platform. Flosum users can now integrate CodeScan in their deployments to achieve secure, error-free releases.

{% hint style="info" %}
**Note**: Flosum cannot be integrated with On-Premises/Self-Hosted versions of CodeScan.
{% endhint %}

## How to Integrate Flosum with CodeScan <a href="#how-to-integrate-flosum-with-codescan" id="how-to-integrate-flosum-with-codescan"></a>

1. **Install CodeScan.**&#x20;
   1. Obtain the CodeScan package URL from your Flosum Customer Success Manager.&#x20;
   2. Install the CodeScan package in your Flosum organization.&#x20;
   3. After installation, click on the app launcher and open Flosum-CodeScan.

<figure><img src="/files/xWxKIGfm0SYdAYjZwYGf" alt=""><figcaption></figcaption></figure>

2. **Authorize** CodeScan.

   * Go to the **Authorization** tab in Flosum-CodeScan.<br>

     <figure><img src="/files/1gP88w4xTjpjP64MuTEd" alt=""><figcaption></figcaption></figure>

   * Enter the following details to sync CodeScan with your Flosum organization.
     * **CodeScan URL**: Use the appropriate URL for your CodeScan instance:
       * **US** region: [*https://app.codescan.io*](https://app.codescan.io)
       * **EU** region: [*https://app-eu.codescan.io*](https://app-eu.codescan.io)
       * **AUS** region: [*https://app-aus.codescan.io*](https://app-aus.codescan.io)
     * **Organization Key**: Obtain this key from your hosted CodeScan instance.
     * **Token**: Generate a token by navigating to **User > My Account > Security** in CodeScan. Set the token expiration or choose "no expiration."<br>

       <figure><img src="/files/Z472gHrLpRDVNhVkL8CU" alt=""><figcaption></figcaption></figure>
3. **Flosum Branch Configuration**:
   1. On the **Branch Configuration** tab, choose the branch you want to scan.
      * Select all or specific component types from the six supported profiles:
        * Aura
        * Lightning
        * Apex Class
        * Apex Triggers
        * Apex Page
        * Component
      * Check the boxes for the components you want to scan and click **Save**.<br>

        <figure><img src="/files/ec0tx8y3TezpdQ9Aw8Ms" alt=""><figcaption></figcaption></figure>
4. **Finalize Setup**:&#x20;
   * Log in to CodeScan and confirm that your branch is populated in the CodeScan server. <br>

     <figure><img src="/files/EE0O7WRRyvAqgtxRfq5g" alt=""><figcaption><p>Confirm branch population</p></figcaption></figure>
   * Select the branch, click **Add Analysis Project**, and attach it as a webhook.<br>

     <figure><img src="/files/bySUE1tvKckXVcnpw6ra" alt=""><figcaption><p>Attach Analysis to Project</p></figcaption></figure>

     <figure><img src="/files/DsuGBDFVoYQjtJ3n2X33" alt=""><figcaption><p>Attach Analysis to Webhook</p></figcaption></figure>

## Initiating a Scan on the Flosum Branch

1. **Branch Sync**:
   * Add the **Branch Sync** lightning component to your branch's Lightning record page.
   * Click the **Branch Sync** button to trigger the static code analysis.<br>

     <figure><img src="/files/Qr91vejXv9E0fyQvPs87" alt=""><figcaption></figcaption></figure>
2. **View Project Analysis**:
   * Go to the **Project Analysis** page to see the analysis in progress.<br>

     <figure><img src="/files/Qx2ROpzcXHOyopmyyQLa" alt=""><figcaption></figcaption></figure>

Your Flosum-CodeScan integration is complete!


---

# 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/codescan/codescan-integration/flosum/codescan-and-flosum-integration.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.
