Loading
Salesforce now sends email only from verified domains. Read More
Context Service
Migrate Context Definitions

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

Available in: Lightning Experience
Available in: Developer, Enterprise, Professional, and Unlimited editions for Industries clouds where Context Service is enabled

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.

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
    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
Important
  • You can’t deploy context definitions between orgs using 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. Ensure 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
    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
    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.
 
Loading
Salesforce Help | Article