---
schema_version: "1"
id: cdde06025a711e9dfee9dbd393efa376d9dbe3f522b25eb017589ac612173939
title: Code Extension
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_code_extension.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_code_extension.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 97dfeccfdfb376505966c029fb7d5110e8ee5ea4f3729aaa41ab128f129b066a
description: Bring your custom Python code into Data 360 to extend Data 360's native capabilities by using code extension. If the native Data 360 features don't meet your business requirements, deploy your custom logic to supported Data 360 features.
products:
  - Data 360
release: "264"
---
# Code Extension

Bring your custom Python code into Data 360 to extend Data 360's native capabilities by using code extension. If the native Data 360 features don't meet your business requirements, deploy your custom logic to supported Data 360 features.

Code extension supports two types of custom code, which differ in how they run.

- Scripts run as a batch data transform—a job that you run on demand or schedule.
- Functions run as part of the search index pipeline, where they control how content is chunked for search and AI retrieval.

The code extension workflow involves collaboration between developers and users with a Data Cloud Architect permission set. Developers author and validate custom Python code locally by using Salesforce CLI with the Code Extension plugin and the Data Custom Code Python SDK as the toolchain. Then they prepare it for deployment.

Data 360 users manage code execution, monitoring, and migration from a sandbox to production. In a sandbox, upload custom code packages and use the custom code in the relevant Data 360 feature—a batch data transform for a script, or a search index for a function—then run it. Monitor deployment status, execution history, and logs. After validation, package the custom code and dependencies into a data kit. In production, install the data kit, run the custom code to process production data, and monitor execution.

- **[Billing Considerations for Code Extension](https://help.salesforce.com/s/articleView?id=data.c360_a_billing_considerations_code_extension.htm&release=264.0.0&type=5)**  
    Using code extension in Data 360 impacts the consumption of credits used for billing for orgs operating Data 360 under a Data Cloud license.

#### See Also

- [_Salesforce Developer Help_: Code Extension in Data 360](https://developer.salesforce.com/docs/data/data-cloud-code-ext/guide/use-custom-code.html)