---
schema_version: "1"
id: c27a8018eb6a8e597d9f98fde67dd19745f71416de88828660b013182e8c2137
title: "Apex: New and Changed Items"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_apex_nc.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 13846c05c91b863c906988668079d021397ddf7314efb3ef6f5c87197bc2f7c9
description: These classes, enums, and interfaces are new or have changes.
products:
  - Cross Cloud
release: "262"
---
# Apex: New and Changed Items

These classes, enums, and interfaces are new or have changes.

For more information on these enhancements, see the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/) and the [Apex Reference Guide](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/).

- **[ConnectApi Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The ConnectApi namespace (Connect in Apex) has new or changed classes, methods, or enums.
- **[Context Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The Context namespace has this new method.
- **[DocumentAI Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The DocumentAI namespace has these new classes.
- **[hlthcrbilling Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The hlthcrbilling namespace has these new classes.
- **[Invocable Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The Invocable namespace has these new or changed classes, methods, interfaces, enums, or exceptions.
- **[Messaging Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The Messaging namespace has these new methods.
- **[CommercePayments Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The CommercePayments namespace has these new or changed classes, methods, interfaces, enums, or exceptions.
- **[sfsqlquery Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The sfsqlquery namespace has these new classes and methods.
- **[System Namespace](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=262.0.0&type=5)**  
    The System namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

## ConnectApi Namespace

The ConnectApi namespace (Connect in Apex) has new or changed classes, methods, or enums.

Many Connect REST API resource actions are exposed as static methods on Apex classes in the `ConnectApi` namespace. These methods use other `ConnectApi` classes to input and return information. The `ConnectApi` namespace is referred to as _Connect in Apex._

For the new and changed ConnectApi classes, methods, and enums, see [ConnectApi (Connect in Apex): New and Changed Classes and Enums](https://help.salesforce.com/s/articleView?id=release-notes.rn_connect_in_apex.htm&release=262.0.0&type=5 "Create custom experiences in Salesforce using Connect in Apex.").

## Context Namespace

The Context namespace has this new method.

### New Method in Existing Class

Delete records from a context session

Use the new `deleteRecords()` method on the existing `IndustriesContext` class.

## DocumentAI Namespace

The DocumentAI namespace has these new classes.

### New Classes

Represent errors and additional contextual information generated during Document AI processing

- Use the `Error` class.
- Use the `ExtractionMetadata` class.

Configure duplicate detection rules and object-specific entity settings for processing extracted data

- Use the `DuplicateRuleConfiguration` class.
- Use the `DuplicateObjectConfiguration` class.
- Use the `ObjectConfig` class.

Manage input and output payloads for the Document AI post-transform process

- Use the `PostTransformInput` class.
- Use the `PostTransformResult` class.

Handle structured nodes and field-level attributes extracted from documents, including matching record details

- Use the `Node` class.
- Use the `Attribute` class.
- Use the `MatchingRecord` class.

Process input and capture results for the Document AI post-save workflow

- Use the `PostSaveInput` class.
- Use the `PostSaveResult` class.
- Use the `SavedRecordDetail` class.

Schedule batch jobs for Document AI processing

Use the `BatchProcessor` class.

## hlthcrbilling Namespace

The hlthcrbilling namespace has these new classes.

### New Classes

Capture billing information for products in Salesforce Health Cloud

- Use the `ProductBillingDetails` class to manage billing details for ordered products, including account, work type, and shipping address information.
- Use the `ProductDetails` class to represent individual product line items, including price book entries, quantities, and pricing attributes.

## Invocable Namespace

The Invocable namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

### New Classes

Get metadata about an invocable action

Use the `getCategory()`, `getDescription()`, `getInputs()`, `getOutputs()`, and `getTargetEntityName()` methods in the new Action.DescribeResult class.

Get metadata about input parameters used by an invocable action

Use the `getAdditionalAttributes()`, `getApexClass()`, `getName()`, `getPicklistValues(`, and `getType()` methods in the new Action.InputParameterclass.

Get metadata about output parameters returned by an invocable action

Use the `getCategory()`, `getDescription()`, `getInputs()`, `getOutputs()`, and `getTargetEntityName()` methods in the new Action.OutputParameter class.

Get metadata about generic type parameters that can be used with an invocable action

Use the `getDescription()`, `getLabel()`, `getName()`, and `getSuperType()` methods in the new Action.GenericType class.

Get metadata about additional attributes associated with an invocable action

Use the `getApexClass()`, `getDataType()`, `getIsCollection()`, `getName()`, and `getValue()` methods in the new Action.AdditionalAttribute class.

Get metadata about values in a picklist used by an invocable action parameter

Use the `getActive()`, `getDefaultValue()`, `getLabel()`, `getValidFor()`, and `getValue()` methods in the new Action.PicklistValue class.

### New or Changed Methods in Existing Classes

Return metadata for an invocable action

Use the new `getDescribe()` method of the existing Action class.

Get the version of an invocable action

Use the new `getVersion()` method of the existing Action class. This method was introduced in API version 66.0 and has been added to the Apex Reference Guide.

## Messaging Namespace

The Messaging namespace has these new methods.

### New or Changed Methods in Existing Classes

Set custom headers

Use the new `setCustomHeaders(customHeaders)` method on the existing SingleEmailMessage class to attach custom metadata headers to an outgoing email. Header names must be prefixed with `X-SFDC-X-` and comply with RFC 822 and RFC 5322 specifications.

Get custom headers

Use the new `getCustomHeaders()` method on the existing `SingleEmailMessage` class to retrieve the map of custom headers previously set on the email. Returns null if no custom headers were set.

## CommercePayments Namespace

The CommercePayments namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

### New Classes

Specify enhanced payment data, including Level 2 and Level 3 fields associated with the payment

Use the `EnhancedPaymentDataInput` class.

Specify the list of individual line items associated with the payment

Use the `LineItemInput` class.

### New or Changed Properties in Existing Classes

Capture enhanced payment data, including Level 2 and Level 3 fields

Use the new `enhancedPaymentData` property of the existing `SaleRequest` class.

Capture ID of the source that initiated the payment

Use the new `paymentInitiationSourceId` property of the existing `SaleRequest` class.

Authorize Saved Payment Methods for Commerce Subscriptions with Third-Party Gateways

Use the new `paymentMethodData` property of the existing `AuthorizationRequest` class.

#### See Also

- [_Apex Developer Guide_: CommercePayments Namespace](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercepayments.htm)
- [_Connect REST API_: SaleInputRepresentation](https://developer.salesforce.com/docs/commerce/salesforce-commerce/references/rn_b2b_d2c_comms?meta=Summary)

## sfsqlquery Namespace

The sfsqlquery namespace has these new classes and methods.

### New Classes

Access Data 360 SQL query results from a saved query ID

Use the create(), toString(), withOffset(), and withWorkloadName() methods in the new QueryHandle class.

Access typed column values from Data 360 SQL query results

Use the getBoolean(), getColumnIndex(), getDate(), getDateTime(), getDecimal(), getDouble(), getInteger(), getList(), getLong(), getObject(), getRawRow(), getString(), getTime(), and toString() methods in the new Row class.

Execute Data 360 SQL queries in Queueable Apex

Use the cancel(), chainNextJob(), getColumnNames(), getMetadata(), getPageOutput(), getQueryId(), getRows(), processDataChunk(), and toString() methods by extending the new SqlQueueable class.

Execute synchronous Data 360 SQL queries

Use the cancel(), getColumnNames(), getMetadata(), getQueryId(), hasNext(), iterator(), next(), and toString() methods in the new SqlRowIterator class.

Build and execute Data 360 SQL query statements

Use the create(), execute(), toString(), and withWorkloadName() methods in the new SqlStatement class.

Mock Data 360 SQL query responses in tests

Use the clearMocks(), enqueueMockRows(), isRunningTest(), setMockMetadata(), and setMockRows() methods in the new SqlTester class.

#### See Also

- [_Salesforce Developers_: sfsqlquery Namespace](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_sfsqlquery.htm)
- [_Salesforce Developers_: Queueable Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm)

## System Namespace

The System namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

### New Classes

Run integration tests with Agentforce and Data 360 services

Use the new `IntegrationTest` class.

### New or Changed Methods in Existing Classes

Use improved interpolation for single and multiline strings

Use the new `template()` instance method on the existing `String` class.