Apex Reserved Keywords

Learn about External Service's support for Apex reserved keywords.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions

Although not a best practice, External Services doesn’t prohibit schema entities with the same name as the Apex reserved keywords. If your schema name conflicts with an Apex reserved keyword, External Services creates a unique name by encoding it to be compatible with Apex identifier rules.

For example, you have an account object with property name type. Because the property name type conflicts with the Apex reserved keyword type, External Services encodes the property name type as z0type to make it Apex compliant. During callout, the property name type is used according to the original OpenAPI schema.

Special characters that aren’t valid Apex identifiers are UTF-8 encoded. For example,

5getOpen-bankingV2.2Atms

is encoded as

x35getOpenx2dbankingV2x2e2Atms

for a valid Apex identifier.

Although the character underscore “_” is a valid Apex identifier character, it’s UTF-8 encoded and is used for separating parts lexicographically defined in an External Services spec. For example,

fixed_array_of_AutoContext

includes the special character underscore “_”. The character underscore is used as a parts separator for External Services hierarchical object names. In this example, the character underscore is encoded as

fixedx5farrayx5fofx5fAutoContext 

for a valid Apex identifier. You don’t need to change the name in the schema, as External Services runtime translates this back to the character underscore when calling the service.