---
updatedAt: 2025-06-16T23:19:16.000Z
agentTools:
  projectIndex: https://developers.directscale.com/llms.txt
---

# Building and Deploying

Admin: **Corporate Admin**
Page: **Administration** >  **Deployment**
URL:  {client_ID}.corpadmin.directscale.com/Corporate/Admin/Deployment
Permission: [*ViewAdministration()*](https://help.directscale.com/hc/en-us/articles/360049588994-Assigning-Employee-Corporate-Admin-Permission-Roles)

Once you've created your custom code and committed it to GitHub, you can now Build and Deploy it.

***

***

# Accessing the Page

If you can't access the **Deployment** page, it may need to be enabled:

1. [Contact Customer Care](https://help.directscale.com/hc/en-us/requests/new).
2. Request to enable the **Deployment** page in **Corporate Admin**.

> ⚠Important
>
> Only enable the **Deployment** page when you have Extension code ready to commit, or errors may occur.

Suppose the page is enabled and you still can't access it. In that case, you may need [the *ViewAdministration()* permission enabled for your Role by your Corporate Administrator](https://help.directscale.com/hc/en-us/articles/360049588994-Assigning-Employee-Corporate-Admin-Permission-Roles).

***

***

# Testing Code Before Deploying

> ❗Warning
>
> You should always test your code on your *Stage* environment first. Attempting to Deploy any code with errors can break vital functionality.

1. In GitHub, push your changes to Master.
2. On your *Stage* environment (`corpadmin.directscalestage.com`), navigate to the **Deployment** page.
3. [**Queue a New Build**](#building-a-new-artifact). If your build fails, then there were errors in your code. See [Failed Builds](#failed-builds).
4. Resolve any errors.
5. When ready, you can [Deploy to Live](#deploying-to-live).

***

***

# Building a New Artifact

1. On the **Deployment** page, you may see all your previous builds from GitHub.

   ![Deployment page](https://lxteam.blob.core.windows.net/images/Resources/extensions-module/deployment%20page.png)

2. Click **Queue New Build** to add a new build artifact. This queues the build across all environments (*Stage*/*Live*).

   ![Queue New Build button](https://lxteam.blob.core.windows.net/images/Resources%2Fextensions-module%2Fque-new-buld.png)

3. [Test your code on Stage](#testing-code-before-deploying).

***

***

# Failed Builds

If your build fails, then there were errors in your code.

![Failed builds link](https://lxteam.blob.core.windows.net/images/DevSite/ClientExtension/failed%20builds%20link.png)

1. Click the **Failed** link to open a modal where you can view the errors. Each error indicates at which class and line number the error occurred.

   ![Build Errors pop-up](https://lxteam.blob.core.windows.net/images/DevSite/ClientExtension/build%20errors%20popup.png)

> ✅Tip
>
> If you refresh the page in the browser after the build fails, you’ll get an Extension Load Log that provides you more context to the errors.\
> 2\. Locate the errors in your code.\
> 3\. When committed and ready to go, you can return to the **Deployment** page and [queue a new build](#building-a-new-artifact).

> 📘Note
>
> Many deployment errors on the Extension are caused by dependency registration. For example, suppose you register your Hooks/APIs in the wrong order, and one is dependent on another. In that case, the build will fail unless the dependent one is listed first.

***

***

# Deploying to Live

> 📘Note
>
> The Build only Deploys to the current environment. Log in to each environment and deploy manually.

1. Click **Deploy**.  This queues the pipeline, and your new version is ready to use.

   ![Deploy button](https://lxteam.blob.core.windows.net/images/Resources%2Fextensions-module%2Fdeploy.png)
2. The currently deployed version displays at the top right of the page:

   ![Build version](https://lxteam.blob.core.windows.net/images/DevSite/ClientExtension/deployment%20version.png)

***

***

# Rollback

Old code is better than broken code, so if you've made a mistake, you can always roll back to an older version.

> ⚠Important
>
> Always [deploy in your *Stage* environment first](#testing-code-before-deploying).

On the **Deployment** page:

1. Use the table to locate the version to which you want to revert.
2. Click **Deploy**.