ContextDefinition

Represents the details of a context definition that describe the relationship between the node structures within a context.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

This type extends Metadata and inherits its fields.

ContextDefinition components have the suffix .contextDefinition and are stored in the contextDefinitions folder.

Introduced in API version 59.0.

Enable the organization preference ContextDefinitionsEnabled to access the ContextDefinition metadata type.

  • Type: boolean
  • Required: No
  • Introduced: API version 63.0
  • Description: Indicates whether the context definition can be referred by other context definitions (true) or not (false).
  • Type: string
  • Required: No
  • Description: The name of the context definition that’s used to clone the current context definition.
  • Type: int
  • Required: No
  • Description: Duration to persist the data, which is loaded in the run-time context instances created by this context definition, in the cache.
  • Type: string
  • Required: No
  • Description: Description of the context definition.
  • Type: string
  • Required: No
  • Type: boolean
  • Required: No
  • Introduced: API version 63.0
  • Description: Indicates whether the context definition has system tags (true) or not (false).
  • Type: string
  • Required: No
  • Description: Name of the parent context definition that’s used to derive the current context definition.
  • Type: string
  • Required: No
  • Description: Version number of the parent definition that’s used to derive the current context definition.
  • Type: boolean
  • Required: No
  • Description: Auto-generated value that doesn’t impact the behavior of the metadata type.
  • Type: boolean
  • Required: No
  • Type: string

  • Required: Yes

  • Description: Required.

    User-friendly name for the context definition, which is defined when the context definition is created.

  • Type: string
  • Required: No
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the context definition.

Represents the SOQL (database) queries that fetch data for a chosen attribute from the input schema.

  • Type: string
  • Required: No
  • Description: Name of the parent context attribute hydration detail that’s used to derive the current context attribute hydration detail.
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the object used for the attribute hydration detail.

  • Type: string

  • Required: Yes

  • Description: Required.

    The SOQL query that is the source of the hydration.

Represents details of an attribute used to describe a context node. Each node can have one or many associated attributes.

  • Type: ContextTag[]
  • Required: No
  • Description: Shortened name of the attribute or node.
  • Type: boolean
  • Required: No
  • Type: ContextAttributeDataType (enumeration of type string)

  • Required: Yes

  • Description: Required.

    Type of data that’s stored in the context attribute.

  • Possible values:

    • boolean
    • currency
    • date
    • datetime
    • number
    • percent
    • picklist
    • reference
    • string
    • selfreference — Available in API version 63.0 and later.
  • Type: string
  • Required: No
  • Description: Description of the context attribute.
  • Type: string
  • Required: No
  • Description: Display name of the context attribute.
  • Type: string
  • Required: No
  • Description: List of node references to show the parent-child relationship between the nodes in a definition.
  • Type: ContextAttributeFieldType (enumeration of type string)

  • Required: Yes

  • Description: Required.

    List of node references to depict the parent-child relation between the nodes in a definition.

  • Possible values:

    • aggregate
    • input
    • inputoutput
    • output
  • Type: string
  • Required: No
  • Description: Name of the parent attribute that’s used to derive the current attribute.
  • Type: boolean
  • Required: No
  • Description: Indicates whether the attribute is a key attribute in the node (true) or not (false).
  • Type: boolean
  • Required: No
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the context attribute.

  • Type: boolean
  • Required: No
  • Introduced: API version 63.0
  • Description: Indicates if an attribute is skipped in context persistence (true) or not (false).
  • Type: boolean
  • Required: No
  • Description: Indicates whether the attribute identifies as a value in a node (true) or not (false).

Represents the relationship between the attributes defined in the context and the values in the related objects.

  • Type: ContextAttrHydrationDetail[]
  • Required: No
  • Description: Details of the SOQL (database) queries that fetch data for a chosen attribute from the input schema.
  • Type: string
  • Required: No
  • Description: Context attribute record associated with the context attribute mapping.
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the input attribute.

  • Type: CtxAttrHydrationCtx[]
  • Required: No
  • Description: Query that fetches data for a chosen attribute from the input schema for context-to-context mapping.
  • Type: string
  • Required: No
  • Description: Name of the parent context attribute mapping that’s used to derive the current context attribute mapping.
  • Type: string
  • Required: No
  • Description: A description of this component. The description should explain the component’s purpose and behavior so that administrators and developers understand when to use it.
  • Type: string
  • Required: Yes
  • Type: string
  • Required: No
  • Type: string
  • Required: Yes
  • Type: string
  • Required: No

Represents details about the context definition reference.

  • Type: string
  • Required: No
  • Description: ID of the parent context definition reference that’s used to derive the current context definition reference.
  • Type: string

  • Required: Yes

  • Description: Required.

    ID or name of the referred context definition.

  • Type: string
  • Required: No
  • Type: string
  • Required: Yes
  • Type: ContextTfrmSourceType (enumeration of type string)
  • Required: Yes

Represents details about the context definition version. Only one version can be active at a time.

  • Type: ContextMapping[]
  • Required: No
  • Description: Mapping of attributes and nodes to related objects.
  • Type: ContextNode[]
  • Required: No
  • Description: Details of the structure of the nodes within the context.
  • Type: string
  • Required: No
  • Description: Date and time when the context definition version becomes inactive.
  • Type: string
  • Required: No
  • Type: string
  • Required: No
  • Type: boolean
  • Required: No
  • Description: Indicates whether the context definition version is active (true) or not (false).
  • Type: string

  • Required: Yes

  • Description: Required.

    Date and time when the context definition version becomes active.

  • Type: int

  • Required: Yes

  • Description: Required.

    Version number of the context definition.

Represents the mapping of attributes and nodes to related objects.

  • Type: ContextNodeMapping[]
  • Required: No
  • Description: Mapping of the node in the context and values in the input schema.
  • Type: boolean
  • Required: No
  • Description: Indicates whether the mapping for a context definition version is default (true) or not (false).
  • Type: string
  • Required: No
  • Description: Description of the context mapping.
  • Type: string
  • Required: No
  • Description: Name of the parent mapping that’s used to derive the current mapping.
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the context mapping.

Represents the purpose associated to a context mapping.

  • Type: ContextMappingIntentType (enumeration of type string)

  • Required: Yes

  • Description: Required.

    Specifies the purpose that’s used to identify the type of context mapping required.

  • Possible values:

    • hydration
    • association
    • persistence
    • translation

Represents details of the structure of the nodes within the context. Each node can have other nodes related to them and attributes to describe the object. You can also define a hierarchy for the nodes.

  • Type: string
  • Required: No
  • Description: Canonical node that’s associated with the context node.
  • Type: ContextAttribute[]
  • Required: No
  • Description: Details of the attribute used to describe the context node.
  • Type: ContextNodeAttrDictionary[]
  • Required: No
  • Description: Facilitates relationships between context node and context dictionary. Additionally, it records the relationship between context node and context dictionary.
  • Type: ContextTag[]
  • Required: No
  • Description: Unique identifier of the attribute or node.
  • Type: boolean
  • Required: No
  • Type: string
  • Required: No
  • Description: Display name of the context node.
  • Type: string
  • Required: No
  • Description: Name of the parent context node that’s used to derive the current context node.
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the context node.

  • Type: boolean
  • Required: No
  • Description: Indicates whether the data in the Context Node record can be converted to field names (true) or not (false).

Represents the relationship between a context node and the context attribute dictionary.

  • Type: string

  • Required: Yes

  • Description: Required.

    Developer name of the context attribute dictionary.

  • Type: string

  • Required: Yes

  • Description: Required.

    Tag prefix of the context node that’s used to create the unique identifier of the parent context node.

Represents the relationship between the node in the context and values in the input schema.

  • Type: ContextAttributeMapping[]
  • Required: No
  • Description: Mapping of the attribute defined in the context and the values in the related objects.
  • Type: string
  • Required: No
  • Description: Context node record associated with the context node mapping.
  • Type: ContextNodeAttrDictionary[]
  • Required: No
  • Description: Facilitates relationships between context node mapping and context dictionary. Additionally, it records the relationship between context node and context dictionary.
  • Type: string
  • Required: No
  • Description: A description of this component. The description should explain the component’s purpose and behavior so that administrators and developers understand when to use it.
  • Type: string
  • Required: No
  • Description: Name of the parent context node mapping that’s used to derive the current context node mapping.
  • Type: string
  • Required: No
  • Description: API name of the context definition for existing context-to-context mappings.
  • Type: string
  • Required: No
  • Description: Name of the object used for the mapping.

Represents a unique identifier of an attribute or node instead of a fully qualified tag structure name.

  • Type: string
  • Required: No
  • Description: Name of the parent context tag that’s used to derive the current context tag.
  • Type: string

  • Required: Yes

  • Description: Required.

    Name of the context tag.

Represents the queries that fetch data for a chosen attribute from the input schema for context-to-context mapping.

  • Type: string

  • Required: Yes

  • Description: Required.

    Attribute in context definition that’s the source of context hydration.

  • Type: string
  • Required: No
  • Description: Name of the parent context attribute hydration detail that’s used to derive the current context attribute.

The following is an example of a ContextDefinition component.

The following is an example package.xml that references the previous definition.

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.