---
schema_version: "1"
id: 878ebe0fb68c17a27561a3deeb544dd24e19aacb9078e27ea15a54eb79f46cc3
title: Migrate Code Extension from Sandbox to Production by Using a DevOps Data Kit
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-code-ext/guides/migrate-code-to-prod.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/migrate-code-to-prod.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 872b89736ff024a71d7833d5955828d6c648e1d6b1c4bcd317502c975c9e656b
products:
  - Data 360 Code Extension Guide
  - Data 360 Developer Documentation
---
# Migrate Code Extension from Sandbox to Production by Using a DevOps Data Kit

Use a DevOps data kit to move code extension deployments or batch data transforms created by using code extension from sandbox to production. When you add a batch data transform created using code extension to your data kit, the associated code extension is automatically included in the data kit. When your code extension references either data lake objects or data model objects, you must manually add the referenced objects to the data kit.

| Edition Table                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Available in: **Developer**, **Enterprise**, **Performance**, and **Unlimited** Editions. See [Data 360 edition availability](https://help.salesforce.com/s/articleView?id=sf.c360_a_dc_editions.htm&type=5). |

| User Permissions Needed                                                                                            |                                                        |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| To migrate code extension deployments, batch data transforms, DLOs, or DMOs from a Data 360 sandbox to production: | Permission set: <ul><li>Data Cloud Architect</li></ul> |

## Prerequisites

1. Access to both sandbox and production Data 360 orgs with appropriate permission sets in both environments.

2. Enable Code Extension in Data Cloud Setup by using the Feature Manager. See [Enable Data 360 Features in Feature Manager](https://help.salesforce.com/s/articleView?id=data.c360_a_feature_manager.htm&language=en_US&type=5).

3. Validate your code extension deployments and batch data transforms created by using code extension in a sandbox. See [Run Code Extension](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/invoke.md).

## Step 1: Create a DevOps Data Kit and Add All Components

1. In your sandbox org, go to **Data Cloud Setup**.
2. Under **Developer Tools**, click **Data Kits**.
3. Click **New**.
4. For **Data Kit Type**, select **DevOps**.
5. Name the data kit and add an optional description, such as what it contains.
6. Save your changes.

7. Add code extension deployments, batch data transforms, or both to your data kit by using one of these options:
   - **Option 1: Add Data Transforms**
     1. Click **Add** next to Data Transforms, select the batch data transforms created by using code extension that you want to migrate, and click **Save**.
     2. When you add a batch data transform, the code extension it references is automatically included in the data kit.
     3. If your code extension references data lake objects or data model objects, you must manually add the referenced objects to the data kit (see steps 8–9).

   - **Option 2: Add Code Extension**
     1. Click **Add** next to Data Custom Codes, select your code extension deployments, and click **Save**.
     2. If your code extension references data lake objects or data model objects, you must manually add the referenced objects to the data kit (see steps 8–9).

   - **Option 3: Add Both Data Transforms and Code Extension**
     1. You can add both batch data transforms and code extension to the same data kit.
     2. Add code extension directly only if it's not already referenced by the batch data transforms you've added.
     3. If your code extension references data lake objects or data model objects, you must manually add the referenced objects to the data kit (see steps 8–9).

8. If your code extension references data model objects, click **Add** next to Data Models, select the DMOs that your code extension references, and click **Save**.

9. If your code extension references data lake objects, click **Add** next to Data Lake Objects, select the DLOs that your code extension references, and click **Next**. Then, click **Save**.

## Step 2: Review and Publish the Data Kit

1. Review the component list to ensure that all dependencies are included.
2. Check the publishing sequence to verify components deploy in the correct order: DLOs and DMOs deploy first, followed by code extension deployments, and then batch data transforms created by using code extension that reference them.
   **important:** If you add both batch data transforms and code extension to the same data kit, ensure the publishing sequence is correct. Code extension must deploy before any batch data transforms that reference it.
3. Click **Publish** to make the data kit available for deployment.

## Step 3: Add the Data Kit to a Package

For detailed instructions, see [Add the Data Kit to a Package](https://help.salesforce.com/s/articleView?id=data.c360_a_publish_package_kit.htm&type=5).

## Step 4: Deploy the Data Kit to Production

1. In your production org, go to **Data Cloud Setup** and click **Data Kits**.
2. Open your data kit, and click **Data Kit Deploy**.
3. To deploy the data kit, select a data space, and add the connection org details of the data bundle.
4. Click Deploy.

The deployments follow the order defined in the publisher org.
When you package and deploy DMOs in a data kit, their relationships and tags are automatically included if they are defined during the packaging process.

To check the deployment status, click Deployment History.
If a component fails during deployment, the process stops, and any subsequent components in the sequence aren’t deployed.

## Next Step

- [Invoke Code Extension by Creating a Batch Data Transform](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/create-batch-transform.md)
