---
schema_version: "1"
id: aa54a414c2a4c7be95f97914a19fab1398fa43a73588f36854d9eb96f7048b0e
title: Migrate Context Definitions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/context_service_context_definitions_packages.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.context_service_context_definitions_packages.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3994147b245f2b183a75a17de427442aaea517f33bc3fdf2673182229e454150
description: Create context definitions and add individually or as a bundle into a single package. To migrate, deploy and use the package in another organization. Context definition packages make your custom objects and fields portable across organizations.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Migrate Context Definitions

Create context definitions and add individually or as a bundle into a single package. To migrate, deploy and use the package in another organization. Context definition packages make your custom objects and fields portable across organizations.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Developer</strong>, <strong>Enterprise</strong>, <strong>Professional</strong>, and <strong>Unlimited</strong> editions for Industries clouds where Context Service is enabled</td></tr></tbody></table>

To create a package, create one or more context definitions and then create custom nodes, attributes, and tags so each node and attribute consumes the right data. Use Package Manager to create a package and add your context definitions to it. To migrate, you deploy the package in any organization where Context Service is enabled.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-context_service-264-0-0-production-enus/e9dc37f3-cb53-4bc1-be8b-b6873099d0be/images/icon_important.png)

Important When you create a context definition package, Package Manager automatically includes all custom objects and custom fields associated with the context definition, and you can't remove or exclude them from the package. If the target org already contains custom objects or custom fields with the same API names, deploying the package fails with a duplicate component error. If your context definition references custom objects or custom fields that might already exist in the target org, use Metadata API with the `ContextDefinition` metadata type to deploy the context definition instead of using a package.

## Supported Deployment Scenarios for Extended Context Definitions

- Between Orgs of the Same Release Version: You can deploy context definitions from one org to another if both orgs use the same Salesforce release version.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-context_service-264-0-0-production-enus/e9dc37f3-cb53-4bc1-be8b-b6873099d0be/images/icon_note.png)
    
    Note You can deploy context definitions from a Winter '26 org to a Spring '26 org.
- Adding Custom Nodes, Attributes, and Mappings: You can add new custom nodes, attributes and their corresponding mappings to existing context definitions during a deployment.
- Updating and Deleting Custom Mappings for Deactivated Context Definitions: You can update or delete existing custom mappings for Context Definitions.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-context_service-264-0-0-production-enus/e9dc37f3-cb53-4bc1-be8b-b6873099d0be/images/icon_important.png)

Important

- You can’t deploy context definitions between orgs that use different Salesforce release versions. You can't deploy context definitions from a Spring '26 org to a Winter '26 org.
- You can't update or delete custom nodes or attributes in active context definitions in the target org during a deployment.
- You can’t deactivate a context definition during a deployment. You must deactivate a context definition manually outside the deployment process.
- When a definition is deactivated, the deployment replaces all custom artifacts of the definition in the target org with the artifacts from the source org.

## Deploying Context Definitions with Referencing Applications

When other metadata layers or applications use your context definitions, you must deploy them in the correct order to avoid errors. Always start with the lowest layer first and then move up one layer at a time.

1. Deploy context definitions: As context definitions are foundational components, deploy them first to the target org. Make sure that all your context definitions are present and active in the target org before deploying other components that rely on them.
2. Deploy dependent components: After the context definitions are deployed to the target org and activated, deploy the applications or metadata components that reference the context definitions.

- **[Prepare a Context Definition Package from Source Organization](https://help.salesforce.com/s/articleView?id=ind.context_service_prepare_package.htm&release=264.0.0&type=5)**  
    Create a new package with your context definitions, or upload an existing package with their associated context definitions to reuse them in other organizations. When creating a context definition package, the custom objects and fields associated with the context definition are automatically included in the package.
- **[Deploy a Context Definition Package to Target Organization](https://help.salesforce.com/s/articleView?id=ind.context_service_install_use_package.htm&release=264.0.0&type=5)**  
    Use Package Manager to build custom packages with selected context definitions. After you upload the package, the installation URL is available in Version Detail. The installation URL prompts the user to log in to the subscriber org and then enables them to install the package in any org and enable it when ready.