---
schema_version: "1"
id: 3cefde9395eda3153ca0a6d20144ac25dda26edf946be1e9c9716e49889c42e2
title: Deploy a Custom Function to Data 360 by Using UI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-code-ext/guides/function/deploy-custom-function.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/deploy-custom-function.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3abf13a5873135fbb2977412fe03580dd661b070ab569e14eb3f51820d635c8f
products:
  - Data 360 Code Extension Guide
  - Data 360 Developer Documentation
---
# Deploy a Custom Function to Data 360 by Using UI

Deploy your custom chunking function to Data 360 by packaging your Python code and its dependencies into a `.zip` file and uploading it through the Code Extension UI. After deployment, your function is available as a chunking strategy option in the search index builder.

| 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 deploy a custom function to Data 360: | Permission set: <ul><li>Data Cloud Architect</li></ul> |

## Prerequisites

- Write and validate your custom chunking function locally. See [Write a Custom Chunking Function](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/write-custom-chunking-function.md).

:::Note
To deploy with the Salesforce CLI, see [Deploy a Custom Function to Data 360 Sandbox by Using CLI](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/deploy-custom-function-cli.md).
:::

## Deploy a Custom Function

1. Go to your function package directory and create the deployment package if you have not already.

   ```bash
   cd <path-to-your-function-package>
   sf data-code-extension function scan --entrypoint ./payload/entrypoint.py
   sf data-code-extension function zip --package-dir ./payload
   ```

   Use the generated `.zip` file from your current directory for upload.

2. Go to Data Cloud Setup. Under Developer Tools, select **Code Extension**.

3. Click **New**.

4. On the first page, enter these details, and then click **Next**.

| Field                   | Description                                                                                                                                                                                                                                                                                          |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Deployment Name**     | A name for your deployment. This name helps you and your team identify the custom function in the Data 360 UI.                                                                                                                                                                                       |
| **Deployment API Name** | A unique identifier for your custom function deployment. The API name can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, and be no more than 40 characters. It cannot include spaces, end with an underscore, or contain two consecutive underscores. |
| **Description**         | A concise summary of what your chunking function does and its intended use.                                                                                                                                                                                                                          |

5. On the code details page, specify this information, then click **Next**.

| Field                    | Description                                                                                                                                                                                                                                                                                                                 |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Programming Language** | Select **Python**.                                                                                                                                                                                                                                                                                                          |
| **Code Type**            | Select **Function** so that your code customizes the chunking step of the search index feature.                                                                                                                                                                                                                             |
| **Use in Feature**       | Select **Search Index - Chunking** so that the deployed function appears as a chunking strategy option when you build a search index with Advanced Setup.                                                                                                                                                                   |
| **Compute Size**         | Select the compute size based on your expected workload and resource requirements. Larger sizes provide more vCPUs and memory but consume more credits. Choose the size that matches your chunking workload. The available options are: Standard - Large, Standard - X-Large, Standard - 2X-Large, and Standard - 4X-Large. To understand how the compute size affects the compute model and credit consumption, see [_Salesforce Help_: Billing Considerations for Code Extension](https://help.salesforce.com/s/articleView?id=data.c360_a_billing_considerations_code_extension.htm&type=5). |

6. Click **File Upload** and select your `.zip` file (for example, `deployment.zip`). You can also drag the file into the upload area.

   Use the dropdown options to remove or replace the uploaded file if needed.

7. Click **Submit Code** to deploy your function.

   Keep the window open until the modal closes on its own. Closing the modal early can cause the upload to fail and leave the deployment in an **Error** state.

## Next Step

[Use a Custom Chunking Function in a Search Index](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-chunking-in-search-index.md)

## See Also

- [Delete Custom Code Deployment](https://developer.salesforce.com/docs/data/data-cloud-code-ext/delete-deployed-code.md)
- [_Salesforce Help_: Billing Considerations for Code Extension](https://help.salesforce.com/s/articleView?id=data.c360_a_billing_considerations_code_extension.htm&type=5)
