# Configuring a Callout URL

{% hint style="info" %}
The **CI JOBS** screen is best viewed when the zoom setting is set to **80%** on your chrome/firefox browser.
{% endhint %}

### Overview <a href="#overview" id="overview"></a>

The callout URL lets you call another service from the ARM application via an HTTP request. For an HTTP callout to work correctly, all the HTTP callout parameters and the entities associated with the callout must be configured correctly.

### Where can I find Configure Callout URL option? <a href="#where-can-i-find-configure-callout-url-option" id="where-can-i-find-configure-callout-url-option"></a>

A new section, i.e., **Callout URL**, is available for the following CI jobs:

* **Deploy from Salesforce org**
* **Deploy from Salesforce org with a version control backup**
* **Deploy from version control**
* **Deploy Salesforce-DX (SFDX) source from** [**version control**](https://www.autorabit.com/blog/8-benefits-of-version-control-in-salesforce-development/)
* **Install an unlocked package from a version control branch**

### Configuring Callout URL <a href="#configuring-callout-url" id="configuring-callout-url"></a>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FOBnOgcNaN412vSiypI7U%2Fimage.png?alt=media&#x26;token=69e7636b-ba73-4b5c-aa73-eee19169a913" alt=""><figcaption></figcaption></figure>

1. Select the **Configure Callout URL** checkbox under the **Callout URL** section.
2. Choose the **Callout Type**:
   * **Pre-Deployment**: ARM performs the HTTP request before the deployment starts (after a successful build).
   * **Post-Deployment**: By default, ARM performs the HTTP request after the deployment completes. You can further specify:

     * **On Success**
     * **On Failure**

     <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FoHAxJsg4YCOop465P1dL%2Fimage.png?alt=media&#x26;token=a742dc8f-0084-437f-a425-2325f10c9023" alt=""><figcaption></figcaption></figure>
3. The callout method defaults to **POST**.
4. Enter the endpoint in the **URL** field.
5. Select an **Authorization** type:
   * **Basic**: Standard username and password.

     <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F5chtfHeSj1Z5BqwZc8qD%2Fimage.png?alt=media&#x26;token=77f8be8d-a803-4bd0-93b5-02ab47344e50" alt=""><figcaption></figcaption></figure>
   * **Custom**: Uses `username: API Token`. Prefix the token with the keyword `token`.

     <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FhEHGN9ofJHDHLZUPU8Xx%2FScreenshot%202024-10-31%20at%2012.18.51%E2%80%AFPM.png?alt=media&#x26;token=909a2de5-b6fe-42ac-b444-0e6898960aa4" alt="" width="563"><figcaption></figcaption></figure>
   * **OAuth**: Supports **Client Credentials** grant type. Required fields:
     * **URL** (OAuth 2.0 provider)
     * **Client ID**
     * **Client Secret** (hidden when editing an existing CI job)
     * **Access Token URL**
     * **Scope** (optional)
     * **Grant Type**: Defaults to **Client Credentials**
6. The **Content-Type** header defines the request body format (e.g., JSON or XML):

   * Use `application/json` for JSON requests.
   * Use `application/xml` for XML requests.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FvUGhh9gzSJYynDhwcYHD%2Fimage.png?alt=media&#x26;token=c9cfa59f-6daa-424b-96d9-97919189fd18" alt=""><figcaption></figcaption></figure>
7. To add custom headers, click **Add Header** and define key-value pairs. You can add multiple.

   * Default headers include:\
     `"Accept": "application/json", "Content-Type": "application/json"`

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FyAl85435iIk7s8BqL0ND%2Fimage.png?alt=media&#x26;token=bf763250-257f-47e4-afe2-a0aa601f9a5e" alt=""><figcaption></figcaption></figure>
8. Click **Save**.

### Dynamic Parameters <a href="#dynamic-parameters" id="dynamic-parameters"></a>

| Parameter       | Description                 |
| --------------- | --------------------------- |
| `{projectName}` | Name of your CI Job         |
| `{buildNumber}` | Build Number of your CI Job |
| `{sforgName}`   | Name of your Salesforce Org |

{% hint style="info" %}
**Note:** You must specify values for dynamic parameters before executing the query, and their types must match expected formats.
{% endhint %}

### Viewing the Log Report <a href="#viewing-the-log-report" id="viewing-the-log-report"></a>

#### Callout Type: Pre-Deployment <a href="#callout-type-predeployment" id="callout-type-predeployment"></a>

View detailed logs under the **Build Log** section.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FZwT58y86Fwqk9V0W5k2e%2Fimage.png?alt=media&#x26;token=a4c973dd-0d5c-42a1-a27a-f85c9052d9d6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FWWXpZNvKWL0XWxqX1EnF%2Fimage.png?alt=media&#x26;token=945fb2f2-c15e-4816-b316-8af63def8713" alt=""><figcaption></figcaption></figure>

#### Callout Type: Post-Deployment <a href="#callout-type-postdeployment" id="callout-type-postdeployment"></a>

Logs are available under the **Deployment Log** section.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCJGcDKHCqXiW7oZszrje%2Fimage.png?alt=media&#x26;token=cf422dc1-eabc-49b9-b3df-4ef02407ce85" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FbN8ybUWEOH8rimXNKyjT%2Fimage.png?alt=media&#x26;token=7fe14b79-fcb5-4835-b5f8-f3691d921eeb" alt=""><figcaption></figcaption></figure>
