---
schema_version: "1"
id: 6a89d4e336b4e28c87ca342f9fbd8ad568bb3f4cc3f51ad3e275c2b03c549930
title: Generate Apex Classes for Context Definitions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_ctx_flow_with_apex_for_context_definitions.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_ctx_flow_with_apex_for_context_definitions.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 41a2ca0876841713a4e00a325190c4d002a8d86c7acea1137f01b310105c208d
description: Create Apex classes from context definitions to mirror your definition's metadata and hierarchy in Salesforce Flow without coding.
products:
  - Cross Cloud
release: "262"
---
# Generate Apex Classes for Context Definitions

Create Apex classes from context definitions to mirror your definition's metadata and hierarchy in Salesforce Flow without coding.

**Where:** This change applies to Lightning Experience in Professional, Enterprise, Unlimited, and Developer editions where Context Service is enabled.

**Who:** To generate and manage the Apex classes, users need the Context Service Admin permission set. To use them in flows, users need the Context Service Runtime and Manage Flow permission sets.

**How:** Generate an Apex class for a context definition from the Context Definitions page in Setup. Then, in Flow builder, use Apex-defined variables to pass data to or from the definition-specific actions.

#### See Also

- [_Salesforce Help_: Apex-Defined Data Type](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_apex_type.htm&type=5&language=en_US)
- [_Salesforce Help_: Considerations for the Apex-Defined Data Type](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_apex_data_type.htm&type=5&language=en_US)